diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 06:44:39 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 06:44:39 +0000 |
commit | a3ded6d49e31e7b03926e30ee04bdb74a622ca9a (patch) | |
tree | c785c8cac83b0e7c30e50dbd24ed650397c59adf /chrome/gpu/gpu_channel.cc | |
parent | 10156ef03d6985f8c0a9def13b02ad6fc3cee7f9 (diff) | |
download | chromium_src-a3ded6d49e31e7b03926e30ee04bdb74a622ca9a.zip chromium_src-a3ded6d49e31e7b03926e30ee04bdb74a622ca9a.tar.gz chromium_src-a3ded6d49e31e7b03926e30ee04bdb74a622ca9a.tar.bz2 |
Add Ability to pass in allowed extensions to GPU contexts.
Questions:
1) Is WebGraphicsContext3D only used for WebGL? Currently
this patch makes that assumption.
2) I started by adding const char* allowed_extensions to
a bunch of functions. Then, at the IPC level added
GPUInitParams. Should I use GPUInitParams everywhere?
3) Is the path for gpu_init_params.h ok?
TEST=unit tests, manually tested WebGL
BUG=none
Review URL: http://codereview.chromium.org/3775014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63026 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu/gpu_channel.cc')
-rw-r--r-- | chrome/gpu/gpu_channel.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/gpu/gpu_channel.cc b/chrome/gpu/gpu_channel.cc index fc2c09c..1ff2598 100644 --- a/chrome/gpu/gpu_channel.cc +++ b/chrome/gpu/gpu_channel.cc @@ -102,9 +102,11 @@ int GpuChannel::GenerateRouteID() { return ++last_id; } -void GpuChannel::OnCreateViewCommandBuffer(gfx::NativeViewId view_id, - int32 render_view_id, - int32* route_id) { +void GpuChannel::OnCreateViewCommandBuffer( + gfx::NativeViewId view_id, + int32 render_view_id, + const GPUCreateCommandBufferConfig& init_params, + int32* route_id) { *route_id = 0; #if defined(ENABLE_GPU) @@ -143,11 +145,9 @@ 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(), attribs, 0, *route_id, - renderer_id_, render_view_id)); + this, handle, NULL, gfx::Size(), init_params.allowed_extensions, + init_params.attribs, 0, *route_id, renderer_id_, render_view_id)); router_.AddRoute(*route_id, stub.get()); stubs_.AddWithID(stub.release(), *route_id); #endif // ENABLE_GPU @@ -156,7 +156,7 @@ void GpuChannel::OnCreateViewCommandBuffer(gfx::NativeViewId view_id, void GpuChannel::OnCreateOffscreenCommandBuffer( int32 parent_route_id, const gfx::Size& size, - const std::vector<int32>& attribs, + const GPUCreateCommandBufferConfig& init_params, uint32 parent_texture_id, int32* route_id) { #if defined(ENABLE_GPU) @@ -170,7 +170,8 @@ void GpuChannel::OnCreateOffscreenCommandBuffer( gfx::kNullPluginWindow, parent_stub, size, - attribs, + init_params.allowed_extensions, + init_params.attribs, parent_texture_id, *route_id, 0, 0)); |