diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-21 18:52:47 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-21 18:52:47 +0000 |
commit | f81f5950b78f7c0161d757d91ff3a3baa96e089b (patch) | |
tree | 11312132f3f8aa876dd021e6ce40fcaf551a6271 /content/common/gpu/gpu_channel.cc | |
parent | e25c33d1747f42be8171ff38d06fe9d797d46af0 (diff) | |
download | chromium_src-f81f5950b78f7c0161d757d91ff3a3baa96e089b.zip chromium_src-f81f5950b78f7c0161d757d91ff3a3baa96e089b.tar.gz chromium_src-f81f5950b78f7c0161d757d91ff3a3baa96e089b.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
TBR=apatrick
Review URL: http://codereview.chromium.org/7471042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93449 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; |