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

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

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