diff options
Diffstat (limited to 'gm')
-rw-r--r-- | gm/texdata.cpp | 5 | ||||
-rw-r--r-- | gm/texturedomaineffect.cpp | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gm/texdata.cpp b/gm/texdata.cpp index 372ff5dc11..8520d28b12 100644 --- a/gm/texdata.cpp +++ b/gm/texdata.cpp @@ -97,7 +97,10 @@ DEF_SIMPLE_GM_BG(texdata, canvas, 2 * S, 2 * S, SK_ColorBLACK) { } else { vm.reset(); } - paint.addColorTextureProcessor(texture, nullptr, vm); + SkMatrix tm; + tm = vm; + tm.postIDiv(2*S, 2*S); + paint.addColorTextureProcessor(texture, nullptr, tm); 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 cc3e1c9e3d..32042aab84 100644 --- a/gm/texturedomaineffect.cpp +++ b/gm/texturedomaineffect.cpp @@ -89,10 +89,11 @@ protected: } SkTArray<SkMatrix> textureMatrices; - 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); + 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); const SkIRect texelDomains[] = { fBmp.bounds(), |