Chromium Code Reviews| 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..ed2523964fe9c183ad93d75c3cfae32a23ecfe8a 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&); |
|
dshwang
2015/02/11 08:37:52
why does it become public? I guess it's for unitte
Justin Novosad
2015/02/11 18:59:54
Yes it is for testing purposes. The problem is tha
|
| 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&); |
| @@ -275,6 +276,7 @@ private: |
| bool m_realizedFont; |
| bool m_hasClip; |
| + bool m_hasComplexClip; |
| ClipList m_clipList; |
| }; |
| @@ -306,8 +308,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 +337,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; } |