summaryrefslogtreecommitdiff
path: root/libs/hwui/ProgramCache.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2017-02-27 11:00:04 -0800
committerRomain Guy <romainguy@google.com>2017-03-06 19:33:25 -0800
commitefb4b06493fe7b1604c762a448b13c7af2845a8d (patch)
tree310d40716decb7686065339226534dac0bb35faa /libs/hwui/ProgramCache.cpp
parent4f357c081260c5bb36498169eb698adf7089899c (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/ProgramCache.cpp')
-rw-r--r--libs/hwui/ProgramCache.cpp6
1 files changed, 3 insertions, 3 deletions
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