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

Unified Diff: content/gpu/gpu_main.cc

Issue 16294003: Update content/ 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 | « content/gpu/gpu_child_thread.cc ('k') | content/plugin/plugin_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_main.cc
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index d8a713b8a692d540cf06501a6b0a3486f1d5049b..2bfd51f224df6a87a92185bf1c018e0078fb7736 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -276,24 +276,22 @@ namespace {
void CreateDummyGlContext() {
scoped_refptr<gfx::GLSurface> surface(
gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1)));
- if (!surface) {
+ if (!surface.get()) {
VLOG(1) << "gfx::GLSurface::CreateOffscreenGLSurface failed";
return;
}
// On Linux, this is needed to make sure /dev/nvidiactl has
// been opened and its descriptor cached.
- scoped_refptr<gfx::GLContext> context(
- gfx::GLContext::CreateGLContext(NULL,
- surface,
- gfx::PreferDiscreteGpu));
- if (!context) {
+ scoped_refptr<gfx::GLContext> context(gfx::GLContext::CreateGLContext(
+ NULL, surface.get(), gfx::PreferDiscreteGpu));
+ if (!context.get()) {
VLOG(1) << "gfx::GLContext::CreateGLContext failed";
return;
}
// Similarly, this is needed for /dev/nvidia0.
- if (context->MakeCurrent(surface)) {
+ if (context->MakeCurrent(surface.get())) {
context->ReleaseCurrent(surface.get());
} else {
VLOG(1) << "gfx::GLContext::MakeCurrent failed";
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/plugin/plugin_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698