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/renderer/gpu_channel_host.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/renderer/gpu_channel_host.cc')
-rw-r--r-- | chrome/renderer/gpu_channel_host.cc | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/chrome/renderer/gpu_channel_host.cc b/chrome/renderer/gpu_channel_host.cc index de89774..0532d2e 100644 --- a/chrome/renderer/gpu_channel_host.cc +++ b/chrome/renderer/gpu_channel_host.cc @@ -5,6 +5,7 @@ #include "chrome/renderer/gpu_channel_host.h" #include "chrome/common/child_process.h" +#include "chrome/common/gpu_create_command_buffer_config.h" #include "chrome/common/gpu_messages.h" #include "chrome/renderer/command_buffer_proxy.h" #include "chrome/renderer/gpu_video_service_host.h" @@ -84,16 +85,22 @@ bool GpuChannelHost::Send(IPC::Message* message) { } CommandBufferProxy* GpuChannelHost::CreateViewCommandBuffer( - gfx::NativeViewId view, int render_view_id) { + gfx::NativeViewId view, + int render_view_id, + const std::string& allowed_extensions, + const std::vector<int32>& attribs) { #if defined(ENABLE_GPU) // An error occurred. Need to get the host again to reinitialize it. if (!channel_.get()) return NULL; + GPUCreateCommandBufferConfig init_params(allowed_extensions, attribs); int32 route_id; - if (!Send(new GpuChannelMsg_CreateViewCommandBuffer(view, - render_view_id, - &route_id)) && + if (!Send(new GpuChannelMsg_CreateViewCommandBuffer( + view, + render_view_id, + init_params, + &route_id)) && route_id != MSG_ROUTING_NONE) { return NULL; } @@ -110,6 +117,7 @@ CommandBufferProxy* GpuChannelHost::CreateViewCommandBuffer( CommandBufferProxy* GpuChannelHost::CreateOffscreenCommandBuffer( CommandBufferProxy* parent, const gfx::Size& size, + const std::string& allowed_extensions, const std::vector<int32>& attribs, uint32 parent_texture_id) { #if defined(ENABLE_GPU) @@ -117,11 +125,12 @@ CommandBufferProxy* GpuChannelHost::CreateOffscreenCommandBuffer( if (!channel_.get()) return NULL; + GPUCreateCommandBufferConfig init_params(allowed_extensions, attribs); int32 parent_route_id = parent ? parent->route_id() : 0; int32 route_id; if (!Send(new GpuChannelMsg_CreateOffscreenCommandBuffer(parent_route_id, size, - attribs, + init_params, parent_texture_id, &route_id)) && route_id != MSG_ROUTING_NONE) { |