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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h

Issue 2660393002: Use gfx::ColorSpace instead of SkColorSpace in Blink (Closed)
Patch Set: Created 3 years, 11 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/core/html/canvas/CanvasRenderingContext.h
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
index f79b9ebfdc87b02ceb1d6c3b41ee98f77b070ce5..17bf38af230b0b53067c54a0dacda9556c01eefe 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
@@ -88,7 +88,12 @@ class CORE_EXPORT CanvasRenderingContext
CanvasColorSpace colorSpace() const { return m_colorSpace; };
WTF::String colorSpaceAsString() const;
- sk_sp<SkColorSpace> skColorSpace() const;
+ // The color space in which the the content should be interpreted by the
+ // compositor. This is always defined.
+ const gfx::ColorSpace& gfxColorSpace() const { return m_gfxColorSpace; }
+ // The color space that should be used for SkSurface creation. This may
+ // be nullptr.
+ sk_sp<SkColorSpace> skSurfaceColorSpace() const;
SkColorType colorType() const;
ColorBehavior colorBehaviorForMediaDrawnToCanvas() const;
@@ -194,6 +199,7 @@ class CORE_EXPORT CanvasRenderingContext
HashSet<String> m_cleanURLs;
HashSet<String> m_dirtyURLs;
CanvasColorSpace m_colorSpace;
+ gfx::ColorSpace m_gfxColorSpace;
CanvasContextCreationAttributes m_creationAttributes;
};

Powered by Google App Engine
This is Rietveld 408576698