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

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

Issue 2212163002: Add some plumbing for the color management of canvases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 56652f1ee590e9df2da3c4e89546ea282b96c0bb..25d235438eae782c4d1570747684ef82fd680e47 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
@@ -85,7 +85,7 @@ public:
ForceAccelerationForTesting,
};
- static PassRefPtr<Canvas2DLayerBridge> create(const IntSize&, int msaaSampleCount, OpacityMode, AccelerationMode);
+ static PassRefPtr<Canvas2DLayerBridge> create(const IntSize&, int msaaSampleCount, OpacityMode, AccelerationMode, sk_sp<SkColorSpace>);
~Canvas2DLayerBridge() override;
@@ -118,6 +118,7 @@ public:
void beginDestruction();
void hibernate();
bool isHibernating() const { return m_hibernationImage.get(); }
+ sk_sp<SkColorSpace> colorSpace() const { return m_colorSpace; }
PassRefPtr<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason);
@@ -183,7 +184,7 @@ private:
MailboxInfo() {}
};
- Canvas2DLayerBridge(std::unique_ptr<WebGraphicsContext3DProvider>, const IntSize&, int msaaSampleCount, OpacityMode, AccelerationMode);
+ Canvas2DLayerBridge(std::unique_ptr<WebGraphicsContext3DProvider>, const IntSize&, int msaaSampleCount, OpacityMode, AccelerationMode, sk_sp<SkColorSpace>);
gpu::gles2::GLES2Interface* contextGL();
void startRecording();
void skipQueuedDrawCommands();
@@ -271,6 +272,7 @@ private:
AccelerationMode m_accelerationMode;
OpacityMode m_opacityMode;
const IntSize m_size;
+ sk_sp<SkColorSpace> m_colorSpace;
int m_recordingPixelCount;
#if USE_IOSURFACE_FOR_2D_CANVAS

Powered by Google App Engine
This is Rietveld 408576698