aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
Diffstat (limited to 'gm')
-rw-r--r--gm/texdata.cpp5
-rw-r--r--gm/texturedomaineffect.cpp9
2 files changed, 5 insertions, 9 deletions
diff --git a/gm/texdata.cpp b/gm/texdata.cpp
index 8520d28b12..372ff5dc11 100644
--- a/gm/texdata.cpp
+++ b/gm/texdata.cpp
@@ -97,10 +97,7 @@ DEF_SIMPLE_GM_BG(texdata, canvas, 2 * S, 2 * S, SK_ColorBLACK) {
} else {
vm.reset();
}
- SkMatrix tm;
- tm = vm;
- tm.postIDiv(2*S, 2*S);
- paint.addColorTextureProcessor(texture, nullptr, tm);
+ paint.addColorTextureProcessor(texture, nullptr, vm);
renderTargetContext->drawRect(clip, GrPaint(paint), GrAA::kNo, vm,
SkRect::MakeWH(2 * S, 2 * S));
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index 32042aab84..cc3e1c9e3d 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -89,11 +89,10 @@ protected:
}
SkTArray<SkMatrix> textureMatrices;
- textureMatrices.push_back().setIDiv(texture->width(), texture->height());
- textureMatrices.push_back() = textureMatrices[0];
- textureMatrices.back().postScale(1.5f, 0.85f);
- textureMatrices.push_back() = textureMatrices[0];
- textureMatrices.back().preRotate(45.f, texture->width() / 2.f, texture->height() / 2.f);
+ textureMatrices.push_back() = SkMatrix::I();
+ textureMatrices.push_back() = SkMatrix::MakeScale(1.5f, 0.85f);
+ textureMatrices.push_back();
+ textureMatrices.back().setRotate(45.f, texture->width() / 2.f, texture->height() / 2.f);
const SkIRect texelDomains[] = {
fBmp.bounds(),