desc.fConfig = kRGBA_8888_GrPixelConfig;
GrAutoScratchTexture dst(context, desc);
+ if (NULL == dst.texture()) {
+ return false;
+ }
GrContext::AutoMatrix am;
am.setIdentity(context);
GrContext::AutoRenderTarget art(context, dst.texture()->asRenderTarget());
desc.fConfig = kSkia8888_GrPixelConfig;
GrAutoScratchTexture ast(context, desc);
+ if (NULL == ast.texture()) {
+ return false;
+ }
SkAutoTUnref<GrTexture> dst(ast.detach());
GrContext::AutoRenderTarget art(context, dst->asRenderTarget());
if (radius.fWidth > 0) {
GrAutoScratchTexture ast(context, desc);
+ if (NULL == ast.texture()) {
+ return false;
+ }
GrContext::AutoRenderTarget art(context, ast.texture()->asRenderTarget());
apply_morphology_pass(context, src, srcRect, dstRect, radius.fWidth,
morphType, Gr1DKernelEffect::kX_Direction);
}
if (radius.fHeight > 0) {
GrAutoScratchTexture ast(context, desc);
+ if (NULL == ast.texture()) {
+ return false;
+ }
GrContext::AutoRenderTarget art(context, ast.texture()->asRenderTarget());
apply_morphology_pass(context, src, srcRect, dstRect, radius.fHeight,
morphType, Gr1DKernelEffect::kY_Direction);
desc.fConfig = kSkia8888_GrPixelConfig;
GrAutoScratchTexture ast(context, desc);
+ if (NULL == ast.texture()) {
+ return false;
+ }
SkAutoTUnref<GrTexture> dst(ast.detach());
GrContext::AutoRenderTarget art(context, dst->asRenderTarget());