diff options
author | Robert Phillips <robertphillips@google.com> | 2017-06-30 08:40:28 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-30 15:29:50 +0000 |
commit | 1c9686bfa5e2de3e06f1d1b9691105afb6659e85 (patch) | |
tree | b292d1f6b0b7d023d9a5122d22b0f4fc92dfc7d3 /src/gpu/effects/GrSRGBEffect.cpp | |
parent | 95581bbba1d696f14de45e00dd0c09119377027f (diff) |
Speculative "fix" for crash in analyzeProcessors
From the bug it looks like a null fragment processors may be getting into the processor set. This CL tries to plug any gaps in our fragmentProcessor handling.
The only real substantive part to this CL is the addition of some "if (!fp) { return nullptr; }" blocks.
Everything else is just to add chokepoints for processor allocation.
Bug: 734076
Change-Id: I4952b1a05bc6690d5aa09de977fa6dc54c80338a
Reviewed-on: https://skia-review.googlesource.com/21267
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/effects/GrSRGBEffect.cpp')
-rw-r--r-- | src/gpu/effects/GrSRGBEffect.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gpu/effects/GrSRGBEffect.cpp b/src/gpu/effects/GrSRGBEffect.cpp index 7ca79c7452..c9a48b3d84 100644 --- a/src/gpu/effects/GrSRGBEffect.cpp +++ b/src/gpu/effects/GrSRGBEffect.cpp @@ -107,7 +107,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSRGBEffect); #if GR_TEST_UTILS sk_sp<GrFragmentProcessor> GrSRGBEffect::TestCreate(GrProcessorTestData* d) { Mode testMode = static_cast<Mode>(d->fRandom->nextRangeU(0, 1)); - return sk_sp<GrFragmentProcessor>(new GrSRGBEffect(testMode)); + return GrSRGBEffect::Make(testMode); } #endif @@ -122,6 +122,3 @@ GrGLSLFragmentProcessor* GrSRGBEffect::onCreateGLSLInstance() const { return new GrGLSRGBEffect(); } -sk_sp<GrFragmentProcessor> GrSRGBEffect::Make(Mode mode) { - return sk_sp<GrFragmentProcessor>(new GrSRGBEffect(mode)); -} |