Index: src/gpu/GrResourceCache.cpp |
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp |
index 005b6c4ccd24177c5630d7bd198a43340262cd81..4a0c9b2b369bbc12cb4254dedeaae16b929454d6 100644 |
--- a/src/gpu/GrResourceCache.cpp |
+++ b/src/gpu/GrResourceCache.cpp |
@@ -136,7 +136,7 @@ |
fHighWaterCount = SkTMax(this->getResourceCount(), fHighWaterCount); |
fHighWaterBytes = SkTMax(fBytes, fHighWaterBytes); |
#endif |
- if (SkBudgeted::kYes == resource->resourcePriv().isBudgeted()) { |
+ if (resource->resourcePriv().isBudgeted()) { |
++fBudgetedCount; |
fBudgetedBytes += size; |
TRACE_COUNTER2(TRACE_DISABLED_BY_DEFAULT("skia.gpu.cache"), "skia budget", "used", |
@@ -167,7 +167,7 @@ |
size_t size = resource->gpuMemorySize(); |
SkDEBUGCODE(--fCount;) |
fBytes -= size; |
- if (SkBudgeted::kYes == resource->resourcePriv().isBudgeted()) { |
+ if (resource->resourcePriv().isBudgeted()) { |
--fBudgetedCount; |
fBudgetedBytes -= size; |
TRACE_COUNTER2(TRACE_DISABLED_BY_DEFAULT("skia.gpu.cache"), "skia budget", "used", |
@@ -375,7 +375,7 @@ |
this->removeFromNonpurgeableArray(resource); |
fPurgeableQueue.insert(resource); |
- if (SkBudgeted::kNo == resource->resourcePriv().isBudgeted()) { |
+ if (!resource->resourcePriv().isBudgeted()) { |
// Check whether this resource could still be used as a scratch resource. |
if (!resource->cacheAccess().isExternal() && |
resource->resourcePriv().getScratchKey().isValid()) { |
@@ -414,7 +414,7 @@ |
#if GR_CACHE_STATS |
fHighWaterBytes = SkTMax(fBytes, fHighWaterBytes); |
#endif |
- if (SkBudgeted::kYes == resource->resourcePriv().isBudgeted()) { |
+ if (resource->resourcePriv().isBudgeted()) { |
fBudgetedBytes += delta; |
TRACE_COUNTER2(TRACE_DISABLED_BY_DEFAULT("skia.gpu.cache"), "skia budget", "used", |
fBudgetedBytes, "free", fMaxBytes - fBudgetedBytes); |
@@ -433,7 +433,7 @@ |
size_t size = resource->gpuMemorySize(); |
- if (SkBudgeted::kYes == resource->resourcePriv().isBudgeted()) { |
+ if (resource->resourcePriv().isBudgeted()) { |
++fBudgetedCount; |
fBudgetedBytes += size; |
#if GR_CACHE_STATS |
@@ -664,7 +664,7 @@ |
SkASSERT(fScratchMap->countForKey(resource->resourcePriv().getScratchKey())); |
SkASSERT(!resource->cacheAccess().isExternal()); |
} else if (resource->resourcePriv().getScratchKey().isValid()) { |
- SkASSERT(SkBudgeted::kNo == resource->resourcePriv().isBudgeted() || |
+ SkASSERT(!resource->resourcePriv().isBudgeted() || |
resource->getUniqueKey().isValid()); |
++fCouldBeScratch; |
SkASSERT(fScratchMap->countForKey(resource->resourcePriv().getScratchKey())); |
@@ -675,10 +675,10 @@ |
++fContent; |
SkASSERT(fUniqueHash->find(uniqueKey) == resource); |
SkASSERT(!resource->cacheAccess().isExternal()); |
- SkASSERT(SkBudgeted::kYes == resource->resourcePriv().isBudgeted()); |
- } |
- |
- if (SkBudgeted::kYes == resource->resourcePriv().isBudgeted()) { |
+ SkASSERT(resource->resourcePriv().isBudgeted()); |
+ } |
+ |
+ if (resource->resourcePriv().isBudgeted()) { |
++fBudgetedCount; |
fBudgetedBytes += resource->gpuMemorySize(); |
} |