diff options
author | 2016-10-12 12:14:07 -0700 | |
---|---|---|
committer | 2016-10-12 13:28:26 -0700 | |
commit | 8762e332e3797fb41929a1c6069207f4906ca329 (patch) | |
tree | b97249defbda418d2adc8af6f4bb22dfa3def07f /libs/hwui/SkiaShader.cpp | |
parent | 21986f2ae73e9ae3395a37dd3976af55e75d4f9d (diff) |
Various fixes for linear blending and gradients
With linear blending turned off some textures were still
created as sRGB textures instead of linear textures.
Multi-stop gradients were not behaving properly on devices
with no support for float textures.
Gradients are now always interpolated in linear space
even if linear blending is off.
New functions to always force sRGB->linear->sRGB conversions.
Test: Manual testing
Bug: 29940137
Change-Id: Ie2f84ee2a65fd85570e88af813e841e0e625df6c
Diffstat (limited to 'libs/hwui/SkiaShader.cpp')
-rw-r--r-- | libs/hwui/SkiaShader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/SkiaShader.cpp b/libs/hwui/SkiaShader.cpp index 9838df2f6013..5d9e5c035283 100644 --- a/libs/hwui/SkiaShader.cpp +++ b/libs/hwui/SkiaShader.cpp @@ -173,8 +173,8 @@ bool tryStoreGradient(Caches& caches, const SkShader& shader, const Matrix4 mode outData->gradientSampler = 0; outData->gradientTexture = nullptr; - outData->startColor.set(gradInfo.fColors[0]); - outData->endColor.set(gradInfo.fColors[1]); + outData->startColor.setSRGB(gradInfo.fColors[0]); + outData->endColor.setSRGB(gradInfo.fColors[1]); } return true; |