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

Side by Side Diff: include/gpu/GrGpuResource.h

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 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 | « include/gpu/GrEffectStage.h ('k') | include/gpu/GrPaint.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 GrGpuResource_DEFINED 8 #ifndef GrGpuResource_DEFINED
9 #define GrGpuResource_DEFINED 9 #define GrGpuResource_DEFINED
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 uint32_t getUniqueID() const { return fUniqueID; } 179 uint32_t getUniqueID() const { return fUniqueID; }
180 180
181 protected: 181 protected:
182 // This must be called by every GrGpuObject. It should be called once the ob ject is fully 182 // This must be called by every GrGpuObject. It should be called once the ob ject is fully
183 // initialized (i.e. not in a base class constructor). 183 // initialized (i.e. not in a base class constructor).
184 void registerWithCache(); 184 void registerWithCache();
185 185
186 GrGpuResource(GrGpu*, bool isWrapped); 186 GrGpuResource(GrGpu*, bool isWrapped);
187 virtual ~GrGpuResource(); 187 virtual ~GrGpuResource();
188 188
189 bool isInCache() const { return NULL != fCacheEntry; } 189 bool isInCache() const { return SkToBool(fCacheEntry); }
190 190
191 GrGpu* getGpu() const { return fGpu; } 191 GrGpu* getGpu() const { return fGpu; }
192 192
193 // Derived classes should always call their parent class' onRelease 193 // Derived classes should always call their parent class' onRelease
194 // and onAbandon methods in their overrides. 194 // and onAbandon methods in their overrides.
195 virtual void onRelease() {}; 195 virtual void onRelease() {};
196 virtual void onAbandon() {}; 196 virtual void onAbandon() {};
197 197
198 bool isWrapped() const { return kWrapped_FlagBit & fFlags; } 198 bool isWrapped() const { return kWrapped_FlagBit & fFlags; }
199 199
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 GrResourceCacheEntry* fCacheEntry; // NULL if not in cache 239 GrResourceCacheEntry* fCacheEntry; // NULL if not in cache
240 const uint32_t fUniqueID; 240 const uint32_t fUniqueID;
241 241
242 GrResourceKey fScratchKey; 242 GrResourceKey fScratchKey;
243 243
244 typedef GrGpuRef INHERITED; 244 typedef GrGpuRef INHERITED;
245 }; 245 };
246 246
247 #endif 247 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrEffectStage.h ('k') | include/gpu/GrPaint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698