aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/FloatingPointTextureTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FloatingPointTextureTest.cpp')
-rw-r--r--tests/FloatingPointTextureTest.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/FloatingPointTextureTest.cpp b/tests/FloatingPointTextureTest.cpp
index 5adc2e7892..4214e4eebf 100644
--- a/tests/FloatingPointTextureTest.cpp
+++ b/tests/FloatingPointTextureTest.cpp
@@ -17,7 +17,6 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
-#include "GrContextPriv.h"
#include "GrResourceProvider.h"
#include "GrTexture.h"
#include "SkHalf.h"
@@ -52,18 +51,14 @@ void runFPTest(skiatest::Reporter* reporter, GrContext* context,
desc.fHeight = DEV_H;
desc.fConfig = config;
desc.fOrigin = 0 == origin ? kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin;
- sk_sp<GrTextureProxy> fpProxy = GrSurfaceProxy::MakeDeferred(context->resourceProvider(),
- desc, SkBudgeted::kNo,
- controlPixelData.begin(), 0);
+ sk_sp<GrTexture> fpTexture(context->resourceProvider()->createTexture(
+ desc, SkBudgeted::kNo, controlPixelData.begin(), 0));
// Floating point textures are NOT supported everywhere
- if (!fpProxy) {
+ if (nullptr == fpTexture) {
continue;
}
- bool result = context->contextPriv().readSurfacePixels(fpProxy.get(), nullptr,
- 0, 0, DEV_W, DEV_H,
- desc.fConfig, nullptr,
- readBuffer.begin(), 0);
- REPORTER_ASSERT(reporter, result);
+ REPORTER_ASSERT(reporter,
+ fpTexture->readPixels(0, 0, DEV_W, DEV_H, desc.fConfig, readBuffer.begin(), 0));
REPORTER_ASSERT(reporter,
0 == memcmp(readBuffer.begin(), controlPixelData.begin(), readBuffer.bytes()));
}