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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrProcessorUnitTest.h" 8 #include "GrProcessorUnitTest.h"
9 #include "GrFragmentProcessor.h" 9 #include "GrFragmentProcessor.h"
10 10
11 const GrFragmentProcessor* GrProcessorUnitTest::CreateChildFP(GrProcessorTestDat a* data) { 11 sk_sp<GrFragmentProcessor> GrProcessorUnitTest::MakeChildFP(GrProcessorTestData* data) {
12 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 12 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
13 SkAutoTUnref<const GrFragmentProcessor> fp; 13 sk_sp<GrFragmentProcessor> fp;
14 do { 14 do {
15 fp.reset(GrProcessorTestFactory<GrFragmentProcessor>::Create(data)); 15 fp = GrProcessorTestFactory<GrFragmentProcessor>::Make(data);
16 SkASSERT(fp); 16 SkASSERT(fp);
17 } while (fp->numChildProcessors() != 0); 17 } while (fp->numChildProcessors() != 0);
18 return SkRef(fp.get()); 18 return fp;
19 #else 19 #else
20 SkFAIL("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS"); 20 SkFAIL("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS");
21 return nullptr; 21 return nullptr;
22 #endif 22 #endif
23 } 23 }
OLDNEW
« 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