From be3876c434864d6c05212158b25d778d29b07eb0 Mon Sep 17 00:00:00 2001 From: Derek Sollenberger Date: Fri, 20 Apr 2018 16:13:31 -0400 Subject: 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 Change-Id: Ic0446a0d861e86a5a9d0382346b57fcc45c8a61b --- libs/hwui/GlLayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/hwui/GlLayer.cpp') diff --git a/libs/hwui/GlLayer.cpp b/libs/hwui/GlLayer.cpp index 32a30149e476..42ae29d76898 100644 --- a/libs/hwui/GlLayer.cpp +++ b/libs/hwui/GlLayer.cpp @@ -32,7 +32,7 @@ namespace android { namespace uirenderer { GlLayer::GlLayer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight, - SkColorFilter* colorFilter, int alpha, SkBlendMode mode, bool blend) + sk_sp colorFilter, int alpha, SkBlendMode mode, bool blend) : Layer(renderState, Api::OpenGL, colorFilter, alpha, mode) , caches(Caches::getInstance()) , texture(caches) { -- cgit v1.2.3-59-g8ed1b