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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 2212163002: Add some plumbing for the color management of canvases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor corrections 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/modules/canvas2d/CanvasRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
index fac95dfa3865c18527a4643fc013bd7dc6d5c1e9..1b3e420e195831e8eb2dd4c3db45d9be1ae9f5c2 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
@@ -109,7 +109,7 @@ private:
};
CanvasRenderingContext2D::CanvasRenderingContext2D(HTMLCanvasElement* canvas, const CanvasContextCreationAttributes& attrs, Document& document)
- : CanvasRenderingContext(canvas)
+ : CanvasRenderingContext(canvas, nullptr, attrs.colorSpace())
, m_hasAlpha(attrs.alpha())
, m_contextLostMode(NotLostContext)
, m_contextRestorable(true)
@@ -911,6 +911,7 @@ WebLayer* CanvasRenderingContext2D::platformLayer() const
void CanvasRenderingContext2D::getContextAttributes(Canvas2DContextAttributes& attrs) const
{
attrs.setAlpha(m_hasAlpha);
+ attrs.setColorSpace(colorSpaceAsString());
Stephen White 2016/08/11 20:41:27 Shouldn't the base class be responsible for this?
Justin Novosad 2016/08/12 17:40:18 Nope. The base class is in core, so it can't know
}
void CanvasRenderingContext2D::drawFocusIfNeeded(Element* element)

Powered by Google App Engine
This is Rietveld 408576698