summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/skia/src/core/SkPaintPriv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/skia/src/core/SkPaintPriv.cpp')
-rw-r--r--chromium/third_party/skia/src/core/SkPaintPriv.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/chromium/third_party/skia/src/core/SkPaintPriv.cpp b/chromium/third_party/skia/src/core/SkPaintPriv.cpp
index ce053890192..a8b52e998c7 100644
--- a/chromium/third_party/skia/src/core/SkPaintPriv.cpp
+++ b/chromium/third_party/skia/src/core/SkPaintPriv.cpp
@@ -76,3 +76,22 @@ bool isPaintOpaque(const SkPaint* paint,
}
return false;
}
+
+bool NeedsDeepCopy(const SkPaint& paint) {
+ /*
+ * The types below are not yet immutable/reentrant-safe, and so we return
+ * true if instances of them are present in the paint.
+ *
+ * Eventually we hope this list will be empty, and we can always return
+ * false.
+ */
+ return false
+#ifdef SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX
+ || paint.getShader()
+#endif
+#ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API
+ || paint.getRasterizer()
+#endif
+ || paint.getImageFilter()
+ ;
+}