Remove SkAutoTUnref and SkAutoTDelete from public includes.
This also makes the required changed to src, tests, and tools. The few
public APIs modified by this change appear to be unused outside of Skia.
Removing these from the public API makes it easier to ensure users are
no longer using them.
This also updates GrGpu::wrapBackendXXX and the
::onWrapBackendXXX methods to clarify ownership.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2448593002
Review-Url: https://codereview.chromium.org/2448593002
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index b6ca406..5a69e53 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -54,10 +54,10 @@
backendDesc.fHeight = 256;
backendDesc.fSampleCnt = 0;
backendDesc.fTextureHandle = backendTex;
- GrSurface* texRT2 = context->textureProvider()->wrapBackendTexture(
+ sk_sp<GrSurface> texRT2 = context->textureProvider()->wrapBackendTexture(
backendDesc, kBorrow_GrWrapOwnership);
- REPORTER_ASSERT(reporter, texRT2 == texRT2->asRenderTarget());
- REPORTER_ASSERT(reporter, texRT2 == texRT2->asTexture());
+ REPORTER_ASSERT(reporter, texRT2.get() == texRT2->asRenderTarget());
+ REPORTER_ASSERT(reporter, texRT2.get() == texRT2->asTexture());
REPORTER_ASSERT(reporter, static_cast<GrSurface*>(texRT2->asRenderTarget()) ==
texRT2->asTexture());
REPORTER_ASSERT(reporter, texRT2->asRenderTarget() ==
@@ -66,7 +66,6 @@
static_cast<GrSurface*>(texRT2->asTexture()));
texRT1->unref();
- texRT2->unref();
tex1->unref();
context->getGpu()->deleteTestingOnlyBackendTexture(backendTex);
}