diff options
author | Derek Sollenberger <djsollen@google.com> | 2018-04-20 16:13:31 -0400 |
---|---|---|
committer | Derek Sollenberger <djsollen@google.com> | 2018-04-30 15:53:46 -0400 |
commit | be3876c434864d6c05212158b25d778d29b07eb0 (patch) | |
tree | 1b099cca944f453327b8d486ad4455c391912d9e /libs/hwui/pipeline/skia/SkiaPipeline.cpp | |
parent | 1ce9dde87e0fe4e01c031f9cec19e6aae3807f48 (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
Change-Id: Ic0446a0d861e86a5a9d0382346b57fcc45c8a61b
Diffstat (limited to 'libs/hwui/pipeline/skia/SkiaPipeline.cpp')
-rw-r--r-- | libs/hwui/pipeline/skia/SkiaPipeline.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.cpp b/libs/hwui/pipeline/skia/SkiaPipeline.cpp index 9e7304678021..d66cba12ad99 100644 --- a/libs/hwui/pipeline/skia/SkiaPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaPipeline.cpp @@ -147,6 +147,7 @@ void SkiaPipeline::renderLayersImpl(const LayerUpdateQueue& layers, bool opaque, GrContext* currentContext = layerNode->getLayerSurface()->getCanvas()->getGrContext(); if (cachedContext.get() != currentContext) { if (cachedContext.get()) { + ATRACE_NAME("flush layers (context changed)"); cachedContext->flush(); } cachedContext.reset(SkSafeRef(currentContext)); @@ -155,6 +156,7 @@ void SkiaPipeline::renderLayersImpl(const LayerUpdateQueue& layers, bool opaque, } if (cachedContext.get()) { + ATRACE_NAME("flush layers"); cachedContext->flush(); } } |