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

Unified Diff: src/core/SkPaintPriv.cpp

Issue 289723002: update NeedsDeepCopy (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPaintPriv.cpp
diff --git a/src/core/SkPaintPriv.cpp b/src/core/SkPaintPriv.cpp
index 8021f7df83f030b58601a7d8de48dd25d0cd8350..a8b52e998c7b789e3ad5fe426d71888e04321924 100644
--- a/src/core/SkPaintPriv.cpp
+++ b/src/core/SkPaintPriv.cpp
@@ -79,20 +79,19 @@ bool isPaintOpaque(const SkPaint* paint,
bool NeedsDeepCopy(const SkPaint& paint) {
/*
- * These fields are known to be immutable, and so can be shallow-copied
+ * The types below are not yet immutable/reentrant-safe, and so we return
+ * true if instances of them are present in the paint.
*
- * getTypeface()
- * getAnnotation()
- * paint.getColorFilter()
- * getXfermode()
- * getPathEffect()
- * getMaskFilter()
+ * Eventually we hope this list will be empty, and we can always return
+ * false.
*/
-
- return paint.getShader() ||
+ return false
+#ifdef SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX
+ || paint.getShader()
+#endif
#ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API
- paint.getRasterizer() ||
+ || paint.getRasterizer()
#endif
- paint.getLooper() || // needs to hide its addLayer...
- paint.getImageFilter();
+ || paint.getImageFilter()
+ ;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698