aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/FloatingPointTextureTest.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-04-18 07:48:58 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-18 12:29:07 +0000
commitf41c22fca369af85b06ff34bae8a41c6672aff43 (patch)
tree2fe43da6efca51b046b285019429362656d8cf1c /tests/FloatingPointTextureTest.cpp
parent7efa0476306588dae9e3149f72f7018f74714cd4 (diff)
Pass GrSurfaceContext into read/writeSurfacePixels
This is mainly so writeSurfacePixels can have continuity of surfaceContext when it draws. Change-Id: I34f1dc5c4c3dcfa7bf91aa3ad72b7a48ed9de1a9 Reviewed-on: https://skia-review.googlesource.com/13595 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tests/FloatingPointTextureTest.cpp')
-rw-r--r--tests/FloatingPointTextureTest.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/FloatingPointTextureTest.cpp b/tests/FloatingPointTextureTest.cpp
index 5adc2e7892..e092921cbb 100644
--- a/tests/FloatingPointTextureTest.cpp
+++ b/tests/FloatingPointTextureTest.cpp
@@ -59,7 +59,12 @@ void runFPTest(skiatest::Reporter* reporter, GrContext* context,
if (!fpProxy) {
continue;
}
- bool result = context->contextPriv().readSurfacePixels(fpProxy.get(), nullptr,
+
+ sk_sp<GrSurfaceContext> sContext = context->contextPriv().makeWrappedSurfaceContext(
+ std::move(fpProxy), nullptr);
+ REPORTER_ASSERT(reporter, sContext);
+
+ bool result = context->contextPriv().readSurfacePixels(sContext.get(),
0, 0, DEV_W, DEV_H,
desc.fConfig, nullptr,
readBuffer.begin(), 0);