summaryrefslogtreecommitdiff
path: root/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2018-04-20 16:13:31 -0400
committerDerek Sollenberger <djsollen@google.com>2018-05-01 02:45:43 +0000
commit551d08e2d50c7f73c5eb65fd366b92efba4f0ed5 (patch)
tree9ac55bbd3f8a5886fb611d35c79627fc3c2031db /libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
parent9ea13ca0b67e77c5efda1c94c141dc49987c0745 (diff)
Respect a Layer's (e.g. SurfaceTexture) colorSpace when compositing
This CL extracts the android_dataspace from the GLConsumer and converts it to a SkColorSpace. HWUI always expects to composite into an sRGB destination so when we draw the layer we run the draw through a colorFilter that converts the input colorSpace into that of the destination. Test: CtsViewTestCases Bug: 78016220 Merged-In: Ic0446a0d861e86a5a9d0382346b57fcc45c8a61b Change-Id: Ic0446a0d861e86a5a9d0382346b57fcc45c8a61b
Diffstat (limited to 'libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp')
-rw-r--r--libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
index 74cfb2854e62..d732a46e6ee4 100644
--- a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
+++ b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
@@ -152,7 +152,7 @@ bool SkiaOpenGLPipeline::copyLayerInto(DeferredLayerUpdater* deferredLayer, SkBi
}
static Layer* createLayer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight,
- SkColorFilter* colorFilter, int alpha, SkBlendMode mode, bool blend) {
+ sk_sp<SkColorFilter> colorFilter, int alpha, SkBlendMode mode, bool blend) {
GlLayer* layer =
new GlLayer(renderState, layerWidth, layerHeight, colorFilter, alpha, mode, blend);
layer->generateTexture();