Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2712083002: color: Remove blink pre-conversion code (Closed)
Patch Set: Rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 044aea6ff9c8f225328a9954caabe897f4b7f89d..bf2192a5147d71dacd0415f7831c3292b8f1bb86 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -111,18 +111,11 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
m_contentsLayerId(0),
m_scrollableArea(nullptr),
m_renderingContext3d(0),
- m_colorBehavior(ColorBehavior::transformToGlobalTarget()),
m_hasPreferredRasterBounds(false) {
#if DCHECK_IS_ON()
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());
@@ -334,8 +327,7 @@ bool GraphicsLayer::paintWithoutCommit(
return false;
}
- GraphicsContext context(getPaintController(), disabledMode, nullptr,
- m_colorBehavior);
+ GraphicsContext context(getPaintController(), disabledMode, nullptr);
m_previousInterestRect = *interestRect;
m_client->paintContents(this, context, m_paintingPhase, *interestRect);
@@ -1072,8 +1064,9 @@ void GraphicsLayer::setContentsRect(const IntRect& rect) {
void GraphicsLayer::setContentsToImage(
Image* image,
RespectImageOrientationEnum respectImageOrientation) {
- sk_sp<SkImage> skImage =
- image ? image->imageForCurrentFrame(m_colorBehavior) : nullptr;
+ sk_sp<SkImage> skImage = image ? image->imageForCurrentFrame(
+ ColorBehavior::transformToGlobalTarget())
+ : nullptr;
if (image && skImage && image->isBitmapImage()) {
if (respectImageOrientation == RespectImageOrientation) {
@@ -1208,8 +1201,7 @@ sk_sp<PaintRecord> GraphicsLayer::captureRecord() {
IntSize intSize = expandedIntSize(size());
GraphicsContext graphicsContext(getPaintController(),
- GraphicsContext::NothingDisabled, nullptr,
- m_colorBehavior);
+ GraphicsContext::NothingDisabled, nullptr);
graphicsContext.beginRecording(IntRect(IntPoint(0, 0), intSize));
getPaintController().paintArtifact().replay(graphicsContext);
return graphicsContext.endRecording();
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsLayer.h ('k') | third_party/WebKit/Source/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698