Chromium Code Reviews| Index: gpu/gles2_conform_support/native/egl_native_x11.cc |
| diff --git a/gpu/gles2_conform_support/native/egl_native_x11.cc b/gpu/gles2_conform_support/native/egl_native_x11.cc |
| index 7e4c4236259072ba15a4a539884e6cab1df3677e..2c1d8090699a2579a5709754b2aaf68f6fb11b87 100644 |
| --- a/gpu/gles2_conform_support/native/egl_native_x11.cc |
| +++ b/gpu/gles2_conform_support/native/egl_native_x11.cc |
| @@ -25,30 +25,23 @@ EGLImageKHR GTFCreateEGLImage(int width, int height, |
| }; |
| if (format != GL_RGBA && format != GL_RGB) |
| - return static_cast<EGLImageKHR>(NULL); |
| + return static_cast<EGLImageKHR>(nullptr); |
|
oshima
2016/08/02 19:44:57
unrelated changes?
rjkroege
2016/08/04 00:12:05
yes. pulled out into different CL.
|
| if (type != GL_UNSIGNED_BYTE) |
| - return static_cast<EGLImageKHR>(NULL); |
| + return static_cast<EGLImageKHR>(nullptr); |
| GLuint texture; |
| glGenTextures(1, &texture); |
| glBindTexture(GL_TEXTURE_2D, texture); |
| - glTexImage2D(GL_TEXTURE_2D, |
| - 0, |
| - format, |
| - width, |
| - height, |
| - 0, |
| - format, |
| - type, |
| - NULL); |
| + glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, type, |
| + nullptr); |
| // Disable mip-maps because we do not require it. |
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); |
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); |
| if(glGetError() != GL_NO_ERROR) |
| - return static_cast<EGLImageKHR>(NULL); |
| + return static_cast<EGLImageKHR>(nullptr); |
| EGLImageKHR egl_image = |
| egl_create_image_khr_(eglGetCurrentDisplay(), |
| @@ -60,7 +53,7 @@ EGLImageKHR GTFCreateEGLImage(int width, int height, |
| if (eglGetError() == EGL_SUCCESS) |
| return egl_image; |
| else |
| - return static_cast<EGLImageKHR>(NULL); |
| + return static_cast<EGLImageKHR>(nullptr); |
| } |
| void GTFDestroyEGLImage(EGLImageKHR image) { |