aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/RectangleTextureTest.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-01-17 11:52:21 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-17 17:28:58 +0000
commit4493a9dc9df8cf306a974bde7e0e9c5470ebcdc9 (patch)
treecc6315711d78a8192d16ae4251b5bb683993b1fd /tests/RectangleTextureTest.cpp
parent4075ec80e1c36e414e57746c772298be3b49a74e (diff)
Continue making Ganesh use absolute texture coordinates
The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix) Change-Id: Ibac3a540fcb1967ceef571157d41c1937acfadf8 Reviewed-on: https://skia-review.googlesource.com/6977 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/RectangleTextureTest.cpp')
-rw-r--r--tests/RectangleTextureTest.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp
index a0c5409142..6d075df203 100644
--- a/tests/RectangleTextureTest.cpp
+++ b/tests/RectangleTextureTest.cpp
@@ -107,14 +107,12 @@ static void test_basic_draw(skiatest::Reporter* reporter, GrContext* context,
context->makeRenderTargetContext(SkBackingFit::kExact, rectangleTexture->width(),
rectangleTexture->height(), rectangleTexture->config(),
nullptr));
- SkMatrix m;
- m.setIDiv(rectangleTexture->width(), rectangleTexture->height());
for (auto filter : {GrSamplerParams::kNone_FilterMode,
GrSamplerParams::kBilerp_FilterMode,
GrSamplerParams::kMipMap_FilterMode}) {
rtContext->clear(nullptr, 0xDDCCBBAA, true);
- sk_sp<GrFragmentProcessor> fp(GrSimpleTextureEffect::Make(rectangleTexture,
- nullptr, m, filter));
+ sk_sp<GrFragmentProcessor> fp(GrSimpleTextureEffect::Make(rectangleTexture, nullptr,
+ SkMatrix::I(), filter));
GrPaint paint;
paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
paint.addColorFragmentProcessor(std::move(fp));