diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-31 21:42:02 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-31 21:42:02 +0000 |
commit | 9d756882750dabd1abbe70b30292531abb86a34b (patch) | |
tree | cd6f3ba4d5481a39953e87570abf9a1402630772 /content/gpu/gpu_info_collector.cc | |
parent | 8ca0b64248afd305ff938b080afdcb880a98e61b (diff) | |
download | chromium_src-9d756882750dabd1abbe70b30292531abb86a34b.zip chromium_src-9d756882750dabd1abbe70b30292531abb86a34b.tar.gz chromium_src-9d756882750dabd1abbe70b30292531abb86a34b.tar.bz2 |
Support for glSetSurfaceCHROMIUM.
This command allows a previously created GPU surface to be made current for a command buffer. There are no surfaces registered at this point so this command is currently a no-op.
Review URL: http://codereview.chromium.org/7077001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87371 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/gpu/gpu_info_collector.cc')
-rw-r--r-- | content/gpu/gpu_info_collector.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/content/gpu/gpu_info_collector.cc b/content/gpu/gpu_info_collector.cc index 80c98fa..2e4630b 100644 --- a/content/gpu/gpu_info_collector.cc +++ b/content/gpu/gpu_info_collector.cc @@ -18,20 +18,20 @@ namespace { -gfx::GLSurface* InitializeGLSurface() { - scoped_ptr<gfx::GLSurface> surface(gfx::GLSurface::CreateOffscreenGLSurface( - gfx::Size(1, 1))); +scoped_refptr<gfx::GLSurface> InitializeGLSurface() { + scoped_refptr<gfx::GLSurface> surface( + gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1))); if (!surface.get()) { LOG(ERROR) << "gfx::GLContext::CreateOffscreenGLSurface failed"; return NULL; } - return surface.release(); + return surface; } -gfx::GLContext* InitializeGLContext(gfx::GLSurface* surface) { +scoped_refptr<gfx::GLContext> InitializeGLContext(gfx::GLSurface* surface) { - scoped_ptr<gfx::GLContext> context(gfx::GLContext::CreateGLContext(NULL, + scoped_refptr<gfx::GLContext> context(gfx::GLContext::CreateGLContext(NULL, surface)); if (!context.get()) { LOG(ERROR) << "gfx::GLContext::CreateGLContext failed"; @@ -43,7 +43,7 @@ gfx::GLContext* InitializeGLContext(gfx::GLSurface* surface) { return NULL; } - return context.release(); + return context; } std::string GetGLString(unsigned int pname) { @@ -84,11 +84,11 @@ bool CollectGraphicsInfoGL(GPUInfo* gpu_info) { return false; } - scoped_ptr<gfx::GLSurface> surface(InitializeGLSurface()); + scoped_refptr<gfx::GLSurface> surface(InitializeGLSurface()); if (!surface.get()) return false; - scoped_ptr<gfx::GLContext> context(InitializeGLContext(surface.get())); + scoped_refptr<gfx::GLContext> context(InitializeGLContext(surface.get())); if (!context.get()) return false; |