Chromium Code Reviews| Index: Source/platform/graphics/GraphicsContext.h |
| diff --git a/Source/platform/graphics/GraphicsContext.h b/Source/platform/graphics/GraphicsContext.h |
| index 7257345af0877984fcc9a48a932d04b526926614..a237fcfa11d14c91d6a78f54800bee5ae3db5581 100644 |
| --- a/Source/platform/graphics/GraphicsContext.h |
| +++ b/Source/platform/graphics/GraphicsContext.h |
| @@ -310,10 +310,15 @@ public: |
| void clip(const FloatRect& rect) { clipRect(rect); } |
| void clipRoundedRect(const RoundedRect&, SkRegion::Op = SkRegion::kIntersect_Op); |
| void clipOut(const IntRect& rect) { clipRect(rect, NotAntiAliased, SkRegion::kDifference_Op); } |
| + void clipOut(const Path&); |
| void clipOutRoundedRect(const RoundedRect&); |
| void clipPath(const Path&, WindRule = RULE_EVENODD); |
| void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias = true); |
| void clipRect(const SkRect&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op); |
| + // This clip function is used only by <canvas> code. It allows |
| + // implementations to handle clipping on the canvas differently since |
| + // the discipline is different. |
| + void canvasClip(const Path&, WindRule = RULE_EVENODD); |
| void drawText(const Font&, const TextRunPaintInfo&, const FloatPoint&); |
| void drawEmphasisMarks(const Font&, const TextRunPaintInfo&, const AtomicString& mark, const FloatPoint&); |
| @@ -335,9 +340,10 @@ public: |
| void endCull(); |
| // Instead of being dispatched to the active canvas, draw commands following beginRecording() |
| - // are stored in a display list that can be replayed at a later time. |
| - void beginRecording(const FloatRect& bounds); |
| - PassRefPtr<DisplayList> endRecording(); |
| + // are stored in a display list that can be replayed at a later time. Pass in the bounding |
| + // rectangle for the content in the list. |
| + PassRefPtr<DisplayList> beginRecording(const FloatRect&, uint32_t = 0); |
| + void endRecording(); |
|
chrishtr
2014/09/05 01:15:34
after endRecording() is called, the GraphicsContex
Stephen Chennney
2014/09/05 13:50:50
We can just assert that there is no picture before
|
| bool hasShadow() const; |
| void setShadow(const FloatSize& offset, float blur, const Color&, |
| @@ -364,12 +370,6 @@ public: |
| typedef unsigned Edges; |
| void drawInnerShadow(const RoundedRect&, const Color& shadowColor, const IntSize shadowOffset, int shadowBlur, int shadowSpread, Edges clippedEdges = NoEdge); |
| - // This clip function is used only by <canvas> code. It allows |
| - // implementations to handle clipping on the canvas differently since |
| - // the discipline is different. |
| - void canvasClip(const Path&, WindRule = RULE_EVENODD); |
| - void clipOut(const Path&); |
| - |
| // ---------- Transformation methods ----------------- |
| // Note that the getCTM method returns only the current transform from Blink's perspective, |
| // which is not the final transform used to place content on screen. It cannot be relied upon |
| @@ -448,7 +448,6 @@ private: |
| void drawFocusRingPath(const SkPath&, const Color&, int width); |
| void drawFocusRingRect(const SkRect&, const Color&, int width); |
| - |
| // SkCanvas wrappers. |
| void clipPath(const SkPath&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op); |
| void clipRRect(const SkRRect&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op); |