diff options
author | Derek Sollenberger <djsollen@google.com> | 2020-02-06 19:47:24 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-02-06 19:47:24 +0000 |
commit | 3109b4cc47f27d04708c4313b7c8f8de401de9d8 (patch) | |
tree | c9e7dda3b56f1e74d8c4e454e0510837260620c8 /libs/hwui/renderthread/CanvasContext.cpp | |
parent | 53310e5e4d41fffef0ba0e1c7121fa2a72611084 (diff) | |
parent | 1863d94e9a32a210cfb50d7c22bbac30dc33e010 (diff) |
Merge "Ensure SkiaPipeline always has a valid colorspace."
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index aa8bac9362ab..91f9447a3d59 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -161,9 +161,8 @@ void CanvasContext::setSurface(sp<Surface>&& surface, bool enableTimeout) { mRenderAheadCapacity = mRenderAheadDepth; } - ColorMode colorMode = mWideColorGamut ? ColorMode::WideColorGamut : ColorMode::SRGB; bool hasSurface = mRenderPipeline->setSurface( - mNativeSurface ? mNativeSurface->getNativeWindow() : nullptr, mSwapBehavior, colorMode, + mNativeSurface ? mNativeSurface->getNativeWindow() : nullptr, mSwapBehavior, mRenderAheadCapacity); mFrameNumber = -1; @@ -225,7 +224,8 @@ void CanvasContext::setOpaque(bool opaque) { } void CanvasContext::setWideGamut(bool wideGamut) { - mWideColorGamut = wideGamut; + ColorMode colorMode = wideGamut ? ColorMode::WideColorGamut : ColorMode::SRGB; + mRenderPipeline->setSurfaceColorProperties(colorMode); } bool CanvasContext::makeCurrent() { |