diff options
author | Mike Reed <reed@google.com> | 2017-06-08 12:45:52 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-08 18:23:19 +0000 |
commit | 70bc94f273224ed0755ae11dc479c57ff37e0436 (patch) | |
tree | f25bc45fd7e882d3baee4b3640b82b881d45ae23 /src/shaders/SkPictureShader.cpp | |
parent | bc2cdd154bf5a031ca9d3a530123d9f7a4c0925d (diff) |
Bump min picture to 7+ months ago
Delete lots of support code, including need for SkXfermode objects
which are no longer used anywhere else.
Bug: skia:
Change-Id: Id6b7ef0f529691041ff2b206c35e336e8a4c974d
Reviewed-on: https://skia-review.googlesource.com/19059
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/shaders/SkPictureShader.cpp')
-rw-r--r-- | src/shaders/SkPictureShader.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/shaders/SkPictureShader.cpp b/src/shaders/SkPictureShader.cpp index d6ee941251..4bef53da75 100644 --- a/src/shaders/SkPictureShader.cpp +++ b/src/shaders/SkPictureShader.cpp @@ -137,18 +137,12 @@ sk_sp<SkFlattenable> SkPictureShader::CreateProc(SkReadBuffer& buffer) { sk_sp<SkPicture> picture; if (buffer.isCrossProcess() && SkPicture::PictureIOSecurityPrecautionsEnabled()) { - if (buffer.isVersionLT(SkReadBuffer::kPictureShaderHasPictureBool_Version)) { - // Older code blindly serialized pictures. We don't trust them. - buffer.validate(false); - return nullptr; - } // Newer code won't serialize pictures in disallow-cross-process-picture mode. // Assert that they didn't serialize anything except a false here. buffer.validate(!buffer.readBool()); } else { - // Old code always serialized the picture. New code writes a 'true' first if it did. - if (buffer.isVersionLT(SkReadBuffer::kPictureShaderHasPictureBool_Version) || - buffer.readBool()) { + bool didSerialize = buffer.readBool(); + if (didSerialize) { picture = SkPicture::MakeFromBuffer(buffer); } } |