diff options
author | Hal Canary <halcanary@google.com> | 2016-11-04 11:49:42 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-04 16:55:38 +0000 |
commit | 342b7acc46550af5fbefc6f9313231ede11ed692 (patch) | |
tree | 1077b67b06a35c49e93fd9a210204c597a6239df /tests/PrimitiveProcessorTest.cpp | |
parent | d49128ab8ec6b3aadeb650074ddd8ddbdcce15eb (diff) |
tests: s/SkAutoTUnref/sk_sp/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4394
Change-Id: I088b3c6e2adff07abed1e8a50091cc0ec4a4109c
Reviewed-on: https://skia-review.googlesource.com/4394
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'tests/PrimitiveProcessorTest.cpp')
-rw-r--r-- | tests/PrimitiveProcessorTest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp index b48d5ea211..4900ed6e84 100644 --- a/tests/PrimitiveProcessorTest.cpp +++ b/tests/PrimitiveProcessorTest.cpp @@ -87,12 +87,12 @@ private: private: SkTArray<SkString> fAttribNames; }; - SkAutoTUnref<GrGeometryProcessor> gp(new GP(fNumAttribs)); + sk_sp<GrGeometryProcessor> gp(new GP(fNumAttribs)); QuadHelper helper; size_t vertexStride = gp->getVertexStride(); SkPoint* vertices = reinterpret_cast<SkPoint*>(helper.init(target, vertexStride, 1)); vertices->setRectFan(0.f, 0.f, 1.f, 1.f, vertexStride); - helper.recordDraw(target, gp); + helper.recordDraw(target, gp.get()); } int fNumAttribs; @@ -123,11 +123,11 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) { REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0); REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 0); #endif - SkAutoTUnref<GrDrawBatch> batch; + sk_sp<GrDrawBatch> batch; GrPaint grPaint; // This one should succeed. batch.reset(new Batch(attribCnt)); - renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch); + renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get()); context->flush(); #if GR_GPU_STATS REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 1); @@ -136,7 +136,7 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) { context->resetGpuStats(); // This one should fail. batch.reset(new Batch(attribCnt+1)); - renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch); + renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get()); context->flush(); #if GR_GPU_STATS REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0); |