diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-21 14:45:24 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-21 14:45:24 +0000 |
commit | 3a16cbc704db7e80d5184b932ad9d3b0b13f7dc7 (patch) | |
tree | 56537abb44f3a2c9ba2921e27ab4995bb68830dd /content/common/gpu/gpu_channel.cc | |
parent | f5d978cfcc87e29ac3284d9c518770d24c529699 (diff) | |
download | chromium_src-3a16cbc704db7e80d5184b932ad9d3b0b13f7dc7.zip chromium_src-3a16cbc704db7e80d5184b932ad9d3b0b13f7dc7.tar.gz chromium_src-3a16cbc704db7e80d5184b932ad9d3b0b13f7dc7.tar.bz2 |
Allow creating a gpu channel that uses software rendering
Where supported (on ANGLE with EGL_ANGLE_software_display), allow for the creation of gpu channels that use software rendering instead of hardware rendering.
BUG=
TEST=trybots, other later tests
Review URL: http://codereview.chromium.org/7383004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93393 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu/gpu_channel.cc')
-rw-r--r-- | content/common/gpu/gpu_channel.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc index e69d197..e83320d 100644 --- a/content/common/gpu/gpu_channel.cc +++ b/content/common/gpu/gpu_channel.cc @@ -27,13 +27,15 @@ GpuChannel::GpuChannel(GpuChannelManager* gpu_channel_manager, GpuWatchdog* watchdog, - int renderer_id) + int renderer_id, + bool software) : gpu_channel_manager_(gpu_channel_manager), renderer_id_(renderer_id), renderer_process_(base::kNullProcessHandle), renderer_pid_(base::kNullProcessId), share_group_(new gfx::GLShareGroup), - watchdog_(watchdog) { + watchdog_(watchdog), + software_(software) { DCHECK(gpu_channel_manager); DCHECK(renderer_id); const CommandLine* command_line = CommandLine::ForCurrentProcess(); @@ -164,7 +166,7 @@ void GpuChannel::CreateViewCommandBuffer( this, window, gfx::Size(), disallowed_extensions_, init_params.allowed_extensions, init_params.attribs, *route_id, renderer_id_, render_view_id, - watchdog_)); + watchdog_, software_)); router_.AddRoute(*route_id, stub.get()); stubs_.AddWithID(stub.release(), *route_id); #endif // ENABLE_GPU @@ -274,7 +276,8 @@ void GpuChannel::OnCreateOffscreenCommandBuffer( init_params.allowed_extensions, init_params.attribs, *route_id, - 0, 0, watchdog_)); + 0, 0, watchdog_, + software_)); router_.AddRoute(*route_id, stub.get()); stubs_.AddWithID(stub.release(), *route_id); TRACE_EVENT1("gpu", "GpuChannel::OnCreateOffscreenCommandBuffer", @@ -306,7 +309,7 @@ void GpuChannel::OnCreateOffscreenSurface(const gfx::Size& size, #if defined(ENABLE_GPU) scoped_refptr<gfx::GLSurface> surface( - gfx::GLSurface::CreateOffscreenGLSurface(size)); + gfx::GLSurface::CreateOffscreenGLSurface(software_, size)); if (!surface.get()) return; |