diff options
author | Romain Guy <romainguy@google.com> | 2017-02-27 11:00:04 -0800 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2017-03-06 19:33:25 -0800 |
commit | efb4b06493fe7b1604c762a448b13c7af2845a8d (patch) | |
tree | 310d40716decb7686065339226534dac0bb35faa /libs/hwui/renderstate | |
parent | 4f357c081260c5bb36498169eb698adf7089899c (diff) |
Add ColorSpace information on Bitmap
This is the first step toward interpreting color spaces at render time.
Bug: 32984164
Test: BitmapColorSpaceTest in CtsGraphicsTestCases
Change-Id: I0164a18f1ed74a745874fe5229168042afe27a04
Diffstat (limited to 'libs/hwui/renderstate')
-rw-r--r-- | libs/hwui/renderstate/RenderState.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/hwui/renderstate/RenderState.cpp b/libs/hwui/renderstate/RenderState.cpp index 7dfc2ee4fbe5..8bce990129de 100644 --- a/libs/hwui/renderstate/RenderState.cpp +++ b/libs/hwui/renderstate/RenderState.cpp @@ -174,13 +174,15 @@ void RenderState::interruptForFunctorInvoke() { meshState().disableTexCoordsVertexArray(); debugOverdraw(false, false); // TODO: We need a way to know whether the functor is sRGB aware (b/32072673) - if (mCaches->extensions().hasSRGBWriteControl()) { + if (mCaches->extensions().hasLinearBlending() && + mCaches->extensions().hasSRGBWriteControl()) { glDisable(GL_FRAMEBUFFER_SRGB_EXT); } } void RenderState::resumeFromFunctorInvoke() { - if (mCaches->extensions().hasSRGBWriteControl()) { + if (mCaches->extensions().hasLinearBlending() && + mCaches->extensions().hasSRGBWriteControl()) { glEnable(GL_FRAMEBUFFER_SRGB_EXT); } |