aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-03-07 14:39:54 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-07 20:00:20 +0000
commit7578f3ecddf62853005782ea7414466d6a62db21 (patch)
tree87fca02e056baeaf7dd6a41d7328264cd0662a39 /tests
parentaf4adefd8ccb46c148f7a16b54afc226b86c0fcc (diff)
Rename wrap backend tex/rt methods on GrProxyProvider
This makes them more consistent with similar methods on GrResourceProvider. Change-Id: Ice7e5dbe8100481781015b386445e9b7101bd75e Reviewed-on: https://skia-review.googlesource.com/112821 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/GrPorterDuffTest.cpp4
-rw-r--r--tests/ProxyConversionTest.cpp2
-rw-r--r--tests/ProxyTest.cpp28
-rw-r--r--tests/RectangleTextureTest.cpp3
-rw-r--r--tests/ResourceAllocatorTest.cpp2
-rw-r--r--tests/TextureProxyTest.cpp2
6 files changed, 18 insertions, 23 deletions
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp
index 7e938c7761..f0c157f149 100644
--- a/tests/GrPorterDuffTest.cpp
+++ b/tests/GrPorterDuffTest.cpp
@@ -1075,8 +1075,8 @@ DEF_GPUTEST(PorterDuffNoDualSourceBlending, reporter, options) {
GrXferProcessor::DstProxy fakeDstProxy;
{
- sk_sp<GrTextureProxy> proxy = proxyProvider->createWrappedTextureProxy(
- backendTex, kTopLeft_GrSurfaceOrigin);
+ sk_sp<GrTextureProxy> proxy =
+ proxyProvider->wrapBackendTexture(backendTex, kTopLeft_GrSurfaceOrigin);
fakeDstProxy.setProxy(std::move(proxy));
}
diff --git a/tests/ProxyConversionTest.cpp b/tests/ProxyConversionTest.cpp
index a4c4a60449..3ebfbf4778 100644
--- a/tests/ProxyConversionTest.cpp
+++ b/tests/ProxyConversionTest.cpp
@@ -28,7 +28,7 @@ static sk_sp<GrSurfaceProxy> make_wrapped_FBO0(GrProxyProvider* provider,
GrBackendRenderTarget backendRT(desc.fWidth, desc.fHeight, desc.fSampleCnt, 8,
desc.fConfig, fboInfo);
- return provider->createWrappedRenderTargetProxy(backendRT, origin);
+ return provider->wrapBackendRenderTarget(backendRT, origin);
}
static sk_sp<GrSurfaceProxy> make_wrapped_offscreen_rt(GrProxyProvider* provider,
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index f346f876bd..9d52281763 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -207,15 +207,15 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
}
// External on-screen render target.
- // Tests createWrappedRenderTargetProxy with a GrBackendRenderTarget
+ // Tests wrapBackendRenderTarget with a GrBackendRenderTarget
{
GrGLFramebufferInfo fboInfo;
fboInfo.fFBOID = 0;
GrBackendRenderTarget backendRT(kWidthHeight, kWidthHeight, numSamples, 8,
config, fboInfo);
- sk_sp<GrSurfaceProxy> sProxy(proxyProvider->createWrappedRenderTargetProxy(
- backendRT, origin));
+ sk_sp<GrSurfaceProxy> sProxy(
+ proxyProvider->wrapBackendRenderTarget(backendRT, origin));
check_surface(reporter, sProxy.get(), origin,
kWidthHeight, kWidthHeight,
backendRT.testingOnly_getPixelConfig(), SkBudgeted::kNo);
@@ -224,15 +224,14 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
supportedNumSamples, SkBackingFit::kExact, 0);
}
- // Tests createWrappedRenderTargetProxy with a GrBackendTexture
+ // Tests wrapBackendRenderTarget with a GrBackendTexture
{
GrBackendTexture backendTex =
gpu->createTestingOnlyBackendTexture(nullptr, kWidthHeight,
kWidthHeight, colorType, true,
GrMipMapped::kNo);
- sk_sp<GrSurfaceProxy> sProxy =
- proxyProvider->createWrappedRenderTargetProxy(backendTex, origin,
- supportedNumSamples);
+ sk_sp<GrSurfaceProxy> sProxy = proxyProvider->wrapBackendTextureAsRenderTarget(
+ backendTex, origin, supportedNumSamples);
if (!sProxy) {
gpu->deleteTestingOnlyBackendTexture(&backendTex);
continue; // This can fail on Mesa
@@ -249,16 +248,15 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
gpu->deleteTestingOnlyBackendTexture(&backendTex);
}
- // Tests createWrappedTextureProxy that is only renderable
+ // Tests wrapBackendTexture that is only renderable
{
GrBackendTexture backendTex =
gpu->createTestingOnlyBackendTexture(nullptr, kWidthHeight,
kWidthHeight, colorType, true,
GrMipMapped::kNo);
- sk_sp<GrSurfaceProxy> sProxy =
- proxyProvider->createWrappedTextureProxy(backendTex, origin,
- supportedNumSamples);
+ sk_sp<GrSurfaceProxy> sProxy = proxyProvider->wrapRenderableBackendTexture(
+ backendTex, origin, supportedNumSamples);
if (!sProxy) {
gpu->deleteTestingOnlyBackendTexture(&backendTex);
continue; // This can fail on Mesa
@@ -275,7 +273,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
gpu->deleteTestingOnlyBackendTexture(&backendTex);
}
- // Tests createWrappedTextureProxy that is only textureable
+ // Tests wrapBackendTexture that is only textureable
{
// Internal offscreen texture
GrBackendTexture backendTex =
@@ -283,10 +281,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) {
kWidthHeight, colorType, false,
GrMipMapped::kNo);
- sk_sp<GrSurfaceProxy> sProxy =
- proxyProvider->createWrappedTextureProxy(backendTex, origin,
- kBorrow_GrWrapOwnership,
- nullptr, nullptr);
+ sk_sp<GrSurfaceProxy> sProxy = proxyProvider->wrapBackendTexture(
+ backendTex, origin, kBorrow_GrWrapOwnership, nullptr, nullptr);
if (!sProxy) {
gpu->deleteTestingOnlyBackendTexture(&backendTex);
continue;
diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp
index 08cedd0be3..e7512fb6bb 100644
--- a/tests/RectangleTextureTest.cpp
+++ b/tests/RectangleTextureTest.cpp
@@ -127,8 +127,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(RectangleTexture, reporter, ctxInfo) {
}
}
- sk_sp<GrTextureProxy> rectProxy = proxyProvider->createWrappedTextureProxy(
- rectangleTex, origin);
+ sk_sp<GrTextureProxy> rectProxy = proxyProvider->wrapBackendTexture(rectangleTex, origin);
if (!rectProxy) {
ERRORF(reporter, "Error creating proxy for rectangle texture.");
diff --git a/tests/ResourceAllocatorTest.cpp b/tests/ResourceAllocatorTest.cpp
index f424463321..7647e89687 100644
--- a/tests/ResourceAllocatorTest.cpp
+++ b/tests/ResourceAllocatorTest.cpp
@@ -51,7 +51,7 @@ static sk_sp<GrSurfaceProxy> make_backend(GrContext* context, const ProxyParams&
p.fConfig, false,
GrMipMapped::kNo);
- return proxyProvider->createWrappedTextureProxy(*backendTex, p.fOrigin);
+ return proxyProvider->wrapBackendTexture(*backendTex, p.fOrigin);
}
static void cleanup_backend(GrContext* context, GrBackendTexture* backendTex) {
diff --git a/tests/TextureProxyTest.cpp b/tests/TextureProxyTest.cpp
index 0c93977a74..5745e4ebd4 100644
--- a/tests/TextureProxyTest.cpp
+++ b/tests/TextureProxyTest.cpp
@@ -109,7 +109,7 @@ static sk_sp<GrTextureProxy> create_wrapped_backend(GrContext* context, SkBackin
GrBackendTexture backendTex = (*backingSurface)->getBackendTexture();
- return proxyProvider->createWrappedTextureProxy(backendTex, kBottomLeft_GrSurfaceOrigin);
+ return proxyProvider->wrapBackendTexture(backendTex, kBottomLeft_GrSurfaceOrigin);
}