diff options
author | 2015-08-27 07:41:13 -0700 | |
---|---|---|
committer | 2015-08-27 07:41:16 -0700 | |
commit | 96fcdcc219d2a0d3579719b84b28bede76efba64 (patch) | |
tree | 0ec5ea0193d8292df8bf5ed9dd8498a5eb5763dd /src/gpu/gl/debug | |
parent | 435af2f736c85c3274a0c6760a3523810750d237 (diff) |
Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
Diffstat (limited to 'src/gpu/gl/debug')
-rw-r--r-- | src/gpu/gl/debug/GrBufferObj.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/debug/GrDebugGL.cpp | 32 | ||||
-rw-r--r-- | src/gpu/gl/debug/GrDebugGL.h | 4 | ||||
-rw-r--r-- | src/gpu/gl/debug/GrFrameBufferObj.h | 18 | ||||
-rw-r--r-- | src/gpu/gl/debug/GrGLCreateDebugInterface.cpp | 40 | ||||
-rw-r--r-- | src/gpu/gl/debug/GrTextureUnitObj.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/debug/SkDebugGLContext.h | 4 |
7 files changed, 51 insertions, 51 deletions
diff --git a/src/gpu/gl/debug/GrBufferObj.h b/src/gpu/gl/debug/GrBufferObj.h index 3c7a30b6d3..65b1caf820 100644 --- a/src/gpu/gl/debug/GrBufferObj.h +++ b/src/gpu/gl/debug/GrBufferObj.h @@ -19,7 +19,7 @@ class GrBufferObj : public GrFakeRefObj { public: GrBufferObj() : GrFakeRefObj() - , fDataPtr(NULL) + , fDataPtr(nullptr) , fMapped(false) , fBound(false) , fSize(0) diff --git a/src/gpu/gl/debug/GrDebugGL.cpp b/src/gpu/gl/debug/GrDebugGL.cpp index ad06862bd7..2de349bc38 100644 --- a/src/gpu/gl/debug/GrDebugGL.cpp +++ b/src/gpu/gl/debug/GrDebugGL.cpp @@ -16,7 +16,7 @@ #include "GrTextureUnitObj.h" #include "GrVertexArrayObj.h" -GrDebugGL* GrDebugGL::gObj = NULL; +GrDebugGL* GrDebugGL::gObj = nullptr; int GrDebugGL::gStaticRefCount = 0; GrDebugGL::Create GrDebugGL::gFactoryFunc[kObjTypeCount] = { GrTextureObj::createGrTextureObj, @@ -34,13 +34,13 @@ GrDebugGL::GrDebugGL() : fPackRowLength(0) , fUnPackRowLength(0) , fCurTextureUnit(0) - , fArrayBuffer(NULL) - , fElementArrayBuffer(NULL) - , fFrameBuffer(NULL) - , fRenderBuffer(NULL) - , fProgram(NULL) - , fTexture(NULL) - , fVertexArray(NULL) + , fArrayBuffer(nullptr) + , fElementArrayBuffer(nullptr) + , fFrameBuffer(nullptr) + , fRenderBuffer(nullptr) + , fProgram(nullptr) + , fTexture(nullptr) + , fVertexArray(nullptr) , fAbandoned(false) { for (int i = 0; i < kDefaultMaxTextureUnits; ++i) { @@ -67,13 +67,13 @@ GrDebugGL::~GrDebugGL() { } fObjects.reset(); - fArrayBuffer = NULL; - fElementArrayBuffer = NULL; - fFrameBuffer = NULL; - fRenderBuffer = NULL; - fProgram = NULL; - fTexture = NULL; - fVertexArray = NULL; + fArrayBuffer = nullptr; + fElementArrayBuffer = nullptr; + fFrameBuffer = nullptr; + fRenderBuffer = nullptr; + fProgram = nullptr; + fTexture = nullptr; + fVertexArray = nullptr; } GrFakeRefObj *GrDebugGL::findObject(GrGLuint ID, GrObjTypes type) { @@ -87,7 +87,7 @@ GrFakeRefObj *GrDebugGL::findObject(GrGLuint ID, GrObjTypes type) { } } - return NULL; + return nullptr; } void GrDebugGL::setArrayBuffer(GrBufferObj *arrayBuffer) { diff --git a/src/gpu/gl/debug/GrDebugGL.h b/src/gpu/gl/debug/GrDebugGL.h index ae6a978363..2560879b4f 100644 --- a/src/gpu/gl/debug/GrDebugGL.h +++ b/src/gpu/gl/debug/GrDebugGL.h @@ -92,7 +92,7 @@ public: // someone should admit to actually using this class SkASSERT(0 < gStaticRefCount); - if (NULL == gObj) { + if (nullptr == gObj) { gObj = new GrDebugGL; } @@ -110,7 +110,7 @@ public: gStaticRefCount--; if (0 == gStaticRefCount) { delete gObj; - gObj = NULL; + gObj = nullptr; } } diff --git a/src/gpu/gl/debug/GrFrameBufferObj.h b/src/gpu/gl/debug/GrFrameBufferObj.h index 794450c136..42a0effe07 100644 --- a/src/gpu/gl/debug/GrFrameBufferObj.h +++ b/src/gpu/gl/debug/GrFrameBufferObj.h @@ -22,15 +22,15 @@ public: GrFrameBufferObj() : GrFakeRefObj() , fBound(false) - , fColorBuffer(NULL) - , fDepthBuffer(NULL) - , fStencilBuffer(NULL) { + , fColorBuffer(nullptr) + , fDepthBuffer(nullptr) + , fStencilBuffer(nullptr) { } virtual ~GrFrameBufferObj() { - fColorBuffer = NULL; - fDepthBuffer = NULL; - fStencilBuffer = NULL; + fColorBuffer = nullptr; + fDepthBuffer = nullptr; + fStencilBuffer = nullptr; } void setBound() { fBound = true; } @@ -48,9 +48,9 @@ public: void deleteAction() override { - setColor(NULL); - setDepth(NULL); - setStencil(NULL); + setColor(nullptr); + setDepth(nullptr); + setStencil(nullptr); this->INHERITED::deleteAction(); } diff --git a/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp b/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp index ef52fb6763..75b673688d 100644 --- a/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp +++ b/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp @@ -84,7 +84,7 @@ GrGLvoid GR_GL_FUNCTION_TYPE debugGLBufferData(GrGLenum target, GR_GL_STATIC_DRAW == usage || GR_GL_DYNAMIC_DRAW == usage); - GrBufferObj *buffer = NULL; + GrBufferObj *buffer = nullptr; switch (target) { case GR_GL_ARRAY_BUFFER: buffer = GrDebugGL::getInstance()->getArrayBuffer(); @@ -241,7 +241,7 @@ GrGLvoid GR_GL_FUNCTION_TYPE debugGLReadPixels(GrGLint x, if (textures[j] == pTU->getTexture()->getID()) { // this ID is the current texture - revert the binding to 0 - pTU->setTexture(NULL); + pTU->setTexture(nullptr); } } } @@ -258,15 +258,15 @@ GrGLvoid GR_GL_FUNCTION_TYPE debugGLReadPixels(GrGLint x, if (frameBuffer->getColor() && textures[i] == frameBuffer->getColor()->getID()) { - frameBuffer->setColor(NULL); + frameBuffer->setColor(nullptr); } if (frameBuffer->getDepth() && textures[i] == frameBuffer->getDepth()->getID()) { - frameBuffer->setDepth(NULL); + frameBuffer->setDepth(nullptr); } if (frameBuffer->getStencil() && textures[i] == frameBuffer->getStencil()->getID()) { - frameBuffer->setStencil(NULL); + frameBuffer->setStencil(nullptr); } } } @@ -298,7 +298,7 @@ GrGLvoid GR_GL_FUNCTION_TYPE debugGLReadPixels(GrGLint x, if (frameBuffers[i] == GrDebugGL::getInstance()->getFrameBuffer()->getID()) { // this ID is the current frame buffer - rebind to the default - GrDebugGL::getInstance()->setFrameBuffer(NULL); + GrDebugGL::getInstance()->setFrameBuffer(nullptr); } } } @@ -326,7 +326,7 @@ GrGLvoid GR_GL_FUNCTION_TYPE debugGLReadPixels(GrGLint x, GrDebugGL::getInstance()->getRenderBuffer()->getID()) { // this ID is the current render buffer - make no // render buffer be bound - GrDebugGL::getInstance()->setRenderBuffer(NULL); + GrDebugGL::getInstance()->setRenderBuffer(nullptr); } } } @@ -343,15 +343,15 @@ GrGLvoid GR_GL_FUNCTION_TYPE debugGLReadPixels(GrGLint x, if (frameBuffer->getColor() && renderBuffers[i] == frameBuffer->getColor()->getID()) { - frameBuffer->setColor(NULL); + frameBuffer->setColor(nullptr); } if (frameBuffer->getDepth() && renderBuffers[i] == frameBuffer->getDepth()->getID()) { - frameBuffer->setDepth(NULL); + frameBuffer->setDepth(nullptr); } if (frameBuffer->getStencil() && renderBuffers[i] == frameBuffer->getStencil()->getID()) { - frameBuffer->setStencil(NULL); + frameBuffer->setStencil(nullptr); } } } @@ -552,7 +552,7 @@ GrGLvoid GR_GL_FUNCTION_TYPE debugGLDeleteVertexArrays(GrGLsizei n, const GrGLui // Deleting the current vertex array binds object 0 if (GrDebugGL::getInstance()->getVertexArray() == array) { - GrDebugGL::getInstance()->setVertexArray(NULL); + GrDebugGL::getInstance()->setVertexArray(nullptr); } if (array->getRefCount()) { @@ -599,13 +599,13 @@ GrGLvoid GR_GL_FUNCTION_TYPE debugGLDeleteBuffers(GrGLsizei n, const GrGLuint* i if (GrDebugGL::getInstance()->getArrayBuffer() && ids[i] == GrDebugGL::getInstance()->getArrayBuffer()->getID()) { // this ID is the current array buffer - GrDebugGL::getInstance()->setArrayBuffer(NULL); + GrDebugGL::getInstance()->setArrayBuffer(nullptr); } if (GrDebugGL::getInstance()->getElementArrayBuffer() && ids[i] == GrDebugGL::getInstance()->getElementArrayBuffer()->getID()) { // this ID is the current element array buffer - GrDebugGL::getInstance()->setElementArrayBuffer(NULL); + GrDebugGL::getInstance()->setElementArrayBuffer(nullptr); } } @@ -631,7 +631,7 @@ GrGLvoid* GR_GL_FUNCTION_TYPE debugGLMapBufferRange(GrGLenum target, GrGLintptr GrAlwaysAssert(!SkToBool(GR_GL_MAP_READ_BIT & access)); GrAlwaysAssert((GR_GL_MAP_INVALIDATE_BUFFER_BIT | GR_GL_MAP_INVALIDATE_RANGE_BIT) & access); - GrBufferObj *buffer = NULL; + GrBufferObj *buffer = nullptr; switch (target) { case GR_GL_ARRAY_BUFFER: buffer = GrDebugGL::getInstance()->getArrayBuffer(); @@ -652,13 +652,13 @@ GrGLvoid* GR_GL_FUNCTION_TYPE debugGLMapBufferRange(GrGLenum target, GrGLintptr } GrAlwaysAssert(false); - return NULL; // no buffer bound to the target + return nullptr; // no buffer bound to the target } GrGLvoid* GR_GL_FUNCTION_TYPE debugGLMapBuffer(GrGLenum target, GrGLenum access) { GrAlwaysAssert(GR_GL_WRITE_ONLY == access); - GrBufferObj *buffer = NULL; + GrBufferObj *buffer = nullptr; switch (target) { case GR_GL_ARRAY_BUFFER: buffer = GrDebugGL::getInstance()->getArrayBuffer(); @@ -682,7 +682,7 @@ GrGLboolean GR_GL_FUNCTION_TYPE debugGLUnmapBuffer(GrGLenum target) { GrAlwaysAssert(GR_GL_ARRAY_BUFFER == target || GR_GL_ELEMENT_ARRAY_BUFFER == target); - GrBufferObj *buffer = NULL; + GrBufferObj *buffer = nullptr; switch (target) { case GR_GL_ARRAY_BUFFER: buffer = GrDebugGL::getInstance()->getArrayBuffer(); @@ -711,7 +711,7 @@ GrGLvoid GR_GL_FUNCTION_TYPE debugGLFlushMappedBufferRange(GrGLenum target, GrAlwaysAssert(GR_GL_ARRAY_BUFFER == target || GR_GL_ELEMENT_ARRAY_BUFFER == target); - GrBufferObj *buffer = NULL; + GrBufferObj *buffer = nullptr; switch (target) { case GR_GL_ARRAY_BUFFER: buffer = GrDebugGL::getInstance()->getArrayBuffer(); @@ -742,7 +742,7 @@ GrGLvoid GR_GL_FUNCTION_TYPE debugGLGetBufferParameteriv(GrGLenum target, GrAlwaysAssert(GR_GL_BUFFER_SIZE == value || GR_GL_BUFFER_USAGE == value); - GrBufferObj *buffer = NULL; + GrBufferObj *buffer = nullptr; switch (target) { case GR_GL_ARRAY_BUFFER: buffer = GrDebugGL::getInstance()->getArrayBuffer(); @@ -784,7 +784,7 @@ public: GrDebugGLInterface() - : fWrapped(NULL) { + : fWrapped(nullptr) { GrDebugGL::staticRef(); } diff --git a/src/gpu/gl/debug/GrTextureUnitObj.h b/src/gpu/gl/debug/GrTextureUnitObj.h index 7d9ed2e6df..b0254a0fc1 100644 --- a/src/gpu/gl/debug/GrTextureUnitObj.h +++ b/src/gpu/gl/debug/GrTextureUnitObj.h @@ -22,7 +22,7 @@ public: GrTextureUnitObj() : GrFakeRefObj() , fNumber(0) - , fTexture(NULL) { + , fTexture(nullptr) { } void setNumber(GrGLenum number) { diff --git a/src/gpu/gl/debug/SkDebugGLContext.h b/src/gpu/gl/debug/SkDebugGLContext.h index 0a61f72cb2..abbcf559c5 100644 --- a/src/gpu/gl/debug/SkDebugGLContext.h +++ b/src/gpu/gl/debug/SkDebugGLContext.h @@ -16,14 +16,14 @@ public: static SkDebugGLContext* Create(GrGLStandard forcedGpuAPI) { if (kGLES_GrGLStandard == forcedGpuAPI) { - return NULL; + return nullptr; } return new SkDebugGLContext; } private: void onPlatformMakeCurrent() const override {} void onPlatformSwapBuffers() const override {} - GrGLFuncPtr onPlatformGetProcAddress(const char*) const override { return NULL; } + GrGLFuncPtr onPlatformGetProcAddress(const char*) const override { return nullptr; } SkDebugGLContext(); }; |