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

Unified Diff: src/gpu/gl/GrGLGpuProgramCache.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/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLIndexBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpuProgramCache.cpp
diff --git a/src/gpu/gl/GrGLGpuProgramCache.cpp b/src/gpu/gl/GrGLGpuProgramCache.cpp
index c6b673b95be4411ec6e95e5c08718ccb60462054..d74b54aebab7604d118b465ecf0330a105dced7c 100644
--- a/src/gpu/gl/GrGLGpuProgramCache.cpp
+++ b/src/gpu/gl/GrGLGpuProgramCache.cpp
@@ -23,7 +23,7 @@ typedef GrGLProgramDataManager::UniformHandle UniformHandle;
struct GrGLGpu::ProgramCache::Entry {
- Entry() : fProgram(NULL), fLRUStamp(0) {}
+ Entry() : fProgram(nullptr), fLRUStamp(0) {}
SkAutoTUnref<GrGLProgram> fProgram;
unsigned int fLRUStamp;
@@ -52,7 +52,7 @@ GrGLGpu::ProgramCache::ProgramCache(GrGLGpu* gpu)
#endif
{
for (int i = 0; i < 1 << kHashBits; ++i) {
- fHashTable[i] = NULL;
+ fHashTable[i] = nullptr;
}
}
@@ -95,7 +95,7 @@ GrGLProgram* GrGLGpu::ProgramCache::refProgram(const DrawArgs& args) {
++fTotalRequests;
#endif
- Entry* entry = NULL;
+ Entry* entry = nullptr;
uint32_t hashIdx = args.fDesc->getChecksum();
hashIdx ^= hashIdx >> 16;
@@ -110,7 +110,7 @@ GrGLProgram* GrGLGpu::ProgramCache::refProgram(const DrawArgs& args) {
}
int entryIdx;
- if (NULL == entry) {
+ if (nullptr == entry) {
entryIdx = this->search(*args.fDesc);
if (entryIdx >= 0) {
entry = fEntries[entryIdx];
@@ -120,14 +120,14 @@ GrGLProgram* GrGLGpu::ProgramCache::refProgram(const DrawArgs& args) {
}
}
- if (NULL == entry) {
+ if (nullptr == entry) {
// We have a cache miss
#ifdef PROGRAM_CACHE_STATS
++fCacheMisses;
#endif
GrGLProgram* program = GrGLProgramBuilder::CreateProgram(args, fGpu);
- if (NULL == program) {
- return NULL;
+ if (nullptr == program) {
+ return nullptr;
}
int purgeIdx = 0;
if (fCount < kMaxEntries) {
@@ -145,7 +145,7 @@ GrGLProgram* GrGLGpu::ProgramCache::refProgram(const DrawArgs& args) {
entry = fEntries[purgeIdx];
int purgedHashIdx = entry->fProgram->getDesc().getChecksum() & ((1 << kHashBits) - 1);
if (fHashTable[purgedHashIdx] == entry) {
- fHashTable[purgedHashIdx] = NULL;
+ fHashTable[purgedHashIdx] = nullptr;
}
}
SkASSERT(fEntries[purgeIdx] == entry);
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLIndexBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698