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/GrPendingProgramElement.h

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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/GrPathUtils.h ('k') | src/gpu/GrPipelineBuilder.h » ('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 2014 Google Inc. 2 * Copyright 2014 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 #ifndef GrPendingProgramElement_DEFINED 8 #ifndef GrPendingProgramElement_DEFINED
9 #define GrPendingProgramElement_DEFINED 9 #define GrPendingProgramElement_DEFINED
10 10
11 #include "SkRefCnt.h" 11 #include "SkRefCnt.h"
12 #include "GrTypes.h" 12 #include "GrTypes.h"
13 13
14 /** 14 /**
15 * Helper for owning a pending execution on a GrProgramElement. Using this rathe r than ref allows 15 * Helper for owning a pending execution on a GrProgramElement. Using this rathe r than ref allows
16 * resources that are owned by the program element to be correctly tracked as ha ving pending reads 16 * resources that are owned by the program element to be correctly tracked as ha ving pending reads
17 * and writes rather than refs. 17 * and writes rather than refs.
18 */ 18 */
19 template <typename T> class GrPendingProgramElement : SkNoncopyable { 19 template <typename T> class GrPendingProgramElement : SkNoncopyable {
20 public: 20 public:
21 GrPendingProgramElement() : fObj(NULL) { }; 21 GrPendingProgramElement() : fObj(nullptr) { };
22 22
23 // Adds a pending execution on obj. 23 // Adds a pending execution on obj.
24 explicit GrPendingProgramElement(T* obj) : fObj(obj) { 24 explicit GrPendingProgramElement(T* obj) : fObj(obj) {
25 if (obj) { 25 if (obj) {
26 obj->addPendingExecution(); 26 obj->addPendingExecution();
27 } 27 }
28 } 28 }
29 29
30 void reset(T* obj) { 30 void reset(T* obj) {
31 if (obj) { 31 if (obj) {
(...skipping 15 matching lines...) Expand all
47 fObj->completedExecution(); 47 fObj->completedExecution();
48 } 48 }
49 } 49 }
50 50
51 private: 51 private:
52 T* fObj; 52 T* fObj;
53 53
54 typedef SkNoncopyable INHERITED; 54 typedef SkNoncopyable INHERITED;
55 }; 55 };
56 #endif 56 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPathUtils.h ('k') | src/gpu/GrPipelineBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698