aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-01-23 15:17:41 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-23 22:26:50 +0000
commit757c15402ddb3dd03f0b5f208d288164c7317499 (patch)
tree077eae5e217511ce7104bad42091232859cb13d8 /src
parent29b3434e48ca41672266ac40f5b9e8f8a0405cb5 (diff)
Remove superfluous SkReadBuffer validity checks
The pattern is to create the spurious object & delete it later Change-Id: I435e2872127e02c241b5dd27cd965f3c7047a77a Reviewed-on: https://skia-review.googlesource.com/98783 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/SkBlurImageFilter.cpp4
-rw-r--r--src/effects/SkLightingImageFilter.cpp8
2 files changed, 0 insertions, 12 deletions
diff --git a/src/core/SkBlurImageFilter.cpp b/src/core/SkBlurImageFilter.cpp
index 556508ee27..e81a11eba0 100644
--- a/src/core/SkBlurImageFilter.cpp
+++ b/src/core/SkBlurImageFilter.cpp
@@ -122,10 +122,6 @@ sk_sp<SkFlattenable> SkBlurImageFilterImpl::CreateProc(SkReadBuffer& buffer) {
static_assert(SkBlurImageFilter::kLast_TileMode == 2, "CreateProc");
- if (!buffer.validate(safe)) {
- return nullptr;
- }
-
return SkBlurImageFilter::Make(
sigmaX, sigmaY, common.getInput(0), &common.cropRect(), tileMode);
}
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index 5008aa5d31..f861a5b9ac 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -1288,10 +1288,6 @@ sk_sp<SkFlattenable> SkDiffuseLightingImageFilter::CreateProc(SkReadBuffer& buff
SkScalar surfaceScale = buffer.readScalar();
SkScalar kd = buffer.readScalar();
- if (!buffer.isValid()) {
- return nullptr;
- }
-
return Make(std::move(light), surfaceScale, kd, common.getInput(0), &common.cropRect());
}
@@ -1445,10 +1441,6 @@ sk_sp<SkFlattenable> SkSpecularLightingImageFilter::CreateProc(SkReadBuffer& buf
SkScalar ks = buffer.readScalar();
SkScalar shine = buffer.readScalar();
- if (!buffer.isValid()) {
- return nullptr;
- }
-
return Make(std::move(light), surfaceScale, ks, shine, common.getInput(0),
&common.cropRect());
}