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

Unified Diff: src/gpu/GrProcessorUnitTest.cpp

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. Created 4 years, 6 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 | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProcessorUnitTest.cpp
diff --git a/src/gpu/GrProcessorUnitTest.cpp b/src/gpu/GrProcessorUnitTest.cpp
index bdc602c9bfe9feee8ba60ea4961c8dcad44afed9..3f43389fe06d01997ff6b6e84308f35157b38c05 100644
--- a/src/gpu/GrProcessorUnitTest.cpp
+++ b/src/gpu/GrProcessorUnitTest.cpp
@@ -8,14 +8,14 @@
#include "GrProcessorUnitTest.h"
#include "GrFragmentProcessor.h"
-const GrFragmentProcessor* GrProcessorUnitTest::CreateChildFP(GrProcessorTestData* data) {
+sk_sp<GrFragmentProcessor> GrProcessorUnitTest::MakeChildFP(GrProcessorTestData* data) {
#if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
- SkAutoTUnref<const GrFragmentProcessor> fp;
+ sk_sp<GrFragmentProcessor> fp;
do {
- fp.reset(GrProcessorTestFactory<GrFragmentProcessor>::Create(data));
+ fp = GrProcessorTestFactory<GrFragmentProcessor>::Make(data);
SkASSERT(fp);
} while (fp->numChildProcessors() != 0);
- return SkRef(fp.get());
+ return fp;
#else
SkFAIL("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS");
return nullptr;
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698