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

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

Issue 2525453002: Raster: Allow a RasterSource to specify its color space (Closed)
Patch Set: Only set implied space when color correct rendering is disabled Created 4 years, 1 month 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
« no previous file with comments | « cc/tiles/tile_manager.cc ('k') | third_party/WebKit/public/platform/WebDisplayItemList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp b/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
index 6e6b09696fa7712928533b5731242d915fd5363d..aaa6e09c8b2618e5d8075d1600dc625e3838466e 100644
--- a/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
@@ -30,11 +30,13 @@
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/GraphicsLayer.h"
#include "platform/graphics/paint/PaintController.h"
+#include "platform/image-decoders/ImageDecoder.h"
#include "platform/tracing/TraceEvent.h"
#include "platform/tracing/TracedValue.h"
#include "public/platform/WebDisplayItemList.h"
#include "public/platform/WebRect.h"
#include "third_party/skia/include/core/SkPicture.h"
+#include "ui/gfx/color_space.h"
#include "ui/gfx/geometry/rect.h"
namespace blink {
@@ -88,6 +90,12 @@ void ContentLayerDelegate::paintContents(
paintController.paintArtifact().appendToWebDisplayItemList(
webDisplayItemList);
+ if (!RuntimeEnabledFeatures::colorCorrectRenderingEnabled()) {
+ // TODO(ccameron): This color space should come from the GraphicsLayer.
+ // https://crbug.com/667411
+ webDisplayItemList->setImpliedColorSpace(gfx::ColorSpace::FromSkColorSpace(
+ ImageDecoder::globalTargetColorSpace()));
+ }
paintController.setDisplayItemConstructionIsDisabled(false);
paintController.setSubsequenceCachingIsDisabled(false);
}
« no previous file with comments | « cc/tiles/tile_manager.cc ('k') | third_party/WebKit/public/platform/WebDisplayItemList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698