diff options
author | Eric Karl <ericrk@chromium.org> | 2017-04-04 13:42:10 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-04 22:51:53 +0000 |
commit | 72e551e637c5f3047a963f9c5bd873d7f04f8b5a (patch) | |
tree | 9494639fd4fc61754ac2eb977cde7df2cd67994d /src | |
parent | fc0e96e35f4d63b10a753ef4a7538d653592f976 (diff) |
Support Canvas Clip on Blit Framebuffer
The previous fix to blit framebuffer didn't take cases where
the canvas had a clip applied into account. Fix and update
the unit test to add this case.
Bug: 658277
Change-Id: If3a9d2c8ddf955164cf529c9d6036618f957e426
Reviewed-on: https://skia-review.googlesource.com/11300
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrRenderTargetContext.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp index af17e5b8e2..8ef09a4a3c 100644 --- a/src/gpu/GrRenderTargetContext.cpp +++ b/src/gpu/GrRenderTargetContext.cpp @@ -1746,15 +1746,15 @@ void GrRenderTargetContext::setupDstTexture(GrRenderTarget* rt, const GrClip& cl } } - SkIRect copyRect; - clip.getConservativeBounds(rt->width(), rt->height(), ©Rect); + SkIRect copyRect = SkIRect::MakeWH(rt->width(), rt->height()); - SkIRect drawIBounds; SkIRect clippedRect; + clip.getConservativeBounds(rt->width(), rt->height(), &clippedRect); + SkIRect drawIBounds; opBounds.roundOut(&drawIBounds); // Cover up for any precision issues by outsetting the op bounds a pixel in each direction. drawIBounds.outset(1, 1); - if (!clippedRect.intersect(copyRect, drawIBounds)) { + if (!clippedRect.intersect(drawIBounds)) { #ifdef SK_DEBUG GrCapsDebugf(this->caps(), "Missed an early reject. " "Bailing on draw from setupDstTexture.\n"); |