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

Unified Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.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/platform/graphics/Canvas2DLayerBridge.h
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
index 0ba1285a88569ec4d77aafd675ef5b4ac8fe6395..2b13f72e7e29acfabd820e8f710877789a3793cc 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
@@ -36,6 +36,7 @@
#include "third_party/khronos/GLES2/gl2.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkSurface.h"
+#include "ui/gfx/color_space.h"
#include "wtf/Allocator.h"
#include "wtf/Deque.h"
#include "wtf/RefCounted.h"
@@ -94,6 +95,7 @@ class PLATFORM_EXPORT Canvas2DLayerBridge
int msaaSampleCount,
OpacityMode,
AccelerationMode,
+ const gfx::ColorSpace&,
sk_sp<SkColorSpace>,
SkColorType);
@@ -141,7 +143,9 @@ class PLATFORM_EXPORT Canvas2DLayerBridge
void beginDestruction();
void hibernate();
bool isHibernating() const { return m_hibernationImage.get(); }
- sk_sp<SkColorSpace> colorSpace() const { return m_colorSpace; }
+ sk_sp<SkColorSpace> skSurfaceColorSpace() const {
+ return m_skSurfaceColorSpace;
+ }
SkColorType colorType() const { return m_colorType; }
bool hasRecordedDrawCommands() { return m_haveRecordedDrawCommands; }
@@ -289,7 +293,11 @@ class PLATFORM_EXPORT Canvas2DLayerBridge
AccelerationMode m_accelerationMode;
OpacityMode m_opacityMode;
const IntSize m_size;
- sk_sp<SkColorSpace> m_colorSpace;
+ // The color space that the compositor is to use. This will always be
+ // defined.
+ gfx::ColorSpace m_colorSpace;
+ // The color space to use for SkSurfaces. This may be nullptr.
+ sk_sp<SkColorSpace> m_skSurfaceColorSpace;
Justin Novosad 2017/01/31 00:15:58 Do we really need to store an SkColorSpace here? I
ccameron 2017/01/31 05:34:27 I changed this to a bool, "m_skSurfacesUseColorSpa
SkColorType m_colorType;
int m_recordingPixelCount;

Powered by Google App Engine
This is Rietveld 408576698