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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.h

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: Addressed code review comments 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
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext2D.h
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.h b/Source/core/html/canvas/CanvasRenderingContext2D.h
index f12666dbf2986157a60b53e59f8ef054391f2f4e..7b0f87e4418748a112dad0831ae361a4e4f25c4e 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.h
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.h
@@ -36,6 +36,7 @@
#include "platform/fonts/Font.h"
#include "platform/graphics/Color.h"
#include "platform/geometry/FloatSize.h"
+#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/GraphicsTypes.h"
#include "platform/graphics/ImageBuffer.h"
#include "platform/graphics/Path.h"
@@ -57,7 +58,6 @@ class Path2D;
class Element;
class ExceptionState;
class FloatRect;
-class GraphicsContext;
class HTMLCanvasElement;
class HTMLImageElement;
class HTMLVideoElement;
@@ -69,9 +69,9 @@ typedef WillBeHeapHashMap<String, RefPtrWillBeMember<MutableStylePropertySet> >
class CanvasRenderingContext2D final: public CanvasRenderingContext, public ScriptWrappable, public CanvasPathMethods {
DEFINE_WRAPPERTYPEINFO();
public:
- static PassOwnPtrWillBeRawPtr<CanvasRenderingContext2D> create(HTMLCanvasElement* canvas, const Canvas2DContextAttributes* attrs, bool usesCSSCompatibilityParseMode)
+ static PassOwnPtrWillBeRawPtr<CanvasRenderingContext2D> create(HTMLCanvasElement* canvas, const Canvas2DContextAttributes* attrs, Document& document)
{
- return adoptPtrWillBeNoop(new CanvasRenderingContext2D(canvas, attrs, usesCSSCompatibilityParseMode));
+ return adoptPtrWillBeNoop(new CanvasRenderingContext2D(canvas, attrs, document));
}
virtual ~CanvasRenderingContext2D();
@@ -297,7 +297,7 @@ private:
bool m_hasClip;
};
- CanvasRenderingContext2D(HTMLCanvasElement*, const Canvas2DContextAttributes* attrs, bool usesCSSCompatibilityParseMode);
+ CanvasRenderingContext2D(HTMLCanvasElement*, const Canvas2DContextAttributes* attrs, Document&);
State& modifiableState() { ASSERT(!state().m_unrealizedSaveCount); return *m_stateStack.last(); }
const State& state() const { return *m_stateStack.last(); }
@@ -369,6 +369,7 @@ private:
WillBeHeapVector<OwnPtrWillBeMember<State> > m_stateStack;
OwnPtrWillBeMember<HitRegionManager> m_hitRegionManager;
bool m_usesCSSCompatibilityParseMode;
+ GraphicsContext::AntiAliasingMode m_clipAntialiasing;
bool m_hasAlpha;
bool m_isContextLost;
bool m_contextRestorable;
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698