aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPaintPriv.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-14 16:32:31 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-14 16:32:31 +0000
commit9cb4283401f0acf117de523b4b676eca293d7143 (patch)
treed11ada9a7f5f4d012b48f00dbf5de68aeb8b3330 /src/core/SkPaintPriv.cpp
parent5fd3768ab47ff52c892fdd0dfeecf8d01412bf43 (diff)
update NeedsDeepCopy
BUG=skia: R=mtklein@google.com, scroggo@google.com, dominikg@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/289723002 git-svn-id: http://skia.googlecode.com/svn/trunk@14736 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPaintPriv.cpp')
-rw-r--r--src/core/SkPaintPriv.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/core/SkPaintPriv.cpp b/src/core/SkPaintPriv.cpp
index 8021f7df83..a8b52e998c 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()
+ ;
}