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

Unified Diff: Source/core/html/HTMLCanvasElement.cpp

Issue 652483003: Plumb in flag to enable antialiased clipping in HTML 5 Canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More cleanup Created 6 years, 2 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: Source/core/html/HTMLCanvasElement.cpp
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp
index 750e1fd6f566cc87902c094d100111be19cd0511..d5c6727732793610700e82ded45e4f3c79dd5774 100644
--- a/Source/core/html/HTMLCanvasElement.cpp
+++ b/Source/core/html/HTMLCanvasElement.cpp
@@ -168,7 +168,12 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, Canvas
return 0;
if (!m_context) {
blink::Platform::current()->histogramEnumeration("Canvas.ContextType", Context2d, ContextTypeCount);
- m_context = CanvasRenderingContext2D::create(this, static_cast<Canvas2DContextAttributes*>(attrs), document().inQuirksMode());
+
+ bool antialiasClips = false;
+ if (document().settings() && document().settings()->antialiasedClips2dCanvasEnabled())
+ antialiasClips = true;
+
+ m_context = CanvasRenderingContext2D::create(this, static_cast<Canvas2DContextAttributes*>(attrs), document().inQuirksMode(), antialiasClips);
Justin Novosad 2014/10/14 14:46:43 Me wonders if we should just pass 'this' or 'docum
robertphillips 2014/10/16 13:24:18 Done - passed in document.
setNeedsCompositingUpdate();
}
return m_context.get();

Powered by Google App Engine
This is Rietveld 408576698