Index: src/gpu/GrResourceCache.cpp |
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp |
index 85a302186da4c77a062f69c767a8d565fd4909ce..e605856b70c8def874426897ed70d60f23541928 100644 |
--- a/src/gpu/GrResourceCache.cpp |
+++ b/src/gpu/GrResourceCache.cpp |
@@ -72,13 +72,13 @@ GrResourceCache::GrResourceCache(const GrCaps* caps) |
, fBytes(0) |
, fBudgetedCount(0) |
, fBudgetedBytes(0) |
- , fOverBudgetCB(NULL) |
- , fOverBudgetData(NULL) |
- , fFlushTimestamps(NULL) |
+ , fOverBudgetCB(nullptr) |
+ , fOverBudgetData(nullptr) |
+ , fFlushTimestamps(nullptr) |
, fLastFlushTimestampIndex(0) |
, fPreferVRAMUseOverFlushes(caps->preferVRAMUseOverFlushes()) { |
SkDEBUGCODE(fCount = 0;) |
- SkDEBUGCODE(fNewlyPurgeableResourceForValidation = NULL;) |
+ SkDEBUGCODE(fNewlyPurgeableResourceForValidation = nullptr;) |
this->resetFlushTimestamps(); |
} |
@@ -106,7 +106,7 @@ void GrResourceCache::resetFlushTimestamps() { |
static const int kMaxSupportedTimestampHistory = 128; |
if (fMaxUnusedFlushes > kMaxSupportedTimestampHistory) { |
- fFlushTimestamps = NULL; |
+ fFlushTimestamps = nullptr; |
return; |
} |
@@ -259,7 +259,7 @@ GrGpuResource* GrResourceCache::findAndRefScratchResource(const GrScratchKey& sc |
this->validate(); |
return resource; |
} else if (flags & kRequireNoPendingIO_ScratchFlag) { |
- return NULL; |
+ return nullptr; |
} |
// We would prefer to consume more available VRAM rather than flushing |
// immediately, but on ANGLE this can lead to starving of the GPU. |
@@ -267,7 +267,7 @@ GrGpuResource* GrResourceCache::findAndRefScratchResource(const GrScratchKey& sc |
// kPrefer is specified, we didn't find a resource without pending io, |
// but there is still space in our budget for the resource so force |
// the caller to allocate a new resource. |
- return NULL; |
+ return nullptr; |
} |
} |
resource = fScratchMap.find(scratchKey, AvailableForScratchUse(false)); |
@@ -302,7 +302,7 @@ void GrResourceCache::changeUniqueKey(GrGpuResource* resource, const GrUniqueKey |
if (resource->getUniqueKey().isValid()) { |
SkASSERT(resource == fUniqueHash.find(resource->getUniqueKey())); |
fUniqueHash.remove(resource->getUniqueKey()); |
- SkASSERT(NULL == fUniqueHash.find(resource->getUniqueKey())); |
+ SkASSERT(nullptr == fUniqueHash.find(resource->getUniqueKey())); |
} |
// If another resource has the new key, remove its key then install the key on this resource. |
@@ -319,7 +319,7 @@ void GrResourceCache::changeUniqueKey(GrGpuResource* resource, const GrUniqueKey |
old->cacheAccess().removeUniqueKey(); |
} |
} |
- SkASSERT(NULL == fUniqueHash.find(newKey)); |
+ SkASSERT(nullptr == fUniqueHash.find(newKey)); |
resource->cacheAccess().setUniqueKey(newKey); |
fUniqueHash.add(resource); |
} else { |
@@ -363,7 +363,7 @@ void GrResourceCache::notifyCntReachedZero(GrGpuResource* resource, uint32_t fla |
} |
#endif |
resource->cacheAccess().setTimestamp(this->getNextTimestamp()); |
- SkDEBUGCODE(fNewlyPurgeableResourceForValidation = NULL); |
+ SkDEBUGCODE(fNewlyPurgeableResourceForValidation = nullptr); |
} |
if (!SkToBool(ResourceAccess::kAllCntsReachedZero_RefNotificationFlag & flags)) { |