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

Unified Diff: content/common/gpu/media/rendering_helper.cc

Issue 649533003: C++11 declares a type safe null pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Presubmit errors Created 6 years, 2 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 | « content/common/gpu/media/h264_dpb.cc ('k') | content/common/gpu/media/tegra_v4l2_video_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/rendering_helper.cc
diff --git a/content/common/gpu/media/rendering_helper.cc b/content/common/gpu/media/rendering_helper.cc
index 6693f5f07dd5a2cb2b983ea5d289d1a1dc7b835c..77931b289bb1ad1832bae8add4c8757649637fcf 100644
--- a/content/common/gpu/media/rendering_helper.cc
+++ b/content/common/gpu/media/rendering_helper.cc
@@ -48,7 +48,7 @@ static void CreateShader(GLuint program,
glGetShaderiv(shader, GL_COMPILE_STATUS, &result);
if (!result) {
char log[4096];
- glGetShaderInfoLog(shader, arraysize(log), NULL, log);
+ glGetShaderInfoLog(shader, arraysize(log), nullptr, log);
LOG(FATAL) << log;
}
glAttachShader(program, shader);
@@ -135,10 +135,10 @@ void RenderingHelper::Initialize(const RenderingHelperParams& params,
0,
screen_size_.width(),
screen_size_.height(),
- NULL,
- NULL,
- NULL,
- NULL);
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr);
#elif defined(USE_X11)
Display* display = gfx::GetXDisplay();
Screen* screen = DefaultScreenOfDisplay(display);
@@ -175,7 +175,7 @@ void RenderingHelper::Initialize(const RenderingHelperParams& params,
gl_surface_ = gfx::GLSurface::CreateViewGLSurface(window_);
gl_context_ = gfx::GLContext::CreateGLContext(
- NULL, gl_surface_.get(), gfx::PreferIntegratedGpu);
+ nullptr, gl_surface_.get(), gfx::PreferIntegratedGpu);
gl_context_->MakeCurrent(gl_surface_.get());
CHECK_GT(params.window_sizes.size(), 0U);
@@ -204,7 +204,7 @@ void RenderingHelper::Initialize(const RenderingHelperParams& params,
0,
GL_RGB,
GL_UNSIGNED_SHORT_5_6_5,
- NULL);
+ nullptr);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
@@ -283,7 +283,7 @@ void RenderingHelper::Initialize(const RenderingHelperParams& params,
glGetProgramiv(program_, GL_LINK_STATUS, &result);
if (!result) {
char log[4096];
- glGetShaderInfoLog(program_, arraysize(log), NULL, log);
+ glGetShaderInfoLog(program_, arraysize(log), nullptr, log);
LOG(FATAL) << log;
}
glUseProgram(program_);
@@ -316,8 +316,8 @@ void RenderingHelper::UnInitialize(base::WaitableEvent* done) {
}
gl_context_->ReleaseCurrent(gl_surface_.get());
- gl_context_ = NULL;
- gl_surface_ = NULL;
+ gl_context_ = nullptr;
+ gl_surface_ = nullptr;
Clear();
done->Signal();
@@ -348,7 +348,7 @@ void RenderingHelper::CreateTexture(uint32 texture_target,
0,
GL_RGBA,
GL_UNSIGNED_BYTE,
- NULL);
+ nullptr);
}
glTexParameteri(texture_target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(texture_target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
@@ -450,9 +450,9 @@ void* RenderingHelper::GetGLDisplay() {
void RenderingHelper::Clear() {
videos_.clear();
- message_loop_ = NULL;
- gl_context_ = NULL;
- gl_surface_ = NULL;
+ message_loop_ = nullptr;
+ gl_context_ = nullptr;
+ gl_surface_ = nullptr;
render_as_thumbnails_ = false;
frame_count_ = 0;
« no previous file with comments | « content/common/gpu/media/h264_dpb.cc ('k') | content/common/gpu/media/tegra_v4l2_video_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698