From 6217d397bf501ec1ec5b7270d493006badd4d87a Mon Sep 17 00:00:00 2001 From: "apatrick@chromium.org" Date: Thu, 25 Mar 2010 22:08:35 +0000 Subject: Calling OpenGL from the renderer process - Added ability for renderer processes to render to a real window (Windows only so far). - Added ability to create offscreen frame buffer objects that can be resized later. - OpenGL context can have a "parent" context that can access its last swapped back buffer through a texture ID. - Moved code to establish GPU channel from RenderWidget to RenderThread. - Changed way service size command buffer object lifetimes are managed. TEST=trybot and visual verification that OpenGL can clear the browser window to magenta. BUG=none Review URL: http://codereview.chromium.org/1136006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42679 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/plugin/command_buffer_stub.cc | 6 +++--- chrome/plugin/command_buffer_stub.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'chrome/plugin') diff --git a/chrome/plugin/command_buffer_stub.cc b/chrome/plugin/command_buffer_stub.cc index 7dc049c..de18db6 100644 --- a/chrome/plugin/command_buffer_stub.cc +++ b/chrome/plugin/command_buffer_stub.cc @@ -92,8 +92,8 @@ void CommandBufferStub::OnInitialize(int32 size, } // Initialize the GPUProcessor. - processor_ = new gpu::GPUProcessor(command_buffer_.get()); - if (!processor_->Initialize(window_)) { + processor_.reset(new gpu::GPUProcessor(command_buffer_.get())); + if (!processor_->Initialize(window_, NULL, gfx::Size(), 0)) { Destroy(); return; } @@ -175,7 +175,7 @@ void CommandBufferStub::OnGetTransferBuffer( } void CommandBufferStub::Destroy() { - processor_ = NULL; + processor_.reset(); command_buffer_.reset(); DestroyPlatformSpecific(); diff --git a/chrome/plugin/command_buffer_stub.h b/chrome/plugin/command_buffer_stub.h index 026110f..83564ca 100644 --- a/chrome/plugin/command_buffer_stub.h +++ b/chrome/plugin/command_buffer_stub.h @@ -73,7 +73,7 @@ class CommandBufferStub : public IPC::Channel::Listener, gfx::PluginWindowHandle window_; int route_id_; scoped_ptr command_buffer_; - scoped_refptr processor_; + scoped_ptr processor_; }; #endif // ENABLE_GPU -- cgit v1.1