diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp index 14fa6fb2ef..9d8f69fbbc 100644 --- a/src/gpu/GrRenderTargetContext.cpp +++ b/src/gpu/GrRenderTargetContext.cpp @@ -791,9 +791,17 @@ void GrRenderTargetContext::drawTextureAffine(const GrClip& clip, sk_spwidth(), this->height(), clip, viewMatrix, &clippedDstRect, + &clippedSrcRect)) { + return; + } + bool allowSRGB = SkToBool(this->getColorSpace()); - this->addDrawOp(clip, GrTextureOp::Make(std::move(proxy), filter, color, srcRect, dstRect, - viewMatrix, std::move(colorSpaceXform), allowSRGB)); + this->addDrawOp(clip, GrTextureOp::Make(std::move(proxy), filter, color, clippedSrcRect, + clippedDstRect, viewMatrix, std::move(colorSpaceXform), + allowSRGB)); } void GrRenderTargetContext::fillRectWithLocalMatrix(const GrClip& clip,