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

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

Issue 2904143002: color: Perform color transform in ImageBufferSurface (Closed)
Patch Set: Created 3 years, 7 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/UnacceleratedImageBufferSurface.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
index 64a496b5eec78a9fbaa6b112df055d778b6a574a..ecded67d222dedeafcdd856feccb6fbfa5b185cb 100644
--- a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
+++ b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
@@ -30,6 +30,7 @@
#include "platform/graphics/UnacceleratedImageBufferSurface.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/graphics/skia/SkiaUtils.h"
#include "platform/wtf/PassRefPtr.h"
#include "third_party/skia/include/core/SkSurface.h"
@@ -56,7 +57,12 @@ UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(
// Always save an initial frame, to support resetting the top level matrix
// and clip.
- canvas_ = WTF::WrapUnique(new SkiaPaintCanvas(surface_->getCanvas()));
+ canvas_ = WTF::WrapUnique(new SkiaPaintCanvas(
+ surface_->getCanvas(),
+ RuntimeEnabledFeatures::colorCorrectRenderingEnabled() &&
Justin Novosad 2017/05/29 14:45:35 Any tests for this? Does it affect layout tests u
ccameron 2017/05/29 15:27:17 This patch is part of the "fix the pile of bugs th
+ color_params.UsesOutputSpaceBlending()
+ ? color_params.GetSkColorSpace()
+ : nullptr));
canvas_->save();
if (initialization_mode == kInitializeImagePixels)

Powered by Google App Engine
This is Rietveld 408576698