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

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

Issue 638003003: Remove ~GrIORef since last remaining virtual and now all inline (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: save the cpp file this time Created 6 years, 2 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 | « no previous file | src/gpu/GrGpuResource.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 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 23 matching lines...) Expand all
34 * 34 *
35 * The latter two ref types are private and intended only for Gr core code. 35 * The latter two ref types are private and intended only for Gr core code.
36 * 36 *
37 * When an item is purgable DERIVED:notifyIsPurgable() will be called (static po ly morphism using 37 * When an item is purgable DERIVED:notifyIsPurgable() will be called (static po ly morphism using
38 * CRTP). GrIORef and GrGpuResource are separate classes for organizational reas ons and to be 38 * CRTP). GrIORef and GrGpuResource are separate classes for organizational reas ons and to be
39 * able to give access via friendship to only the functions related to pending I O operations. 39 * able to give access via friendship to only the functions related to pending I O operations.
40 */ 40 */
41 template <typename DERIVED> class GrIORef : public SkNoncopyable { 41 template <typename DERIVED> class GrIORef : public SkNoncopyable {
42 public: 42 public:
43 SK_DECLARE_INST_COUNT_ROOT(GrIORef) 43 SK_DECLARE_INST_COUNT_ROOT(GrIORef)
44 virtual ~GrIORef();
45 44
46 // Some of the signatures are written to mirror SkRefCnt so that GrGpuResour ce can work with 45 // Some of the signatures are written to mirror SkRefCnt so that GrGpuResour ce can work with
47 // templated helper classes (e.g. SkAutoTUnref). However, we have different categories of 46 // templated helper classes (e.g. SkAutoTUnref). However, we have different categories of
48 // refs (e.g. pending reads). We also don't require thread safety as GrCache able objects are 47 // refs (e.g. pending reads). We also don't require thread safety as GrCache able objects are
49 // not intended to cross thread boundaries. 48 // not intended to cross thread boundaries.
50 void ref() const { 49 void ref() const {
51 this->validate(); 50 this->validate();
52 ++fRefCnt; 51 ++fRefCnt;
53 } 52 }
54 53
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 GrResourceCacheEntry* fCacheEntry; // NULL if not in cache 256 GrResourceCacheEntry* fCacheEntry; // NULL if not in cache
258 const uint32_t fUniqueID; 257 const uint32_t fUniqueID;
259 258
260 GrResourceKey fScratchKey; 259 GrResourceKey fScratchKey;
261 260
262 typedef GrIORef<GrGpuResource> INHERITED; 261 typedef GrIORef<GrGpuResource> INHERITED;
263 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable. 262 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable.
264 }; 263 };
265 264
266 #endif 265 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698