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

Side by Side Diff: src/core/SkCachedData.cpp

Issue 1265033002: IWYU: 'core' target, files starting A-C. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase (a file was deleted). Created 5 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 | « src/core/SkCachedData.h ('k') | src/core/SkCanvas.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 #include "SkCachedData.h" 8 #include "SkCachedData.h"
9 #include "SkRefCnt.h"
10 #include "SkDiscardableMemory.h" 9 #include "SkDiscardableMemory.h"
11 10
12 //#define TRACK_CACHEDDATA_LIFETIME 11 //#define TRACK_CACHEDDATA_LIFETIME
13 12
14 #ifdef TRACK_CACHEDDATA_LIFETIME 13 #ifdef TRACK_CACHEDDATA_LIFETIME
15 static int32_t gCachedDataCounter; 14 static int32_t gCachedDataCounter;
16 15
17 static void inc() { 16 static void inc() {
18 int32_t oldCount = sk_atomic_inc(&gCachedDataCounter); 17 int32_t oldCount = sk_atomic_inc(&gCachedDataCounter);
19 SkDebugf("SkCachedData inc %d\n", oldCount + 1); 18 SkDebugf("SkCachedData inc %d\n", oldCount + 1);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 case kDiscardableMemory_StorageType: 189 case kDiscardableMemory_StorageType:
191 // fData can be null or the actual value, depending if DM's lock succeeded 190 // fData can be null or the actual value, depending if DM's lock succeeded
192 break; 191 break;
193 } 192 }
194 } else { 193 } else {
195 SkASSERT((fInCache && 1 == fRefCnt) || (0 == fRefCnt)); 194 SkASSERT((fInCache && 1 == fRefCnt) || (0 == fRefCnt));
196 SkASSERT(NULL == fData); 195 SkASSERT(NULL == fData);
197 } 196 }
198 } 197 }
199 #endif 198 #endif
OLDNEW
« no previous file with comments | « src/core/SkCachedData.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698