From efb4b06493fe7b1604c762a448b13c7af2845a8d Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 27 Feb 2017 11:00:04 -0800 Subject: 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 --- libs/hwui/ProgramCache.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/hwui/ProgramCache.cpp') diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp index ca056487a3ba..40ab7788f218 100644 --- a/libs/hwui/ProgramCache.cpp +++ b/libs/hwui/ProgramCache.cpp @@ -418,7 +418,7 @@ const char* gBlendOps[18] = { ProgramCache::ProgramCache(Extensions& extensions) : mHasES3(extensions.getMajorGlVersion() >= 3) - , mHasSRGB(extensions.hasSRGB()) { + , mHasLinearBlending(extensions.hasLinearBlending()) { } ProgramCache::~ProgramCache() { @@ -642,11 +642,11 @@ String8 ProgramCache::generateFragmentShader(const ProgramDescription& descripti } if (description.hasBitmap || ((description.hasTexture || description.hasExternalTexture) && !description.hasAlpha8Texture)) { - shader.append(gFS_OETF[description.hasLinearTexture && !mHasSRGB]); + shader.append(gFS_OETF[description.hasLinearTexture && !mHasLinearBlending]); } if (description.hasGradient) { shader.append(gFS_Gradient_Functions); - shader.append(gFS_Gradient_Preamble[mHasSRGB]); + shader.append(gFS_Gradient_Preamble[mHasLinearBlending]); } // Begin the shader -- cgit v1.2.3-59-g8ed1b