aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-07-25 14:11:29 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-25 14:11:45 +0000
commit6af2a668f4343bc0db87d27d28b0edc60f5cd6b9 (patch)
tree1c3272b266424d38a8b68850ac81806987276bc0 /tests
parent0e05a823f6ff6e9d799172f002e77ab9f2015f0f (diff)
Revert "Reduce dependence on GrSurface's origin field (take 2)"
This reverts commit 22115b4fc6ab169d45a1cfb65dae2dc7e544c80a. Reason for revert: GrAHardwareBufferImageGenerator.cpp Original change's description: > 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> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I6dc77f02eed3073317128c48f0b426b81926787f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/26480 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, 9 insertions, 10 deletions
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index f1d6a269bc..d67f1038fc 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), desc.fOrigin);
+ auto proxy = GrSurfaceProxy::MakeWrapped(std::move(tex));
auto texCtx = context->contextPriv().makeWrappedSurfaceContext(
std::move(proxy), nullptr);
SkImageInfo info = SkImageInfo::Make(
diff --git a/tests/ProxyConversionTest.cpp b/tests/ProxyConversionTest.cpp
index 23ca695d42..513b680045 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), desc.fOrigin);
+ return GrSurfaceProxy::MakeWrapped(std::move(defaultFBO));
}
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), desc.fOrigin);
+ return GrSurfaceProxy::MakeWrapped(std::move(tex));
}
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), desc.fOrigin);
+ return GrSurfaceProxy::MakeWrapped(std::move(tex));
}
// Test converting between RenderTargetProxies and TextureProxies for wrapped
diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp
index 3648122652..a30766b838 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), desc.fOrigin);
+ return GrSurfaceProxy::MakeWrapped(std::move(tex));
}
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ProxyRefTest, reporter, ctxInfo) {
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index 547d3b2ce3..dd1f4cbe43 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -236,8 +236,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
sk_sp<GrRenderTarget> defaultFBO(
provider->wrapBackendRenderTarget(backendRT, origin));
- sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(defaultFBO,
- origin));
+ sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(defaultFBO));
check_surface(reporter, sProxy.get(), origin,
kWidthHeight, kWidthHeight, config,
defaultFBO->uniqueID(), SkBudgeted::kNo);
@@ -253,7 +252,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, origin));
+ sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(rt));
check_surface(reporter, sProxy.get(), origin,
kWidthHeight, kWidthHeight, config,
rt->uniqueID(), budgeted);
@@ -268,7 +267,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
tex = provider->createTexture(desc, budgeted);
}
- sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(tex, origin));
+ sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(tex));
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 4aa055d431..96db1f7722 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), p.fOrigin);
+ return GrSurfaceProxy::MakeWrapped(std::move(tex));
}
static void cleanup_backend(GrContext* context, GrBackendObject* backendTexHandle) {