From a7d61a65ee7f7b2a2f6fce59faaca0762cef4c67 Mon Sep 17 00:00:00 2001 From: Joe Gregorio Date: Tue, 17 Jan 2017 19:20:54 +0000 Subject: 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 Reviewed-by: Joe Gregorio --- gm/texdata.cpp | 5 ++++- gm/texturedomaineffect.cpp | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'gm') 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 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(), -- cgit v1.2.3