| 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;
|
| +}
|
|
|