Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Unified Diff: include/core/SkPath.h

Issue 677463002: Set temporary paths volatile so we don't cache them. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkDraw.cpp » ('j') | src/core/SkPath.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | src/core/SkDraw.cpp » ('j') | src/core/SkPath.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698