aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-07-25 10:16:35 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-25 17:34:29 +0000
commit066f020bb6cb9dbb12b977fcddd93982201777fe (patch)
tree792f93eeb1503885417576d7b3f8d5627b6357af /tests
parente4832b287c6d0ae4a4a193f0144736f7eb6a824d (diff)
Reduce dependence on GrSurface's origin field (take 3)
TBR=bsalomon@google.com Change-Id: I8c95c6774897dbd87e3c5c87d92f75c5b64d4e76 Reviewed-on: https://skia-review.googlesource.com/26424 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: 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) {