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>
This commit is contained in:
Robert Phillips 2017-02-02 10:06:18 -05:00 committed by Skia Commit-Bot
parent 529bcd6db7
commit 41511604ae

View File

@ -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;