diff options
author | Robert Phillips <robertphillips@google.com> | 2017-02-02 10:06:18 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-02 15:48:05 +0000 |
commit | 41511604ae0aadddef0c4defeb73dcbe4408ff66 (patch) | |
tree | 4cb5cfe4d125609877167a2629109334d57b79bd /src/core/SkGpuBlurUtils.cpp | |
parent | 529bcd6db7ebfa3a9e4898696cfc869839045176 (diff) |
Force instantiation in GaussianBlur to hopefully prevent (and diagnose) Chrome crash
BUG=687174
Change-Id: Ieb9930feca9abad9220a1a099e7dd247e6eff70e
Reviewed-on: https://skia-review.googlesource.com/7920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/core/SkGpuBlurUtils.cpp')
-rw-r--r-- | src/core/SkGpuBlurUtils.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/SkGpuBlurUtils.cpp b/src/core/SkGpuBlurUtils.cpp index c14a55c111..c052c50dcb 100644 --- a/src/core/SkGpuBlurUtils.cpp +++ b/src/core/SkGpuBlurUtils.cpp @@ -194,6 +194,17 @@ sk_sp<GrRenderTargetContext> GaussianBlur(GrContext* context, float sigmaY, SkBackingFit fit) { SkASSERT(context); + + { + // Chrome is crashing with proxies when they need to be instantiated. + // Force an instantiation here (where, in olden days, we used to require a GrTexture) + // to see if the input is already un-instantiable. + GrTexture* temp = srcProxy->instantiate(context->textureProvider()); + if (!temp) { + return nullptr; + } + } + SkIRect clearRect; int scaleFactorX, radiusX; int scaleFactorY, radiusY; |