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

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

Issue 907453003: Move overdraw tracking code from GraphicsContext to CanvasRenderingContext2D (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test copypasta Created 5 years, 10 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/canvas/CanvasImageSource.h ('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 87cdbe8bc6b82c543a05017b624f44f0a8d201a2..fe5636ab2562dc80ee67b7a47c039f8012b65513 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.h
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.h
@@ -163,6 +163,7 @@ public:
void drawImage(const CanvasImageSourceUnion&, float x, float y, ExceptionState&);
void drawImage(const CanvasImageSourceUnion&, float x, float y, float width, float height, ExceptionState&);
void drawImage(const CanvasImageSourceUnion&, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionState&);
+ void drawImage(CanvasImageSource*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionState&);
PassRefPtrWillBeRawPtr<CanvasGradient> createLinearGradient(float x0, float y0, float x1, float y1);
PassRefPtrWillBeRawPtr<CanvasGradient> createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1, ExceptionState&);
@@ -219,6 +220,8 @@ public:
virtual void trace(Visitor*) override;
private:
+ friend class CanvasRenderingContext2DAutoRestoreSkCanvas;
+
enum Direction {
DirectionInherit,
DirectionRTL,
@@ -275,6 +278,7 @@ private:
bool m_realizedFont;
bool m_hasClip;
+ bool m_hasComplexClip;
ClipList m_clipList;
};
@@ -306,8 +310,6 @@ private:
void applyStrokePattern();
void applyFillPattern();
- void drawImageInternal(CanvasImageSource*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionState&);
-
void fillInternal(const Path&, const String& windingRuleString);
void strokeInternal(const Path&);
void clipInternal(const Path&, const String& windingRuleString);
@@ -337,6 +339,19 @@ private:
void validateStateStack();
+ enum DrawType {
+ ClipFill, // Fill that is already known to cover the current clip
+ UntransformedUnclippedFill
+ };
+
+ enum ImageType {
+ NoImage,
+ OpaqueImage,
+ NonOpaqueImage
+ };
+
+ void checkOverdraw(const SkRect&, const SkPaint*, ImageType, DrawType);
+
virtual bool is2d() const override { return true; }
virtual bool isAccelerated() const override;
virtual bool hasAlpha() const override { return m_hasAlpha; }
« no previous file with comments | « Source/core/html/canvas/CanvasImageSource.h ('k') | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698