summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2017-02-17 17:09:21 -0800
committer Romain Guy <romainguy@google.com> 2017-02-17 17:09:21 -0800
commitdd6f1a70848cc852c215a2e2cb8f9acba4953504 (patch)
treeba24b5713749e293a23908d65334acac03ac8df3
parent8ec21062ded44fe28ea7cd50e24112dc1832b0e5 (diff)
Fix Rgba16fTests@testTransferFunctionsShader test
RGBA16F bitmaps used as an SkBitmapShader would not set the hasLinearTexture flag in the program description, causing a shader to be generated without the proper opto-electronic transfer function. Bug: 35482305 Test: bit -t CtsUiRenderingTestCases:android.uirendering.cts.testclasses.Rgba16fTests Change-Id: I23354f8189a6b27b677eac9df82677e91282a31d
-rw-r--r--libs/hwui/SkiaShader.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/hwui/SkiaShader.cpp b/libs/hwui/SkiaShader.cpp
index 92399864ff23..760c10c6130e 100644
--- a/libs/hwui/SkiaShader.cpp
+++ b/libs/hwui/SkiaShader.cpp
@@ -217,6 +217,7 @@ bool tryStoreBitmap(Caches& caches, const SkShader& shader, const Matrix4& model
const float height = outData->bitmapTexture->height();
description->hasBitmap = true;
+ description->hasLinearTexture = outData->bitmapTexture->isLinear();
description->isShaderBitmapExternal = hwuiBitmap->isHardware();
// gralloc doesn't support non-clamp modes
if (hwuiBitmap->isHardware() || (!caches.extensions().hasNPot()