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

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

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/UnacceleratedImageBufferSurface.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
index b047754ea9971e32703ed074298240e953110656..ce38fa85d82c6be14ad50144dbf07182d8c8a9a9 100644
--- a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
+++ b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
@@ -40,13 +40,13 @@ UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(
const IntSize& size,
OpacityMode opacity_mode,
ImageInitializationMode initialization_mode,
- sk_sp<SkColorSpace> color_space,
- SkColorType color_type)
- : ImageBufferSurface(size, opacity_mode, color_space, color_type) {
+ const CanvasColorParams& color_params)
+ : ImageBufferSurface(size, opacity_mode, color_params) {
SkAlphaType alpha_type =
(kOpaque == opacity_mode) ? kOpaque_SkAlphaType : kPremul_SkAlphaType;
- SkImageInfo info = SkImageInfo::Make(size.Width(), size.Height(), color_type,
- alpha_type, color_space);
+ SkImageInfo info = SkImageInfo::Make(
+ size.Width(), size.Height(), color_params.GetSkColorType(), alpha_type,
+ color_params.GetSkColorSpaceForSkSurfaces());
SkSurfaceProps disable_lcd_props(0, kUnknown_SkPixelGeometry);
surface_ = SkSurface::MakeRaster(
info, kOpaque == opacity_mode ? 0 : &disable_lcd_props);

Powered by Google App Engine
This is Rietveld 408576698