summaryrefslogtreecommitdiffstats
path: root/chrome/gpu/gpu_command_buffer_stub.h
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-25 22:08:35 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-25 22:08:35 +0000
commit6217d397bf501ec1ec5b7270d493006badd4d87a (patch)
treefce6c8e9c15b79bab29a9535ce9929dd9d53735b /chrome/gpu/gpu_command_buffer_stub.h
parent21dedcc12d21ccb288244249522d77bc074c501e (diff)
downloadchromium_src-6217d397bf501ec1ec5b7270d493006badd4d87a.zip
chromium_src-6217d397bf501ec1ec5b7270d493006badd4d87a.tar.gz
chromium_src-6217d397bf501ec1ec5b7270d493006badd4d87a.tar.bz2
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
Diffstat (limited to 'chrome/gpu/gpu_command_buffer_stub.h')
-rw-r--r--chrome/gpu/gpu_command_buffer_stub.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/chrome/gpu/gpu_command_buffer_stub.h b/chrome/gpu/gpu_command_buffer_stub.h
index eb927a3..7aaf68a 100644
--- a/chrome/gpu/gpu_command_buffer_stub.h
+++ b/chrome/gpu/gpu_command_buffer_stub.h
@@ -10,6 +10,7 @@
#include "base/process.h"
#include "base/ref_counted.h"
#include "gfx/native_widget_types.h"
+#include "gfx/size.h"
#include "gpu/command_buffer/service/command_buffer_service.h"
#include "gpu/command_buffer/service/gpu_processor.h"
#include "ipc/ipc_channel.h"
@@ -23,6 +24,10 @@ class GpuCommandBufferStub
public base::RefCountedThreadSafe<GpuCommandBufferStub> {
public:
GpuCommandBufferStub(GpuChannel* channel,
+ gfx::NativeView view,
+ GpuCommandBufferStub* parent,
+ const gfx::Size& size,
+ uint32 parent_texture_id,
int32 route_id);
virtual ~GpuCommandBufferStub();
@@ -33,7 +38,7 @@ class GpuCommandBufferStub
// IPC::Message::Sender implementation:
virtual bool Send(IPC::Message* msg);
- int route_id() const { return route_id_; }
+ int32 route_id() const { return route_id_; }
private:
// Message handlers:
@@ -47,12 +52,17 @@ class GpuCommandBufferStub
void OnGetTransferBuffer(int32 id,
base::SharedMemoryHandle* transfer_buffer,
uint32* size);
+ void OnResizeOffscreenFrameBuffer(const gfx::Size& size);
scoped_refptr<GpuChannel> channel_;
- int route_id_;
+ gfx::NativeView view_;
+ scoped_refptr<GpuCommandBufferStub> parent_;
+ gfx::Size initial_size_;
+ uint32 parent_texture_id_;
+ int32 route_id_;
scoped_ptr<gpu::CommandBufferService> command_buffer_;
- scoped_refptr<gpu::GPUProcessor> processor_;
+ scoped_ptr<gpu::GPUProcessor> processor_;
DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
};