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

Side by Side Diff: src/gpu/GrResourceCache.cpp

Issue 27192003: Start cleaning up 64bit Win warnings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: revertedGrBytesPerPixel to returning a size_t Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrRenderTarget.cpp ('k') | src/gpu/SkGrFontScaler.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 } while (!withinBudget && changed); 347 } while (!withinBudget && changed);
348 } 348 }
349 349
350 void GrResourceCache::purgeAllUnlocked() { 350 void GrResourceCache::purgeAllUnlocked() {
351 GrAutoResourceCacheValidate atcv(this); 351 GrAutoResourceCacheValidate atcv(this);
352 352
353 // we can have one GrResource holding a lock on another 353 // we can have one GrResource holding a lock on another
354 // so we don't want to just do a simple loop kicking each 354 // so we don't want to just do a simple loop kicking each
355 // entry out. Instead change the budget and purge. 355 // entry out. Instead change the budget and purge.
356 356
357 int savedMaxBytes = fMaxBytes; 357 size_t savedMaxBytes = fMaxBytes;
358 int savedMaxCount = fMaxCount; 358 int savedMaxCount = fMaxCount;
359 fMaxBytes = (size_t) -1; 359 fMaxBytes = (size_t) -1;
360 fMaxCount = 0; 360 fMaxCount = 0;
361 this->purgeAsNeeded(); 361 this->purgeAsNeeded();
362 362
363 #ifdef SK_DEBUG 363 #ifdef SK_DEBUG
364 SkASSERT(fExclusiveList.countEntries() == fClientDetachedCount); 364 SkASSERT(fExclusiveList.countEntries() == fClientDetachedCount);
365 SkASSERT(countBytes(fExclusiveList) == fClientDetachedBytes); 365 SkASSERT(countBytes(fExclusiveList) == fClientDetachedBytes);
366 if (!fCache.count()) { 366 if (!fCache.count()) {
367 // Items may have been detached from the cache (such as the backing 367 // Items may have been detached from the cache (such as the backing
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 fEntryBytes, fHighWaterEntryBytes); 465 fEntryBytes, fHighWaterEntryBytes);
466 SkDebugf("\t\tDetached Entry Count: current %d high %d\n", 466 SkDebugf("\t\tDetached Entry Count: current %d high %d\n",
467 fClientDetachedCount, fHighWaterClientDetachedCount); 467 fClientDetachedCount, fHighWaterClientDetachedCount);
468 SkDebugf("\t\tDetached Bytes: current %d high %d\n", 468 SkDebugf("\t\tDetached Bytes: current %d high %d\n",
469 fClientDetachedBytes, fHighWaterClientDetachedBytes); 469 fClientDetachedBytes, fHighWaterClientDetachedBytes);
470 } 470 }
471 471
472 #endif 472 #endif
473 473
474 /////////////////////////////////////////////////////////////////////////////// 474 ///////////////////////////////////////////////////////////////////////////////
OLDNEW
« no previous file with comments | « src/gpu/GrRenderTarget.cpp ('k') | src/gpu/SkGrFontScaler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698