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

Side by Side Diff: src/gpu/GrContextFactory.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/GrContext.cpp ('k') | src/gpu/GrContextFactory.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 2012 Google Inc. 2 * Copyright 2012 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 GrContextFactory_DEFINED 8 #ifndef GrContextFactory_DEFINED
9 #define GrContextFactory_DEFINED 9 #define GrContextFactory_DEFINED
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 } 110 }
111 111
112 /** 112 /**
113 * Get a GrContext initialized with a type of GL context. It also makes the GL context current. 113 * Get a GrContext initialized with a type of GL context. It also makes the GL context current.
114 */ 114 */
115 GrContext* get(GLContextType type, GrGLStandard forcedGpuAPI = kNone_GrGLSta ndard); 115 GrContext* get(GLContextType type, GrGLStandard forcedGpuAPI = kNone_GrGLSta ndard);
116 116
117 117
118 // Returns the GLContext of the given type. If it has not been created yet, 118 // Returns the GLContext of the given type. If it has not been created yet,
119 // NULL is returned instead. 119 // nullptr is returned instead.
120 SkGLContext* getGLContext(GLContextType type) { 120 SkGLContext* getGLContext(GLContextType type) {
121 for (int i = 0; i < fContexts.count(); ++i) { 121 for (int i = 0; i < fContexts.count(); ++i) {
122 if (fContexts[i].fType == type) { 122 if (fContexts[i].fType == type) {
123 return fContexts[i].fGLContext; 123 return fContexts[i].fGLContext;
124 } 124 }
125 } 125 }
126 126
127 return NULL; 127 return nullptr;
128 } 128 }
129 129
130 const GrContextOptions& getGlobalOptions() const { return fGlobalOptions; } 130 const GrContextOptions& getGlobalOptions() const { return fGlobalOptions; }
131 131
132 private: 132 private:
133 struct GPUContext { 133 struct GPUContext {
134 GLContextType fType; 134 GLContextType fType;
135 SkGLContext* fGLContext; 135 SkGLContext* fGLContext;
136 GrContext* fGrContext; 136 GrContext* fGrContext;
137 }; 137 };
138 SkTArray<GPUContext, true> fContexts; 138 SkTArray<GPUContext, true> fContexts;
139 const GrContextOptions fGlobalOptions; 139 const GrContextOptions fGlobalOptions;
140 }; 140 };
141 141
142 #endif 142 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrContextFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698