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

Unified Diff: src/core/SkPicture.cpp

Issue 1183853003: skia: Add runtime option to disable picture IO security precautions (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: rename stuff Created 5 years, 6 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 | « include/core/SkPicture.h ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicture.cpp
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 6c1f6cb759ee5f9338877e2bf3ea5bb37dc03ae8..1a8de22907b40822f2911cfa66f8e7a991103fce 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -13,6 +13,13 @@
#include "SkPictureRecord.h"
#include "SkPictureRecorder.h"
+#if defined(SK_DISALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS) || \
+ defined(SK_ENABLE_PICTURE_IO_SECURITY_PRECAUTIONS)
+static bool g_AllPictureIOSecurityPrecautionsEnabled = true;
+#else
+static bool g_AllPictureIOSecurityPrecautionsEnabled = false;
+#endif
+
DECLARE_SKMESSAGEBUS_MESSAGE(SkPicture::DeletionMessage);
/* SkPicture impl. This handles generic responsibilities like unique IDs and serialization. */
@@ -196,3 +203,12 @@ bool SkPicture::suitableForGpuRasterization(GrContext*, const char** whyNot) con
}
return true;
}
+
+// Global setting to disable security precautions for serialization.
+void SkPicture::SetPictureIOSecurityPrecautionsEnabled_Dangerous(bool set) {
+ g_AllPictureIOSecurityPrecautionsEnabled = set;
+}
+
+bool SkPicture::PictureIOSecurityPrecautionsEnabled() {
+ return g_AllPictureIOSecurityPrecautionsEnabled;
+}
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698