summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhendrikw <hendrikw@chromium.org>2015-06-18 21:14:40 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-19 04:15:12 +0000
commitb49aafb7e5a58579a3ce0b3c7b37a60aebef8c55 (patch)
tree684ee1484932847c76503d0d51fb62eacb5c4a2b
parent104c3fddab6ecb5a3306f9dfbb1f8fdcef122339 (diff)
downloadchromium_src-b49aafb7e5a58579a3ce0b3c7b37a60aebef8c55.zip
chromium_src-b49aafb7e5a58579a3ce0b3c7b37a60aebef8c55.tar.gz
chromium_src-b49aafb7e5a58579a3ce0b3c7b37a60aebef8c55.tar.bz2
gpu: Disable SkPicture security precautions in skia_runner
SkPicture file IO has code to prevent certain code from being called when used cross processes, as in chrome. The default is to enable these precautions. skia_runner, which uses chrome's skia lib, requires them to be disabled to correctly read the skp files (skia_runner is not shipped, and is single process). Review URL: https://codereview.chromium.org/1183933006 Cr-Commit-Position: refs/heads/master@{#335205}
-rw-r--r--gpu/skia_runner/skia_runner.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gpu/skia_runner/skia_runner.cc b/gpu/skia_runner/skia_runner.cc
index 304b2ab..83262f7 100644
--- a/gpu/skia_runner/skia_runner.cc
+++ b/gpu/skia_runner/skia_runner.cc
@@ -209,6 +209,9 @@ int main(int argc, char** argv) {
}
}
+ // Disable the security precautions to ensure we correctly read the picture.
+ SkPicture::SetPictureIOSecurityPrecautionsEnabled_Dangerous(false);
+
for (auto file_pair : files) {
skia::RefPtr<SkPicture> picture = ReadPicture(file_pair.first);
if (!picture) {