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

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

Issue 2660393002: Use gfx::ColorSpace instead of SkColorSpace in Blink (Closed)
Patch Set: Rebase (again) 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/Canvas2DImageBufferSurface.h
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h b/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h
index 7db7d194729b3d622f8d28e78c45dc72ecd18d7e..f7d04ef73fa5d84df0db96974c80e152b0acf40c 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h
@@ -47,16 +47,22 @@ class Canvas2DImageBufferSurface final : public ImageBufferSurface {
int msaaSampleCount,
OpacityMode opacityMode,
Canvas2DLayerBridge::AccelerationMode accelerationMode,
- sk_sp<SkColorSpace> colorSpace,
+ const gfx::ColorSpace& colorSpace,
+ bool skSurfacesUseColorSpace,
SkColorType colorType)
- : ImageBufferSurface(size, opacityMode, colorSpace, colorType),
+ : ImageBufferSurface(
+ size,
+ opacityMode,
+ skSurfacesUseColorSpace ? colorSpace.ToSkColorSpace() : nullptr,
+ colorType),
m_layerBridge(
adoptRef(new Canvas2DLayerBridge(std::move(contextProvider),
size,
msaaSampleCount,
opacityMode,
accelerationMode,
- std::move(colorSpace),
+ colorSpace,
+ skSurfacesUseColorSpace,
colorType))) {
init();
}
@@ -65,7 +71,7 @@ class Canvas2DImageBufferSurface final : public ImageBufferSurface {
const IntSize& size)
: ImageBufferSurface(size,
bridge->opacityMode(),
- bridge->colorSpace(),
+ bridge->skSurfaceColorSpace(),
bridge->colorType()),
m_layerBridge(std::move(bridge)) {
init();

Powered by Google App Engine
This is Rietveld 408576698