Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c4dba7c authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-b1bd0f0e-f3c4-414e-8f22-d9235831ae23-for-git_oc-mr1-release-40...

release-request-b1bd0f0e-f3c4-414e-8f22-d9235831ae23-for-git_oc-mr1-release-4099045 snap-temp-L41300000074003051

Change-Id: I5b5ecd1ada917dd1f4f9dd0828a82688b7233c81
parents b6c3c396 8245fc4a
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -200,8 +200,8 @@ uint64_t Gralloc1Allocator::toProducerUsage(uint64_t usage) {
    // should be filtered out
    uint64_t producerUsage =
        usage &
        ~static_cast<uint64_t>(BufferUsage::CPU_READ_MASK |
                               BufferUsage::CPU_WRITE_MASK);
        ~static_cast<uint64_t>(BufferUsage::CPU_READ_MASK | BufferUsage::CPU_WRITE_MASK |
                               BufferUsage::GPU_DATA_BUFFER);

    switch (usage & BufferUsage::CPU_WRITE_MASK) {
        case static_cast<uint64_t>(BufferUsage::CPU_WRITE_RARELY):
@@ -225,6 +225,8 @@ uint64_t Gralloc1Allocator::toProducerUsage(uint64_t usage) {
            break;
    }

    // BufferUsage::GPU_DATA_BUFFER is always filtered out

    return producerUsage;
}

@@ -233,8 +235,8 @@ uint64_t Gralloc1Allocator::toConsumerUsage(uint64_t usage) {
    // should be filtered out
    uint64_t consumerUsage =
        usage &
        ~static_cast<uint64_t>(BufferUsage::CPU_READ_MASK |
                               BufferUsage::CPU_WRITE_MASK);
        ~static_cast<uint64_t>(BufferUsage::CPU_READ_MASK | BufferUsage::CPU_WRITE_MASK |
                               BufferUsage::SENSOR_DIRECT_DATA | BufferUsage::GPU_DATA_BUFFER);

    switch (usage & BufferUsage::CPU_READ_MASK) {
        case static_cast<uint64_t>(BufferUsage::CPU_READ_RARELY):
@@ -247,6 +249,12 @@ uint64_t Gralloc1Allocator::toConsumerUsage(uint64_t usage) {
            break;
    }

    // BufferUsage::SENSOR_DIRECT_DATA is always filtered out

    if (usage & BufferUsage::GPU_DATA_BUFFER) {
        consumerUsage |= GRALLOC1_CONSUMER_USAGE_GPU_DATA_BUFFER;
    }

    return consumerUsage;
}

+3 −3
Original line number Diff line number Diff line
@@ -1373,7 +1373,7 @@ typedef KeymasterHidlTest GetKeyCharacteristicsTest;
 */
TEST_F(GetKeyCharacteristicsTest, SimpleRsa) {
    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                             .RsaSigningKey(256, 3)
                                             .RsaSigningKey(1024, 3)
                                             .Digest(Digest::NONE)
                                             .Padding(PaddingMode::NONE)));

@@ -2245,7 +2245,7 @@ typedef KeymasterHidlTest ExportKeyTest;
 */
TEST_F(ExportKeyTest, RsaUnsupportedKeyFormat) {
    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                             .RsaSigningKey(256, 3)
                                             .RsaSigningKey(1024, 3)
                                             .Digest(Digest::NONE)
                                             .Padding(PaddingMode::NONE)));
    HidlBuf export_data;
@@ -2262,7 +2262,7 @@ TEST_F(ExportKeyTest, RsaUnsupportedKeyFormat) {
TEST_F(ExportKeyTest, DISABLED_RsaCorruptedKeyBlob) {
    ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                             .Authorization(TAG_NO_AUTH_REQUIRED)
                                             .RsaSigningKey(256, 3)
                                             .RsaSigningKey(1024, 3)
                                             .Digest(Digest::NONE)
                                             .Padding(PaddingMode::NONE)));
    for (size_t i = 0; i < key_blob_.size(); ++i) {