aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-07-25 08:37:16 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-25 14:00:43 +0000
commit22115b4fc6ab169d45a1cfb65dae2dc7e544c80a (patch)
tree2f71b5d3593b3ebaf8c11ebda91f42f195d7a277 /tests
parent866124894209437085bca26228a342e8a4a077ce (diff)
Reduce dependence on GrSurface's origin field (take 2)
TBR=bsalomon@google.com Change-Id: Ia238fc66b0fe10a3626c7967b2ac1f1a4bf4cd71 Reviewed-on: https://skia-review.googlesource.com/25800 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/GrSurfaceTest.cpp2
-rw-r--r--tests/ProxyConversionTest.cpp6
-rw-r--r--tests/ProxyRefTest.cpp2
-rw-r--r--tests/ProxyTest.cpp7
-rw-r--r--tests/ResourceAllocatorTest.cpp2
5 files changed, 10 insertions, 9 deletions
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index d67f1038fc..f1d6a269bc 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -184,7 +184,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(InitialTextureClear, reporter, context_info)
if (!tex) {
continue;
}
- auto proxy = GrSurfaceProxy::MakeWrapped(std::move(tex));
+ auto proxy = GrSurfaceProxy::MakeWrapped(std::move(tex), desc.fOrigin);
auto texCtx = context->contextPriv().makeWrappedSurfaceContext(
std::move(proxy), nullptr);
SkImageInfo info = SkImageInfo::Make(
diff --git a/tests/ProxyConversionTest.cpp b/tests/ProxyConversionTest.cpp
index 513b680045..23ca695d42 100644
--- a/tests/ProxyConversionTest.cpp
+++ b/tests/ProxyConversionTest.cpp
@@ -29,7 +29,7 @@ static sk_sp<GrSurfaceProxy> make_wrapped_FBO0(GrResourceProvider* provider,
sk_sp<GrRenderTarget> defaultFBO(provider->wrapBackendRenderTarget(backendRT, desc.fOrigin));
SkASSERT(!defaultFBO->asTexture());
- return GrSurfaceProxy::MakeWrapped(std::move(defaultFBO));
+ return GrSurfaceProxy::MakeWrapped(std::move(defaultFBO), desc.fOrigin);
}
static sk_sp<GrSurfaceProxy> make_wrapped_offscreen_rt(GrResourceProvider* provider,
@@ -40,7 +40,7 @@ static sk_sp<GrSurfaceProxy> make_wrapped_offscreen_rt(GrResourceProvider* provi
sk_sp<GrTexture> tex(provider->createTexture(desc, budgeted));
- return GrSurfaceProxy::MakeWrapped(std::move(tex));
+ return GrSurfaceProxy::MakeWrapped(std::move(tex), desc.fOrigin);
}
static sk_sp<GrSurfaceProxy> make_wrapped_texture(GrResourceProvider* provider,
@@ -48,7 +48,7 @@ static sk_sp<GrSurfaceProxy> make_wrapped_texture(GrResourceProvider* provider,
SkBudgeted budgeted) {
sk_sp<GrTexture> tex(provider->createTexture(desc, budgeted));
- return GrSurfaceProxy::MakeWrapped(std::move(tex));
+ return GrSurfaceProxy::MakeWrapped(std::move(tex), desc.fOrigin);
}
// Test converting between RenderTargetProxies and TextureProxies for wrapped
diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp
index a30766b838..3648122652 100644
--- a/tests/ProxyRefTest.cpp
+++ b/tests/ProxyRefTest.cpp
@@ -87,7 +87,7 @@ static sk_sp<GrTextureProxy> make_wrapped(GrContext* context) {
sk_sp<GrTexture> tex(context->resourceProvider()->createTexture(desc, SkBudgeted::kNo));
- return GrSurfaceProxy::MakeWrapped(std::move(tex));
+ return GrSurfaceProxy::MakeWrapped(std::move(tex), desc.fOrigin);
}
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ProxyRefTest, reporter, ctxInfo) {
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index dd1f4cbe43..547d3b2ce3 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -236,7 +236,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
sk_sp<GrRenderTarget> defaultFBO(
provider->wrapBackendRenderTarget(backendRT, origin));
- sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(defaultFBO));
+ sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(defaultFBO,
+ origin));
check_surface(reporter, sProxy.get(), origin,
kWidthHeight, kWidthHeight, config,
defaultFBO->uniqueID(), SkBudgeted::kNo);
@@ -252,7 +253,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
tex = provider->createTexture(desc, budgeted);
sk_sp<GrRenderTarget> rt(sk_ref_sp(tex->asRenderTarget()));
- sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(rt));
+ sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(rt, origin));
check_surface(reporter, sProxy.get(), origin,
kWidthHeight, kWidthHeight, config,
rt->uniqueID(), budgeted);
@@ -267,7 +268,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
tex = provider->createTexture(desc, budgeted);
}
- sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(tex));
+ sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(tex, origin));
check_surface(reporter, sProxy.get(), origin,
kWidthHeight, kWidthHeight, config, tex->uniqueID(), budgeted);
check_texture(reporter, provider, sProxy->asTextureProxy(),
diff --git a/tests/ResourceAllocatorTest.cpp b/tests/ResourceAllocatorTest.cpp
index 96db1f7722..4aa055d431 100644
--- a/tests/ResourceAllocatorTest.cpp
+++ b/tests/ResourceAllocatorTest.cpp
@@ -56,7 +56,7 @@ static sk_sp<GrSurfaceProxy> make_backend(GrContext* context, const ProxyParams&
sk_sp<GrSurface> tex = context->resourceProvider()->wrapBackendTexture(
backendTex, p.fOrigin,
kBorrow_GrWrapOwnership);
- return GrSurfaceProxy::MakeWrapped(std::move(tex));
+ return GrSurfaceProxy::MakeWrapped(std::move(tex), p.fOrigin);
}
static void cleanup_backend(GrContext* context, GrBackendObject* backendTexHandle) {