aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/shaders/SkPictureShader.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-01-03 11:32:13 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-03 18:13:39 +0000
commitd1c65d6708de536a5971575809d7172fa4f54b37 (patch)
tree33853164c19762d89e3a1ce7e1a48f81ac77d9a0 /src/shaders/SkPictureShader.cpp
parent314d7c267f968643966d0e9678db9ef4e53456a4 (diff)
remove unneeded readbuffer flags
- buffers are always 'cross-process' - readbuffer is always validating Bug:796107 Change-Id: I59614e9c29490c0b029c60d2aafe2806671bc9e1 Reviewed-on: https://skia-review.googlesource.com/90560 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/shaders/SkPictureShader.cpp')
-rw-r--r--src/shaders/SkPictureShader.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/shaders/SkPictureShader.cpp b/src/shaders/SkPictureShader.cpp
index 677c0e15dc..40724357e7 100644
--- a/src/shaders/SkPictureShader.cpp
+++ b/src/shaders/SkPictureShader.cpp
@@ -162,9 +162,7 @@ sk_sp<SkFlattenable> SkPictureShader::CreateProc(SkReadBuffer& buffer) {
sk_sp<SkPicture> picture;
- if (buffer.isCrossProcess() && SkPicture::PictureIOSecurityPrecautionsEnabled()) {
- // Newer code won't serialize pictures in disallow-cross-process-picture mode.
- // Assert that they didn't serialize anything except a false here.
+ if (SkPicture::PictureIOSecurityPrecautionsEnabled()) {
buffer.validate(!buffer.readBool());
} else {
bool didSerialize = buffer.readBool();
@@ -183,7 +181,7 @@ void SkPictureShader::flatten(SkWriteBuffer& buffer) const {
// The deserialization code won't trust that our serialized picture is safe to deserialize.
// So write a 'false' telling it that we're not serializing a picture.
- if (buffer.isCrossProcess() && SkPicture::PictureIOSecurityPrecautionsEnabled()) {
+ if (SkPicture::PictureIOSecurityPrecautionsEnabled()) {
buffer.writeBool(false);
} else {
buffer.writeBool(true);