Chromium Code Reviews| Index: include/core/SkPath.h |
| diff --git a/include/core/SkPath.h b/include/core/SkPath.h |
| index 57da95973cda896d00d39a064c4e72f9a1143a6a..d22f21c2f54582b621120fc3fb15f774321c1ad6 100644 |
| --- a/include/core/SkPath.h |
| +++ b/include/core/SkPath.h |
| @@ -185,6 +185,23 @@ public: |
| return fPathRef->isFinite(); |
| } |
| + /** Returns true if the path is volatile (i.e. should not be cached by devices.) |
| + */ |
| + bool isVolatile() const { |
| + return fIsVolatile; |
| + } |
| + |
| + /** Specify whether this path is volatile. Paths are not volatile by |
| + default. Temporary paths that are discarded after use should be |
|
bsalomon
2014/10/23 17:54:08
discarded or modified?
jvanverth1
2014/10/23 20:06:18
Done.
|
| + marked as volatile. This provides a hint to the device that the path |
| + should not be cached. Providing this hint when appropriate can |
| + improve performance by avoiding unnecessary overhead and resource |
| + consumption on the device. |
| + */ |
| + void setIsVolatile(bool isVolatile) { |
| + fIsVolatile = isVolatile; |
| + } |
| + |
| /** Test a line for zero length |
| @return true if the line is of zero length; otherwise false. |
| @@ -984,6 +1001,7 @@ private: |
| uint8_t fFillType; |
| mutable uint8_t fConvexity; |
| mutable uint8_t fDirection; |
| + mutable SkBool8 fIsVolatile; |
| #ifdef SK_BUILD_FOR_ANDROID |
| const SkPath* fSourcePath; |
| #endif |