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

Side by Side Diff: include/core/SkTInternalLList.h

Issue 481443002: Add GrResourceCache2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update comments Created 6 years, 4 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 | « gyp/gpu.gypi ('k') | include/gpu/GrContext.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 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 SkTInternalLList_DEFINED 8 #ifndef SkTInternalLList_DEFINED
9 #define SkTInternalLList_DEFINED 9 #define SkTInternalLList_DEFINED
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 entry->fPrev = NULL; 66 entry->fPrev = NULL;
67 entry->fNext = NULL; 67 entry->fNext = NULL;
68 68
69 #ifdef SK_DEBUG 69 #ifdef SK_DEBUG
70 entry->fList = NULL; 70 entry->fList = NULL;
71 #endif 71 #endif
72 } 72 }
73 73
74 void removeHead() {
75 SkASSERT(NULL != fHead && NULL != fTail);
76 SkASSERT(NULL = fHead->fPrev);
mtklein 2014/08/15 16:02:43 " NULL = " ಠ_ಠ
bsalomon 2014/08/19 15:16:08 ha, it turns out I didn't actually need this and i
77
78 T* next = fHead->fNext;
79
80 if (NULL != next) {
81 next->fPrev = NULL;
82 } else {
83 fTail = NULL;
84 }
85
86 fHead->fPrev = NULL;
87 fHead->fNext = NULL;
88
89 #ifdef SK_DEBUG
90 fHead->fList = NULL;
91 #endif
92
93 fHead = next;
94 }
95
74 void addToHead(T* entry) { 96 void addToHead(T* entry) {
75 SkASSERT(NULL == entry->fPrev && NULL == entry->fNext); 97 SkASSERT(NULL == entry->fPrev && NULL == entry->fNext);
76 SkASSERT(NULL == entry->fList); 98 SkASSERT(NULL == entry->fList);
77 99
78 entry->fPrev = NULL; 100 entry->fPrev = NULL;
79 entry->fNext = fHead; 101 entry->fNext = fHead;
80 if (NULL != fHead) { 102 if (NULL != fHead) {
81 fHead->fPrev = entry; 103 fHead->fPrev = entry;
82 } 104 }
83 fHead = entry; 105 fHead = entry;
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 #endif // SK_DEBUG 285 #endif // SK_DEBUG
264 286
265 private: 287 private:
266 T* fHead; 288 T* fHead;
267 T* fTail; 289 T* fTail;
268 290
269 typedef SkNoncopyable INHERITED; 291 typedef SkNoncopyable INHERITED;
270 }; 292 };
271 293
272 #endif 294 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698