| 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; }
|
|
|