diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 20:06:02 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 20:06:02 +0000 |
commit | 34ff8b0ce22406a4f8777ea3da9e08fc02af6beb (patch) | |
tree | c59971cc688bbb3aeb383e3a36cb29164bbde589 /chrome/gpu | |
parent | 1599077a645a03c31c09efe57befaefbe00c958a (diff) | |
download | chromium_src-34ff8b0ce22406a4f8777ea3da9e08fc02af6beb.zip chromium_src-34ff8b0ce22406a4f8777ea3da9e08fc02af6beb.tar.gz chromium_src-34ff8b0ce22406a4f8777ea3da9e08fc02af6beb.tar.bz2 |
Add offscreen context creation attributes to GGL.
View contexts and more extensive color format picking not handled yet.
BUG=39849
TEST=WebGL conformance tests (context*.html)
Review URL: http://codereview.chromium.org/3302019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu')
-rw-r--r-- | chrome/gpu/gpu_channel.cc | 15 | ||||
-rw-r--r-- | chrome/gpu/gpu_channel.h | 2 | ||||
-rw-r--r-- | chrome/gpu/gpu_command_buffer_stub.cc | 3 | ||||
-rw-r--r-- | chrome/gpu/gpu_command_buffer_stub.h | 4 |
4 files changed, 19 insertions, 5 deletions
diff --git a/chrome/gpu/gpu_channel.cc b/chrome/gpu/gpu_channel.cc index 1abd62c6..c5c5025 100644 --- a/chrome/gpu/gpu_channel.cc +++ b/chrome/gpu/gpu_channel.cc @@ -145,18 +145,22 @@ void GpuChannel::OnCreateViewCommandBuffer(gfx::NativeViewId view_id, #endif *route_id = GenerateRouteID(); + // TODO(enne): implement context creation attributes for view buffers + std::vector<int32> attribs; scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub( - this, handle, NULL, gfx::Size(), 0, *route_id, + this, handle, NULL, gfx::Size(), attribs, 0, *route_id, renderer_id_, render_view_id)); router_.AddRoute(*route_id, stub.get()); stubs_.AddWithID(stub.release(), *route_id); #endif // ENABLE_GPU } -void GpuChannel::OnCreateOffscreenCommandBuffer(int32 parent_route_id, - const gfx::Size& size, - uint32 parent_texture_id, - int32* route_id) { +void GpuChannel::OnCreateOffscreenCommandBuffer( + int32 parent_route_id, + const gfx::Size& size, + const std::vector<int32>& attribs, + uint32 parent_texture_id, + int32* route_id) { #if defined(ENABLE_GPU) *route_id = GenerateRouteID(); GpuCommandBufferStub* parent_stub = NULL; @@ -168,6 +172,7 @@ void GpuChannel::OnCreateOffscreenCommandBuffer(int32 parent_route_id, gfx::kNullPluginWindow, parent_stub, size, + attribs, parent_texture_id, *route_id, 0, 0)); diff --git a/chrome/gpu/gpu_channel.h b/chrome/gpu/gpu_channel.h index f21007f..13994c3 100644 --- a/chrome/gpu/gpu_channel.h +++ b/chrome/gpu/gpu_channel.h @@ -7,6 +7,7 @@ #pragma once #include <string> +#include <vector> #include "base/id_map.h" #include "base/scoped_open_process.h" @@ -69,6 +70,7 @@ class GpuChannel : public IPC::Channel::Listener, int32* route_id); void OnCreateOffscreenCommandBuffer(int32 parent_route_id, const gfx::Size& size, + const std::vector<int32>& attribs, uint32 parent_texture_id, int32* route_id); void OnDestroyCommandBuffer(int32 route_id); diff --git a/chrome/gpu/gpu_command_buffer_stub.cc b/chrome/gpu/gpu_command_buffer_stub.cc index 9445074..040dcef 100644 --- a/chrome/gpu/gpu_command_buffer_stub.cc +++ b/chrome/gpu/gpu_command_buffer_stub.cc @@ -18,6 +18,7 @@ GpuCommandBufferStub::GpuCommandBufferStub(GpuChannel* channel, gfx::PluginWindowHandle handle, GpuCommandBufferStub* parent, const gfx::Size& size, + const std::vector<int32>& attribs, uint32 parent_texture_id, int32 route_id, int32 renderer_id, @@ -27,6 +28,7 @@ GpuCommandBufferStub::GpuCommandBufferStub(GpuChannel* channel, parent_( parent ? parent->AsWeakPtr() : base::WeakPtr<GpuCommandBufferStub>()), initial_size_(size), + requested_attribs_(attribs), parent_texture_id_(parent_texture_id), route_id_(route_id), renderer_id_(renderer_id), @@ -84,6 +86,7 @@ void GpuCommandBufferStub::OnInitialize( if (processor_->Initialize( handle_, initial_size_, + requested_attribs_, parent_processor, parent_texture_id_)) { command_buffer_->SetPutOffsetChangeCallback( diff --git a/chrome/gpu/gpu_command_buffer_stub.h b/chrome/gpu/gpu_command_buffer_stub.h index 6f7e3df..f217469 100644 --- a/chrome/gpu/gpu_command_buffer_stub.h +++ b/chrome/gpu/gpu_command_buffer_stub.h @@ -8,6 +8,8 @@ #if defined(ENABLE_GPU) +#include <vector> + #include "base/process.h" #include "base/weak_ptr.h" #include "gfx/native_widget_types.h" @@ -28,6 +30,7 @@ class GpuCommandBufferStub gfx::PluginWindowHandle handle, GpuCommandBufferStub* parent, const gfx::Size& size, + const std::vector<int32>& attribs, uint32 parent_texture_id, int32 route_id, int32 renderer_id, @@ -75,6 +78,7 @@ class GpuCommandBufferStub gfx::PluginWindowHandle handle_; base::WeakPtr<GpuCommandBufferStub> parent_; gfx::Size initial_size_; + std::vector<int32> requested_attribs_; uint32 parent_texture_id_; int32 route_id_; |