Chromium Code Reviews| Index: experimental/svg/model/SkSVGNode.h |
| diff --git a/experimental/svg/model/SkSVGNode.h b/experimental/svg/model/SkSVGNode.h |
| index 168b03c73bc2e152bdcbe8e9d6eacb46d258998f..17fbd766f4b3224912739f6aafcfdab62a9c6a05 100644 |
| --- a/experimental/svg/model/SkSVGNode.h |
| +++ b/experimental/svg/model/SkSVGNode.h |
| @@ -31,18 +31,24 @@ public: |
| virtual void appendChild(sk_sp<SkSVGNode>) = 0; |
| - void render(SkCanvas*, const SkSVGRenderContext&) const; |
| + void render(const SkSVGRenderContext&) const; |
| void setAttribute(SkSVGAttribute, const SkSVGValue&); |
| protected: |
| SkSVGNode(SkSVGTag); |
| - virtual void onRender(SkCanvas*, const SkSVGRenderContext&) const = 0; |
| + // Called before onRender(), to apply local attributes to the context. Unlike onRender(), |
| + // onPrepareToRender() bubbles up the inheritance chain: overriders should always call |
| + // INHERITED::onPrepareToRender(), unless they intend to short-circuit rendering |
| + // (return false). |
| + // Implementations are expected to return true if rendering is to continue, or false if |
|
robertphillips
2016/08/08 17:56:10
diabled ?
f(malita)
2016/08/08 18:12:03
Done.
|
| + // the node/subtree rendering is diabled. |
| + virtual bool onPrepareToRender(SkSVGRenderContext*) const; |
| - virtual void onSetAttribute(SkSVGAttribute, const SkSVGValue&); |
| + virtual void onRender(const SkSVGRenderContext&) const = 0; |
| - virtual const SkMatrix& onLocalMatrix() const; |
| + virtual void onSetAttribute(SkSVGAttribute, const SkSVGValue&); |
| private: |
| SkSVGTag fTag; |