Bug 784739 - Switch from NULL to nullptr in gfx/layers/opengl/; r=joe

--HG--
extra : rebase_source : 65e2c8e72dc4b20ef9aa50688c9320792fca69ee
This commit is contained in:
Birunthan Mohanathas 2013-07-20 11:48:55 +03:00
parent 48209b8e5e
commit f3810ac55a
9 changed files with 17 additions and 17 deletions

View File

@ -26,7 +26,7 @@ class CanvasLayerOGL :
{
public:
CanvasLayerOGL(LayerManagerOGL *aManager)
: CanvasLayer(aManager, NULL)
: CanvasLayer(aManager, nullptr)
, LayerOGL(aManager)
, mLayerProgram(RGBALayerProgramType)
, mTexture(0)

View File

@ -19,7 +19,7 @@ class ColorLayerOGL : public ColorLayer,
{
public:
ColorLayerOGL(LayerManagerOGL *aManager)
: ColorLayer(aManager, NULL)
: ColorLayer(aManager, nullptr)
, LayerOGL(aManager)
{
mImplData = static_cast<LayerOGL*>(this);

View File

@ -428,7 +428,7 @@ CompositorOGL::Initialize()
0,
LOCAL_GL_RGBA,
LOCAL_GL_UNSIGNED_BYTE,
NULL);
nullptr);
// unbind this texture, in preparation for binding it to the FBO
mGLContext->fBindTexture(target, 0);
@ -911,7 +911,7 @@ CompositorOGL::CreateFBOWithTexture(const IntRect& aRect, SurfaceInitMode aInit,
0,
LOCAL_GL_RGBA,
LOCAL_GL_UNSIGNED_BYTE,
NULL);
nullptr);
}
mGLContext->fTexParameteri(mFBOTextureTarget, LOCAL_GL_TEXTURE_MIN_FILTER,
LOCAL_GL_LINEAR);

View File

@ -347,7 +347,7 @@ ContainerRender(Container* aContainer,
}
ContainerLayerOGL::ContainerLayerOGL(LayerManagerOGL *aManager)
: ContainerLayer(aManager, NULL)
: ContainerLayer(aManager, nullptr)
, LayerOGL(aManager)
{
mImplData = static_cast<LayerOGL*>(this);

View File

@ -395,7 +395,7 @@ UploadYUVToTexture(GLContext* gl, const PlanarYCbCrImage::Data& aData,
}
ImageLayerOGL::ImageLayerOGL(LayerManagerOGL *aManager)
: ImageLayer(aManager, NULL)
: ImageLayer(aManager, nullptr)
, LayerOGL(aManager)
, mTextureRecycleBin(new TextureRecycleBin())
{

View File

@ -339,7 +339,7 @@ LayerManagerOGL::Initialize(bool force)
0,
LOCAL_GL_RGBA,
LOCAL_GL_UNSIGNED_BYTE,
NULL);
nullptr);
// unbind this texture, in preparation for binding it to the FBO
mGLContext->fBindTexture(target, 0);
@ -564,7 +564,7 @@ LayerManagerOGL::EndTransaction(DrawThebesLayerCallback aCallback,
mThebesLayerCallbackData = nullptr;
}
mTarget = NULL;
mTarget = nullptr;
#ifdef MOZ_LAYERS_HAVE_LOG
Log();
@ -1078,7 +1078,7 @@ LayerManagerOGL::SetupBackBuffer(int aWidth, int aHeight)
0,
LOCAL_GL_RGBA,
LOCAL_GL_UNSIGNED_BYTE,
NULL);
nullptr);
mGLContext->fBindTexture(mFBOTextureTarget, 0);
mGLContext->fBindFramebuffer(LOCAL_GL_FRAMEBUFFER, mBackBufferFBO);
@ -1236,7 +1236,7 @@ LayerManagerOGL::CreateFBOWithTexture(const nsIntRect& aRect, InitMode aInit,
0,
LOCAL_GL_RGBA,
LOCAL_GL_UNSIGNED_BYTE,
NULL);
nullptr);
}
mGLContext->fTexParameteri(mFBOTextureTarget, LOCAL_GL_TEXTURE_MIN_FILTER,
LOCAL_GL_LINEAR);

View File

@ -16,7 +16,7 @@
#include <windows.h>
#endif
#define BUFFER_OFFSET(i) ((char *)NULL + (i))
#define BUFFER_OFFSET(i) ((char *)nullptr + (i))
#include "gfxContext.h"
#include "gfx3DMatrix.h"
@ -321,7 +321,7 @@ private:
nsIntSize mSurfaceSize;
/**
* Context target, NULL when drawing directly to our swap chain.
* Context target, nullptr when drawing directly to our swap chain.
*/
nsRefPtr<gfxContext> mTarget;

View File

@ -329,7 +329,7 @@ ShaderProgramOGL::CreateShader(GLenum aShaderType, const char *aShaderSource)
GLint success, len = 0;
GLint sh = mGL->fCreateShader(aShaderType);
mGL->fShaderSource(sh, 1, (const GLchar**)&aShaderSource, NULL);
mGL->fShaderSource(sh, 1, (const GLchar**)&aShaderSource, nullptr);
mGL->fCompileShader(sh);
mGL->fGetShaderiv(sh, LOCAL_GL_COMPILE_STATUS, &success);
mGL->fGetShaderiv(sh, LOCAL_GL_INFO_LOG_LENGTH, (GLint*) &len);

View File

@ -12,10 +12,10 @@
namespace mozilla {
namespace gl {
static GLContext* sActiveContext = NULL;
static GLContext* sActiveContext = nullptr;
static Monitor* sMonitor = NULL;
static nsDeque* sTextures = NULL;
static Monitor* sMonitor = nullptr;
static nsDeque* sTextures = nullptr;
GLuint TexturePoolOGL::AcquireTexture()
{
@ -89,7 +89,7 @@ void TexturePoolOGL::Fill(GLContext* aContext)
sActiveContext->MakeCurrent();
GLuint* texture = NULL;
GLuint* texture = nullptr;
while (sTextures->GetSize() < TEXTURE_POOL_SIZE) {
texture = (GLuint*)malloc(sizeof(GLuint));
sActiveContext->fGenTextures(1, texture);