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

Unified Diff: third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h

Issue 2825183002: Plumb CanvasColorParams to canvas image classes (Closed)
Patch Set: Require both runtime flags Created 3 years, 8 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/Canvas2DImageBufferSurface.h
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h b/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h
index 942c9d439ff4dfa73fcd0d968cafa2a5473fbd47..270e51ebd68763f2164fc884f1b2703d4593a944 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h
@@ -47,24 +47,15 @@ class Canvas2DImageBufferSurface final : public ImageBufferSurface {
int msaa_sample_count,
OpacityMode opacity_mode,
Canvas2DLayerBridge::AccelerationMode acceleration_mode,
- const gfx::ColorSpace& color_space,
- bool sk_surfaces_use_color_space,
- SkColorType color_type)
- : ImageBufferSurface(size,
- opacity_mode,
- sk_surfaces_use_color_space
- ? color_space.ToSkColorSpace()
- : nullptr,
- color_type),
+ const CanvasColorParams& color_params)
+ : ImageBufferSurface(size, opacity_mode, color_params),
layer_bridge_(
AdoptRef(new Canvas2DLayerBridge(std::move(context_provider),
size,
msaa_sample_count,
opacity_mode,
acceleration_mode,
- color_space,
- sk_surfaces_use_color_space,
- color_type))) {
+ color_params))) {
Init();
}
@@ -72,8 +63,7 @@ class Canvas2DImageBufferSurface final : public ImageBufferSurface {
const IntSize& size)
: ImageBufferSurface(size,
bridge->GetOpacityMode(),
- bridge->SkSurfaceColorSpace(),
- bridge->ColorType()),
+ bridge->color_params()),
layer_bridge_(std::move(bridge)) {
Init();
}

Powered by Google App Engine
This is Rietveld 408576698