aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/TestUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/TestUtils.cpp')
-rw-r--r--tests/TestUtils.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/TestUtils.cpp b/tests/TestUtils.cpp
index 463a8e9e34..7878233698 100644
--- a/tests/TestUtils.cpp
+++ b/tests/TestUtils.cpp
@@ -81,10 +81,11 @@ void test_copy_from_surface(skiatest::Reporter* reporter, GrContext* context,
}
copyDstDesc.fFlags = flags;
- copyDstDesc.fOrigin = (kNone_GrSurfaceFlags == flags) ? kTopLeft_GrSurfaceOrigin
- : kBottomLeft_GrSurfaceOrigin;
+ auto origin = (kNone_GrSurfaceFlags == flags) ? kTopLeft_GrSurfaceOrigin
+ : kBottomLeft_GrSurfaceOrigin;
- sk_sp<GrSurfaceContext> dstContext(GrSurfaceProxy::TestCopy(context, copyDstDesc, proxy));
+ sk_sp<GrSurfaceContext> dstContext(
+ GrSurfaceProxy::TestCopy(context, copyDstDesc, origin, proxy));
test_read_pixels(reporter, dstContext.get(), expectedPixelValues, testName);
}
@@ -109,11 +110,11 @@ void test_copy_to_surface(skiatest::Reporter* reporter, GrProxyProvider* proxyPr
for (auto flags : { kNone_GrSurfaceFlags, kRenderTarget_GrSurfaceFlag }) {
copySrcDesc.fFlags = flags;
- copySrcDesc.fOrigin = (kNone_GrSurfaceFlags == flags) ? kTopLeft_GrSurfaceOrigin
- : kBottomLeft_GrSurfaceOrigin;
+ auto origin = (kNone_GrSurfaceFlags == flags) ? kTopLeft_GrSurfaceOrigin
+ : kBottomLeft_GrSurfaceOrigin;
- sk_sp<GrTextureProxy> src = proxyProvider->createTextureProxy(copySrcDesc, SkBudgeted::kYes,
- pixels.get(), 0);
+ sk_sp<GrTextureProxy> src = proxyProvider->createTextureProxy(
+ copySrcDesc, origin, SkBudgeted::kYes, pixels.get(), 0);
dstContext->copy(src.get());