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

Unified Diff: src/gpu/GrResourceCache.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrReorderCommandBuilder.cpp ('k') | src/gpu/GrResourceProvider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
« no previous file with comments | « src/gpu/GrReorderCommandBuilder.cpp ('k') | src/gpu/GrResourceProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698