Remove option to make GrCoordTransforms apply to device positions.
Adds a device space texture decal effect to use for clipping.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2870
Change-Id: Ifcc7617ea87f5a86e301995cba9dfc30a4b0e2c5
Reviewed-on: https://skia-review.googlesource.com/2870
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index df23039..4ee8203 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -1605,7 +1605,7 @@
fPremulType = kAfterInterp_PremulType;
}
- fCoordTransform.reset(kCoordSet, *args.fMatrix);
+ fCoordTransform.reset(*args.fMatrix);
break;
case kTexture_ColorType:
@@ -1648,8 +1648,7 @@
fRow = fAtlas->lockRow(bitmap);
if (-1 != fRow) {
fYCoord = fAtlas->getYOffset(fRow)+SK_ScalarHalf*fAtlas->getNormalizedTexelHeight();
- fCoordTransform.reset(kCoordSet, *args.fMatrix, fAtlas->getTexture(),
- params.filterMode());
+ fCoordTransform.reset(*args.fMatrix, fAtlas->getTexture(), params.filterMode());
fTextureAccess.reset(fAtlas->getTexture(), params);
} else {
SkAutoTUnref<GrTexture> texture(
@@ -1658,7 +1657,7 @@
if (!texture) {
return;
}
- fCoordTransform.reset(kCoordSet, *args.fMatrix, texture, params.filterMode());
+ fCoordTransform.reset(*args.fMatrix, texture, params.filterMode());
fTextureAccess.reset(texture, params);
fYCoord = SK_ScalarHalf;
}