aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/TransferPixelsTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/TransferPixelsTest.cpp')
-rwxr-xr-xtests/TransferPixelsTest.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/TransferPixelsTest.cpp b/tests/TransferPixelsTest.cpp
index ce8d1edc4f..ee1a233d63 100755
--- a/tests/TransferPixelsTest.cpp
+++ b/tests/TransferPixelsTest.cpp
@@ -69,7 +69,6 @@ void basic_transfer_test(skiatest::Reporter* reporter, GrContext* context, GrPix
}
auto resourceProvider = context->contextPriv().resourceProvider();
- GrGpu* gpu = context->contextPriv().getGpu();
// set up the data
const int kTextureWidth = 16;
@@ -111,13 +110,13 @@ void basic_transfer_test(skiatest::Reporter* reporter, GrContext* context, GrPix
// transfer full data
bool result;
- result = gpu->transferPixels(tex.get(), 0, 0, kTextureWidth, kTextureHeight,
- config, buffer.get(), 0, rowBytes);
+ result = context->getGpu()->transferPixels(tex.get(), 0, 0, kTextureWidth, kTextureHeight,
+ config, buffer.get(), 0, rowBytes);
REPORTER_ASSERT(reporter, result);
memset(dstBuffer.get(), 0xCDCD, size);
- result = gpu->readPixels(tex.get(), origin, 0, 0, kTextureWidth, kTextureHeight,
- config, dstBuffer.get(), rowBytes);
+ result = context->getGpu()->readPixels(tex.get(), origin, 0, 0, kTextureWidth, kTextureHeight,
+ config, dstBuffer.get(), rowBytes);
if (result) {
REPORTER_ASSERT(reporter, does_full_buffer_contain_correct_values(srcBuffer,
dstBuffer,
@@ -143,13 +142,13 @@ void basic_transfer_test(skiatest::Reporter* reporter, GrContext* context, GrPix
buffer->unmap();
size_t offset = sizeof(GrColor)*(kTop*kBufferWidth + kLeft);
- result = gpu->transferPixels(tex.get(), kLeft, kTop, kWidth, kHeight, config,
- buffer.get(), offset, rowBytes);
+ result = context->getGpu()->transferPixels(tex.get(), kLeft, kTop, kWidth, kHeight, config,
+ buffer.get(), offset, rowBytes);
REPORTER_ASSERT(reporter, result);
memset(dstBuffer.get(), 0xCDCD, size);
- result = gpu->readPixels(tex.get(), origin, 0, 0, kTextureWidth, kTextureHeight,
- config, dstBuffer.get(), rowBytes);
+ result = context->getGpu()->readPixels(tex.get(), origin, 0, 0, kTextureWidth, kTextureHeight,
+ config, dstBuffer.get(), rowBytes);
if (result) {
REPORTER_ASSERT(reporter, does_full_buffer_contain_correct_values(srcBuffer,
dstBuffer,