Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1522)

Unified Diff: tests/VkWrapTests.cpp

Issue 2448593002: Remove SkAutoTUnref and SkAutoTDelete from public includes. (Closed)
Patch Set: And Vulcan. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ResourceCacheTest.cpp ('k') | tools/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/VkWrapTests.cpp
diff --git a/tests/VkWrapTests.cpp b/tests/VkWrapTests.cpp
index b3456c28ba9245b15d19c6b4ae9f8ee3d6a1186d..58c4b356c62230e065a3393eb75d2e3439cd67dd 100644
--- a/tests/VkWrapTests.cpp
+++ b/tests/VkWrapTests.cpp
@@ -39,9 +39,8 @@ void wrap_tex_test(skiatest::Reporter* reporter, GrContext* context) {
desc.fWidth = kW;
desc.fHeight = kH;
desc.fTextureHandle = backendObj;
- GrTexture* tex = gpu->wrapBackendTexture(desc, kBorrow_GrWrapOwnership);
+ sk_sp<GrTexture> tex = gpu->wrapBackendTexture(desc, kBorrow_GrWrapOwnership);
REPORTER_ASSERT(reporter, tex);
- tex->unref();
// image is null
GrVkImageInfo backendCopy = *backendTex;
@@ -64,7 +63,6 @@ void wrap_tex_test(skiatest::Reporter* reporter, GrContext* context) {
backendCopy.fAlloc = backendTex->fAlloc;
tex = gpu->wrapBackendTexture(desc, kAdopt_GrWrapOwnership);
REPORTER_ASSERT(reporter, tex);
- tex->unref();
gpu->deleteTestingOnlyBackendTexture(backendObj, true);
}
@@ -85,9 +83,8 @@ void wrap_rt_test(skiatest::Reporter* reporter, GrContext* context) {
desc.fSampleCnt = 0;
desc.fStencilBits = 0;
desc.fRenderTargetHandle = backendObj;
- GrRenderTarget* rt = gpu->wrapBackendRenderTarget(desc, kBorrow_GrWrapOwnership);
+ sk_sp<GrRenderTarget> rt = gpu->wrapBackendRenderTarget(desc, kBorrow_GrWrapOwnership);
REPORTER_ASSERT(reporter, rt);
- rt->unref();
// image is null
GrVkImageInfo backendCopy = *backendTex;
@@ -112,7 +109,6 @@ void wrap_rt_test(skiatest::Reporter* reporter, GrContext* context) {
backendCopy.fAlloc = backendTex->fAlloc;
rt = gpu->wrapBackendRenderTarget(desc, kAdopt_GrWrapOwnership);
REPORTER_ASSERT(reporter, rt);
- rt->unref();
gpu->deleteTestingOnlyBackendTexture(backendObj, true);
}
@@ -131,9 +127,8 @@ void wrap_trt_test(skiatest::Reporter* reporter, GrContext* context) {
desc.fWidth = kW;
desc.fHeight = kH;
desc.fTextureHandle = backendObj;
- GrTexture* tex = gpu->wrapBackendTexture(desc, kBorrow_GrWrapOwnership);
+ sk_sp<GrTexture> tex = gpu->wrapBackendTexture(desc, kBorrow_GrWrapOwnership);
REPORTER_ASSERT(reporter, tex);
- tex->unref();
// image is null
GrVkImageInfo backendCopy = *backendTex;
@@ -156,7 +151,6 @@ void wrap_trt_test(skiatest::Reporter* reporter, GrContext* context) {
backendCopy.fAlloc = backendTex->fAlloc;
tex = gpu->wrapBackendTexture(desc, kAdopt_GrWrapOwnership);
REPORTER_ASSERT(reporter, tex);
- tex->unref();
gpu->deleteTestingOnlyBackendTexture(backendObj, true);
}
« no previous file with comments | « tests/ResourceCacheTest.cpp ('k') | tools/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698