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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTInternalLList.h
diff --git a/include/core/SkTInternalLList.h b/include/core/SkTInternalLList.h
index 1c82a71cda6788b89105d25bcb7cbf847546b537..8059e49a1fc3359dd9e1fa61aae334573015bb17 100644
--- a/include/core/SkTInternalLList.h
+++ b/include/core/SkTInternalLList.h
@@ -71,6 +71,28 @@ public:
#endif
}
+ void removeHead() {
+ SkASSERT(NULL != fHead && NULL != fTail);
+ 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
+
+ T* next = fHead->fNext;
+
+ if (NULL != next) {
+ next->fPrev = NULL;
+ } else {
+ fTail = NULL;
+ }
+
+ fHead->fPrev = NULL;
+ fHead->fNext = NULL;
+
+#ifdef SK_DEBUG
+ fHead->fList = NULL;
+#endif
+
+ fHead = next;
+ }
+
void addToHead(T* entry) {
SkASSERT(NULL == entry->fPrev && NULL == entry->fNext);
SkASSERT(NULL == entry->fList);
« 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