diff options
author | Brian Salomon <bsalomon@google.com> | 2017-03-03 15:07:55 -0500 |
---|---|---|
committer | Brian Salomon <bsalomon@google.com> | 2017-03-04 01:14:29 +0000 |
commit | ae9718f1d40556ed5a49e616dbe54087f4d0d546 (patch) | |
tree | aba99e6e4a7331f1eb98a336181e0e40acb73e87 /src | |
parent | e370cbe2bf26a785017d0bef3fa3d0c170e5080a (diff) |
Remove unnecessary use of GrGLIRect in GrRenderTargetOpList
Change-Id: I47f3930a142f8958c03906a46a7245b5af8e80f7
Reviewed-on: https://skia-review.googlesource.com/9227
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrRenderTargetOpList.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp index 51f55d9dfc..6edab11beb 100644 --- a/src/gpu/GrRenderTargetOpList.cpp +++ b/src/gpu/GrRenderTargetOpList.cpp @@ -23,7 +23,6 @@ #include "GrStencilAttachment.h" #include "GrSurfacePriv.h" #include "GrTexture.h" -#include "gl/GrGLRenderTarget.h" #include "SkStrokeRec.h" @@ -300,20 +299,13 @@ void GrRenderTargetOpList::addDrawOp(const GrPipelineBuilder& pipelineBuilder, args.fCaps = this->caps(); args.fAnalysis = &analysis; if (analysis.usesPLSDstRead()) { - GrGLIRect viewport; - viewport.fLeft = 0; - viewport.fBottom = 0; - viewport.fWidth = renderTargetContext->width(); - viewport.fHeight = renderTargetContext->height(); + int width = renderTargetContext->width(); + int height = renderTargetContext->height(); SkIRect ibounds; - ibounds.fLeft = SkTPin(SkScalarFloorToInt(op->bounds().fLeft), viewport.fLeft, - viewport.fWidth); - ibounds.fTop = SkTPin(SkScalarFloorToInt(op->bounds().fTop), viewport.fBottom, - viewport.fHeight); - ibounds.fRight = SkTPin(SkScalarCeilToInt(op->bounds().fRight), viewport.fLeft, - viewport.fWidth); - ibounds.fBottom = SkTPin(SkScalarCeilToInt(op->bounds().fBottom), viewport.fBottom, - viewport.fHeight); + ibounds.fLeft = SkTPin(SkScalarFloorToInt(op->bounds().fLeft), 0, width); + ibounds.fTop = SkTPin(SkScalarFloorToInt(op->bounds().fTop), 0, height); + ibounds.fRight = SkTPin(SkScalarCeilToInt(op->bounds().fRight), 0, width); + ibounds.fBottom = SkTPin(SkScalarCeilToInt(op->bounds().fBottom), 0, height); if (!appliedClip.addScissor(ibounds)) { return; } |