Loading libs/renderengine/gl/GLESRenderEngine.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -1276,7 +1276,8 @@ void GLESRenderEngine::setupLayerBlending(bool premultipliedAlpha, bool opaque, if (color.a < 1.0f || !opaque || cornerRadius > 0.0f) { if (color.a < 1.0f || !opaque || cornerRadius > 0.0f) { glEnable(GL_BLEND); glEnable(GL_BLEND); glBlendFunc(premultipliedAlpha ? GL_ONE : GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFuncSeparate(premultipliedAlpha ? GL_ONE : GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); } else { } else { glDisable(GL_BLEND); glDisable(GL_BLEND); } } Loading libs/renderengine/tests/RenderEngineTest.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -919,7 +919,7 @@ void RenderEngineTest::fillRedBufferWithoutPremultiplyAlpha() { void RenderEngineTest::fillBufferWithoutPremultiplyAlpha() { void RenderEngineTest::fillBufferWithoutPremultiplyAlpha() { fillRedBufferWithoutPremultiplyAlpha(); fillRedBufferWithoutPremultiplyAlpha(); expectBufferColor(fullscreenRect(), 128, 0, 0, 64, 1); expectBufferColor(fullscreenRect(), 128, 0, 0, 128, 1); } } void RenderEngineTest::clearLeftRegion() { void RenderEngineTest::clearLeftRegion() { Loading Loading
libs/renderengine/gl/GLESRenderEngine.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -1276,7 +1276,8 @@ void GLESRenderEngine::setupLayerBlending(bool premultipliedAlpha, bool opaque, if (color.a < 1.0f || !opaque || cornerRadius > 0.0f) { if (color.a < 1.0f || !opaque || cornerRadius > 0.0f) { glEnable(GL_BLEND); glEnable(GL_BLEND); glBlendFunc(premultipliedAlpha ? GL_ONE : GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFuncSeparate(premultipliedAlpha ? GL_ONE : GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); } else { } else { glDisable(GL_BLEND); glDisable(GL_BLEND); } } Loading
libs/renderengine/tests/RenderEngineTest.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -919,7 +919,7 @@ void RenderEngineTest::fillRedBufferWithoutPremultiplyAlpha() { void RenderEngineTest::fillBufferWithoutPremultiplyAlpha() { void RenderEngineTest::fillBufferWithoutPremultiplyAlpha() { fillRedBufferWithoutPremultiplyAlpha(); fillRedBufferWithoutPremultiplyAlpha(); expectBufferColor(fullscreenRect(), 128, 0, 0, 64, 1); expectBufferColor(fullscreenRect(), 128, 0, 0, 128, 1); } } void RenderEngineTest::clearLeftRegion() { void RenderEngineTest::clearLeftRegion() { Loading