Index: tests/RectangleTextureTest.cpp |
diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp |
index 2fa51e2ba22f8db4f29487f51f36ee08b764672d..51f7b44cff8f9f3843ddb8932d1b1e06dcb3db7c 100644 |
--- a/tests/RectangleTextureTest.cpp |
+++ b/tests/RectangleTextureTest.cpp |
@@ -89,8 +89,11 @@ static void test_copy_surface_dst(skiatest::Reporter* reporter, GrContext* conte |
static void test_clear(skiatest::Reporter* reporter, GrContext* context, |
GrTexture* rectangleTexture) { |
if (rectangleTexture->asRenderTarget()) { |
+ int w = rectangleTexture->width(); |
+ int h = rectangleTexture->height(); |
+ |
sk_sp<GrDrawContext> dc( |
- context->drawContext(sk_ref_sp(rectangleTexture->asRenderTarget()))); |
+ context->drawContext(w, h, sk_ref_sp(rectangleTexture->asRenderTarget()))); |
if (!dc) { |
ERRORF(reporter, "Could not get GrDrawContext for rectangle texture."); |
return; |
@@ -100,8 +103,6 @@ static void test_clear(skiatest::Reporter* reporter, GrContext* context, |
GrColor color0 = GrColorPackRGBA(0xA, 0xB, 0xC, 0xD); |
dc->clear(nullptr, color0, false); |
- int w = rectangleTexture->width(); |
- int h = rectangleTexture->height(); |
int pixelCnt = w * h; |
SkAutoTMalloc<uint32_t> expectedPixels(pixelCnt); |