diff options
author | Joe Gregorio <jcgregorio@google.com> | 2017-01-17 19:20:54 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-17 19:50:55 +0000 |
commit | a7d61a65ee7f7b2a2f6fce59faaca0762cef4c67 (patch) | |
tree | d57ac40a8e4df0c9e04ddd575c67e9c30362471f /src/gpu/GrSWMaskHelper.cpp | |
parent | 94bd50cc5575b90eb60234399d69905b8651c27e (diff) |
Revert "Continue making Ganesh use absolute texture coordinates"
This reverts commit 4493a9dc9df8cf306a974bde7e0e9c5470ebcdc9.
Reason for revert: Continuing failures https://luci-milo.appspot.com/swarming/task/33c693c3539a1410
Change-Id: Id371d6df6a875a5f6872f4ebd91b08a354d949de
Reviewed-on: https://skia-review.googlesource.com/7125
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Diffstat (limited to 'src/gpu/GrSWMaskHelper.cpp')
-rw-r--r-- | src/gpu/GrSWMaskHelper.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp index 5dbbaf0c61..240f9f9c3c 100644 --- a/src/gpu/GrSWMaskHelper.cpp +++ b/src/gpu/GrSWMaskHelper.cpp @@ -176,8 +176,10 @@ void GrSWMaskHelper::DrawToTargetWithShapeMask(GrTexture* texture, // We use device coords to compute the texture coordinates. We take the device coords and apply // a translation so that the top-left of the device bounds maps to 0,0, and then a scaling // matrix to normalized coords. - SkMatrix maskMatrix = SkMatrix::MakeTrans(SkIntToScalar(-textureOriginInDeviceSpace.fX), - SkIntToScalar(-textureOriginInDeviceSpace.fY)); + SkMatrix maskMatrix; + maskMatrix.setIDiv(texture->width(), texture->height()); + maskMatrix.preTranslate(SkIntToScalar(-textureOriginInDeviceSpace.fX), + SkIntToScalar(-textureOriginInDeviceSpace.fY)); maskMatrix.preConcat(viewMatrix); std::unique_ptr<GrDrawOp> op = GrRectOpFactory::MakeNonAAFill(paint.getColor(), SkMatrix::I(), dstRect, nullptr, &invert); |