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

Commit 6d32fea7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Re-enable RE test ..._premultipliesAlpha on Graphite w/ tolerance 1" into main

parents d4fa9f7c 01b93b13
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1265,7 +1265,12 @@ void RenderEngineTest::fillRedBufferWithPremultiplyAlpha() {

void RenderEngineTest::fillBufferWithPremultiplyAlpha() {
    fillRedBufferWithPremultiplyAlpha();
    expectBufferColor(fullscreenRect(), 128, 0, 0, 128);
    // Different backends and GPUs may round 255 * 0.5 = 127.5 differently, but
    // either 127 or 128 are acceptable. Checking both 127 and 128 with a
    // tolerance of 1 allows either 127 or 128 to pass, while preventing 126 or
    // 129 from erroneously passing.
    expectBufferColor(fullscreenRect(), 127, 0, 0, 127, 1);
    expectBufferColor(fullscreenRect(), 128, 0, 0, 128, 1);
}

void RenderEngineTest::fillRedBufferWithoutPremultiplyAlpha() {
@@ -2061,11 +2066,6 @@ TEST_P(RenderEngineTest, drawLayers_fillBufferTextureTransform) {
}

TEST_P(RenderEngineTest, drawLayers_fillBuffer_premultipliesAlpha) {
    // TODO: b/331446496 - Fix in Graphite and re-enable.
    if (GetParam()->skiaBackend() == renderengine::RenderEngine::SkiaBackend::GRAPHITE) {
        GTEST_SKIP();
    }

    if (!GetParam()->apiSupported()) {
        GTEST_SKIP();
    }