| Index: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
| index 55b20d38141879bd740a87dce407fd13bb8bbb8b..bd249cfd0d063abdb1d0b67793e72e4b2190f773 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
| @@ -110,12 +110,18 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
|
| m_contentsLayerId(0),
|
| m_scrollableArea(nullptr),
|
| m_renderingContext3d(0),
|
| + m_colorBehavior(ColorBehavior::transformToGlobalTarget()),
|
| m_hasPreferredRasterBounds(false) {
|
| #if ENABLE(ASSERT)
|
| if (m_client)
|
| m_client->verifyNotPainting();
|
| #endif
|
|
|
| + // In true color mode, no inputs are adjusted, and all colors are converted
|
| + // at rasterization time.
|
| + if (RuntimeEnabledFeatures::trueColorRenderingEnabled())
|
| + m_colorBehavior = ColorBehavior::tag();
|
| +
|
| m_contentLayerDelegate = WTF::makeUnique<ContentLayerDelegate>(this);
|
| m_layer = Platform::current()->compositorSupport()->createContentLayer(
|
| m_contentLayerDelegate.get());
|
| @@ -327,7 +333,8 @@ bool GraphicsLayer::paintWithoutCommit(
|
| return false;
|
| }
|
|
|
| - GraphicsContext context(getPaintController(), disabledMode);
|
| + GraphicsContext context(getPaintController(), disabledMode, nullptr,
|
| + m_colorBehavior);
|
|
|
| m_previousInterestRect = *interestRect;
|
| m_client->paintContents(this, context, m_paintingPhase, *interestRect);
|
| @@ -1234,7 +1241,9 @@ sk_sp<SkPicture> GraphicsLayer::capturePicture() {
|
| return nullptr;
|
|
|
| IntSize intSize = expandedIntSize(size());
|
| - GraphicsContext graphicsContext(getPaintController());
|
| + GraphicsContext graphicsContext(getPaintController(),
|
| + GraphicsContext::NothingDisabled, nullptr,
|
| + m_colorBehavior);
|
| graphicsContext.beginRecording(IntRect(IntPoint(0, 0), intSize));
|
| getPaintController().paintArtifact().replay(graphicsContext);
|
| return graphicsContext.endRecording();
|
|
|