aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ProxyTest.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-03-02 18:18:38 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-03 12:35:27 +0000
commit2f49314227053dd5acc011e04681faee05c5e0ff (patch)
tree2669e6d4567687bffea21da299834125124b831d /tests/ProxyTest.cpp
parent3b4c22d3731813d2d0f2ae0e68180b6eeacea7a2 (diff)
Make GrSurface::MakeDeferred return sk_sp<GrTextureProxy>
This should make upcoming changes less tedious Change-Id: I313ae9df724f109a64cf5708a974e8bfeb963025 Reviewed-on: https://skia-review.googlesource.com/9183 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/ProxyTest.cpp')
-rw-r--r--tests/ProxyTest.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index ac3275209f..367ec0ce64 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -140,25 +140,25 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DeferredProxyTest, reporter, ctxInfo) {
tex.reset(provider->createTexture(desc, budgeted));
}
- sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeDeferred(
+ sk_sp<GrTextureProxy> proxy(GrSurfaceProxy::MakeDeferred(
provider,
caps, desc,
fit, budgeted));
- REPORTER_ASSERT(reporter, SkToBool(tex) == SkToBool(sProxy));
- if (sProxy) {
- REPORTER_ASSERT(reporter, sProxy->asRenderTargetProxy());
+ REPORTER_ASSERT(reporter, SkToBool(tex) == SkToBool(proxy));
+ if (proxy) {
+ REPORTER_ASSERT(reporter, proxy->asRenderTargetProxy());
// This forces the proxy to compute and cache its
// pre-instantiation size guess. Later, when it is actually
// instantiated, it checks that the instantiated size is <= to
// the pre-computation. If the proxy never computed its
// pre-instantiation size then the check is skipped.
- sProxy->gpuMemorySize();
+ proxy->gpuMemorySize();
- check_surface(reporter, sProxy.get(), origin,
+ check_surface(reporter, proxy.get(), origin,
widthHeight, widthHeight, config,
kInvalidResourceID, budgeted);
check_rendertarget(reporter, caps, provider,
- sProxy->asRenderTargetProxy(),
+ proxy->asRenderTargetProxy(),
SkTMin(numSamples, caps.maxSampleCount()),
fit, caps.maxWindowRectangles(), false);
}
@@ -174,24 +174,24 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DeferredProxyTest, reporter, ctxInfo) {
tex.reset(provider->createTexture(desc, budgeted));
}
- sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeDeferred(provider,
+ sk_sp<GrTextureProxy> proxy(GrSurfaceProxy::MakeDeferred(provider,
caps,
desc,
fit,
budgeted));
- REPORTER_ASSERT(reporter, SkToBool(tex) == SkToBool(sProxy));
- if (sProxy) {
+ REPORTER_ASSERT(reporter, SkToBool(tex) == SkToBool(proxy));
+ if (proxy) {
// This forces the proxy to compute and cache its pre-instantiation
// size guess. Later, when it is actually instantiated, it checks
// that the instantiated size is <= to the pre-computation.
// If the proxy never computed its pre-instantiation size then the
// check is skipped.
- sProxy->gpuMemorySize();
+ proxy->gpuMemorySize();
- check_surface(reporter, sProxy.get(), origin,
+ check_surface(reporter, proxy.get(), origin,
widthHeight, widthHeight, config,
kInvalidResourceID, budgeted);
- check_texture(reporter, provider, sProxy->asTextureProxy(),
+ check_texture(reporter, provider, proxy->asTextureProxy(),
fit, false);
}
}