diff options
author | Romain Guy <romainguy@google.com> | 2017-04-17 09:39:51 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2017-06-02 11:02:13 -0700 |
commit | 26a2b97dbe48ee45e9ae70110714048f2f360f97 (patch) | |
tree | 1e8e25d446c598d0b552708c90878246a370ba42 /libs/hwui/renderthread/RenderProxy.cpp | |
parent | 3b3388ca64a818f2c036cf0dbf02a9e011ccc8de (diff) |
Enable wide color gamut rendering
When wide color gamut rendering is requested, hwui will now
use an rgba16f scRGB-nl surface for rendering. This change
also fixes the way screenshots are handled in the platform
to behave properly with wide gamut rendering.
This change does not affect hardware layers. They also
need to use rgba16f scRGB-nl; this will be addressed in
another CL.
Bug: 29940137
Test: CtsUiRenderingTestCases, CtsGraphicsTestCases
Change-Id: I68fd96c451652136c566ec48fb0e97c2a7a257c5
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.cpp')
-rw-r--r-- | libs/hwui/renderthread/RenderProxy.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index eed523810403..83b3e3a3ab1e 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -227,6 +227,18 @@ void RenderProxy::setOpaque(bool opaque) { post(task); } +CREATE_BRIDGE2(setWideGamut, CanvasContext* context, bool wideGamut) { + args->context->setWideGamut(args->wideGamut); + return nullptr; +} + +void RenderProxy::setWideGamut(bool wideGamut) { + SETUP_TASK(setWideGamut); + args->context = mContext; + args->wideGamut = wideGamut; + post(task); +} + int64_t* RenderProxy::frameInfo() { return mDrawFrameTask.frameInfo(); } |