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

Unified Diff: gpu/config/gpu_info_collector.cc

Issue 16293004: Update gpu/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 7 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 | « gpu/config/gpu_control_list_entry_unittest.cc ('k') | gpu/gles2_conform_support/egl/display.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_info_collector.cc
diff --git a/gpu/config/gpu_info_collector.cc b/gpu/config/gpu_info_collector.cc
index e141e577e55652a6a1b1f42d2d536b0819cc2dc6..7540dd86e433c3c50f6d1aca688ebab5e3f19326 100644
--- a/gpu/config/gpu_info_collector.cc
+++ b/gpu/config/gpu_info_collector.cc
@@ -23,7 +23,7 @@ namespace {
scoped_refptr<gfx::GLSurface> InitializeGLSurface() {
scoped_refptr<gfx::GLSurface> surface(
gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1)));
- if (!surface) {
+ if (!surface.get()) {
LOG(ERROR) << "gfx::GLContext::CreateOffscreenGLSurface failed";
return NULL;
}
@@ -37,7 +37,7 @@ scoped_refptr<gfx::GLContext> InitializeGLContext(gfx::GLSurface* surface) {
gfx::GLContext::CreateGLContext(NULL,
surface,
gfx::PreferIntegratedGpu));
- if (!context) {
+ if (!context.get()) {
LOG(ERROR) << "gfx::GLContext::CreateGLContext failed";
return NULL;
}
@@ -88,11 +88,11 @@ bool CollectGraphicsInfoGL(GPUInfo* gpu_info) {
}
scoped_refptr<gfx::GLSurface> surface(InitializeGLSurface());
- if (!surface)
+ if (!surface.get())
return false;
scoped_refptr<gfx::GLContext> context(InitializeGLContext(surface.get()));
- if (!context)
+ if (!context.get())
return false;
gpu_info->gl_renderer = GetGLString(GL_RENDERER);
« no previous file with comments | « gpu/config/gpu_control_list_entry_unittest.cc ('k') | gpu/gles2_conform_support/egl/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698