Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: src/gpu/GrSWMaskHelper.cpp

Issue 811373002: Remove GrCoordTransform::kPosition_CoordSet (Closed) Base URL: https://skia.googlesource.com/skia.git@jgm
Patch Set: fix warning Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrSWMaskHelper.cpp
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index b6a7059192176adff5413dffcad2fe9ba5d12d4d..61e7f1f960ecceb901b75099141ec7f3bcae64f2 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -361,20 +361,18 @@ void GrSWMaskHelper::DrawToTargetWithPathMask(GrTexture* texture,
SK_Scalar1 * rect.fRight,
SK_Scalar1 * rect.fBottom);
- // We want to use device coords to compute the texture coordinates. We set our matrix to be
- // equal to the view matrix followed by a translation so that the top-left of the device bounds
- // maps to 0,0, and then a scaling matrix to normalized coords. We apply this matrix to the
- // vertex positions rather than local coords.
+ // 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;
maskMatrix.setIDiv(texture->width(), texture->height());
maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop));
- maskMatrix.preConcat(drawState->getViewMatrix());
drawState->addCoverageProcessor(
GrSimpleTextureEffect::Create(texture,
maskMatrix,
GrTextureParams::kNone_FilterMode,
- kPosition_GrCoordSet))->unref();
+ kDevice_GrCoordSet))->unref();
target->drawSimpleRect(drawState, color, dstRect);
}
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698