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

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

Issue 543833002: Add method to GrProgramResource to record that pending a execution was completed. (Closed) Base URL: https://skia.googlesource.com/skia.git@progelem
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 | « no previous file | include/gpu/GrProgramElement.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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 if (0 == fRefCnt && 0 == fPendingReads && 0 == fPendingWrites) { 102 if (0 == fRefCnt && 0 == fPendingReads && 0 == fPendingWrites) {
103 this->internal_dispose(); 103 this->internal_dispose();
104 } 104 }
105 } 105 }
106 106
107 private: 107 private:
108 mutable int32_t fRefCnt; 108 mutable int32_t fRefCnt;
109 mutable int32_t fPendingReads; 109 mutable int32_t fPendingReads;
110 mutable int32_t fPendingWrites; 110 mutable int32_t fPendingWrites;
111 111
112 // These functions need access to the pending read/write member functions. 112 // This class is used to manage conversion of refs to pending reads/writes.
113 friend class GrRODrawState;
114 friend class GrProgramResource; 113 friend class GrProgramResource;
115 }; 114 };
116 115
117 /** 116 /**
118 * Base class for objects that can be kept in the GrResourceCache. 117 * Base class for objects that can be kept in the GrResourceCache.
119 */ 118 */
120 class GrGpuResource : public GrGpuRef { 119 class GrGpuResource : public GrGpuRef {
121 public: 120 public:
122 SK_DECLARE_INST_COUNT(GrGpuResource) 121 SK_DECLARE_INST_COUNT(GrGpuResource)
123 122
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 238
240 GrResourceCacheEntry* fCacheEntry; // NULL if not in cache 239 GrResourceCacheEntry* fCacheEntry; // NULL if not in cache
241 const uint32_t fUniqueID; 240 const uint32_t fUniqueID;
242 241
243 GrResourceKey fScratchKey; 242 GrResourceKey fScratchKey;
244 243
245 typedef GrGpuRef INHERITED; 244 typedef GrGpuRef INHERITED;
246 }; 245 };
247 246
248 #endif 247 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrProgramElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698