diff options
-rw-r--r-- | content/common/gpu/gpu_channel_manager.cc | 2 | ||||
-rw-r--r-- | content/common/gpu/gpu_command_buffer_stub.cc | 5 | ||||
-rw-r--r-- | content/common/gpu/gpu_command_buffer_stub.h | 4 | ||||
-rw-r--r-- | content/gpu/gpu_info_collector.cc | 2 | ||||
-rw-r--r-- | content/gpu/gpu_info_collector_win.cc | 2 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_demo.cc | 1 | ||||
-rw-r--r-- | gpu/command_buffer/service/gpu_scheduler.h | 1 | ||||
-rw-r--r-- | gpu/command_buffer/service/gpu_scheduler_linux.cc | 8 | ||||
-rw-r--r-- | gpu/command_buffer/service/gpu_scheduler_mac.cc | 3 | ||||
-rw-r--r-- | gpu/command_buffer/service/gpu_scheduler_win.cc | 6 | ||||
-rw-r--r-- | gpu/demos/framework/window.cc | 2 |
11 files changed, 24 insertions, 12 deletions
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc index a0b520c..c2ef865 100644 --- a/content/common/gpu/gpu_channel_manager.cc +++ b/content/common/gpu/gpu_channel_manager.cc @@ -71,7 +71,7 @@ void GpuChannelManager::OnEstablishChannel(int renderer_id) { GpuChannelMap::const_iterator iter = gpu_channels_.find(renderer_id); if (iter == gpu_channels_.end()) - channel = new GpuChannel(this, watchdog_, renderer_id); + channel = new GpuChannel(this, watchdog_, renderer_id, false); else channel = iter->second; diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc index 8034372..6de811d 100644 --- a/content/common/gpu/gpu_command_buffer_stub.cc +++ b/content/common/gpu/gpu_command_buffer_stub.cc @@ -36,7 +36,8 @@ GpuCommandBufferStub::GpuCommandBufferStub( int32 route_id, int32 renderer_id, int32 render_view_id, - GpuWatchdog* watchdog) + GpuWatchdog* watchdog, + bool software) : channel_(channel), handle_(handle), initial_size_(size), @@ -44,6 +45,7 @@ GpuCommandBufferStub::GpuCommandBufferStub( allowed_extensions_(allowed_extensions), requested_attribs_(attribs), route_id_(route_id), + software_(software), last_flush_count_(0), renderer_id_(renderer_id), render_view_id_(render_view_id), @@ -148,6 +150,7 @@ void GpuCommandBufferStub::OnInitialize( if (scheduler_->Initialize( handle_, initial_size_, + software_, disallowed_extensions_, allowed_extensions_.c_str(), requested_attribs_, diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h index 6766d87..902ec9b 100644 --- a/content/common/gpu/gpu_command_buffer_stub.h +++ b/content/common/gpu/gpu_command_buffer_stub.h @@ -41,7 +41,8 @@ class GpuCommandBufferStub int32 route_id, int32 renderer_id, int32 render_view_id, - GpuWatchdog* watchdog); + GpuWatchdog* watchdog, + bool software); virtual ~GpuCommandBufferStub(); @@ -155,6 +156,7 @@ class GpuCommandBufferStub std::string allowed_extensions_; std::vector<int32> requested_attribs_; int32 route_id_; + bool software_; uint32 last_flush_count_; // The following two fields are used on Mac OS X to identify the window diff --git a/content/gpu/gpu_info_collector.cc b/content/gpu/gpu_info_collector.cc index 93cd767..cd0918c 100644 --- a/content/gpu/gpu_info_collector.cc +++ b/content/gpu/gpu_info_collector.cc @@ -20,7 +20,7 @@ namespace { scoped_refptr<gfx::GLSurface> InitializeGLSurface() { scoped_refptr<gfx::GLSurface> surface( - gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1))); + gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1))); if (!surface.get()) { LOG(ERROR) << "gfx::GLContext::CreateOffscreenGLSurface failed"; return NULL; diff --git a/content/gpu/gpu_info_collector_win.cc b/content/gpu/gpu_info_collector_win.cc index 4e32805..dfae814 100644 --- a/content/gpu/gpu_info_collector_win.cc +++ b/content/gpu/gpu_info_collector_win.cc @@ -72,7 +72,7 @@ bool CollectGraphicsInfo(GPUInfo* gpu_info) { // Need to handle the case when running on top of real EGL/GLES2 drivers. egl::Display* display = static_cast<egl::Display*>( - gfx::GLSurfaceEGL::GetDisplay()); + gfx::GLSurfaceEGL::GetHardwareDisplay()); if (!display) { LOG(ERROR) << "gfx::BaseEGLContext::GetDisplay() failed"; return false; diff --git a/gpu/command_buffer/client/gles2_demo.cc b/gpu/command_buffer/client/gles2_demo.cc index c9595df..f981b1b 100644 --- a/gpu/command_buffer/client/gles2_demo.cc +++ b/gpu/command_buffer/client/gles2_demo.cc @@ -61,6 +61,7 @@ bool GLES2Demo::Setup(void* hwnd, int32 size) { NULL); if (!gpu_scheduler->Initialize(reinterpret_cast<HWND>(hwnd), gfx::Size(), + false, gpu::gles2::DisallowedExtensions(), NULL, std::vector<int32>(), diff --git a/gpu/command_buffer/service/gpu_scheduler.h b/gpu/command_buffer/service/gpu_scheduler.h index eedae30..d34e67f 100644 --- a/gpu/command_buffer/service/gpu_scheduler.h +++ b/gpu/command_buffer/service/gpu_scheduler.h @@ -63,6 +63,7 @@ class GpuScheduler : public CommandBufferEngine { // Perform platform specific and common initialization. bool Initialize(gfx::PluginWindowHandle hwnd, const gfx::Size& size, + bool software, const gles2::DisallowedExtensions& disallowed_extensions, const char* allowed_extensions, const std::vector<int32>& attribs, diff --git a/gpu/command_buffer/service/gpu_scheduler_linux.cc b/gpu/command_buffer/service/gpu_scheduler_linux.cc index 1c6c8e9..fcbbd65 100644 --- a/gpu/command_buffer/service/gpu_scheduler_linux.cc +++ b/gpu/command_buffer/service/gpu_scheduler_linux.cc @@ -21,6 +21,7 @@ namespace gpu { bool GpuScheduler::Initialize( gfx::PluginWindowHandle window, const gfx::Size& size, + bool software, const gles2::DisallowedExtensions& disallowed_extensions, const char* allowed_extensions, const std::vector<int32>& attribs, @@ -28,12 +29,13 @@ bool GpuScheduler::Initialize( // Create either a view or pbuffer based GLSurface. scoped_refptr<gfx::GLSurface> surface; #if defined(TOUCH_UI) - surface = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); + surface = gfx::GLSurface::CreateOffscreenGLSurface(software, gfx::Size(1, 1)); #else if (window) - surface = gfx::GLSurface::CreateViewGLSurface(window); + surface = gfx::GLSurface::CreateViewGLSurface(software, window); else - surface = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); + surface = gfx::GLSurface::CreateOffscreenGLSurface(software, + gfx::Size(1, 1)); #endif if (!surface.get()) { diff --git a/gpu/command_buffer/service/gpu_scheduler_mac.cc b/gpu/command_buffer/service/gpu_scheduler_mac.cc index 2835088..cfa0d5c 100644 --- a/gpu/command_buffer/service/gpu_scheduler_mac.cc +++ b/gpu/command_buffer/service/gpu_scheduler_mac.cc @@ -14,12 +14,13 @@ namespace gpu { bool GpuScheduler::Initialize( gfx::PluginWindowHandle window, const gfx::Size& size, + bool software, const gles2::DisallowedExtensions& disallowed_extensions, const char* allowed_extensions, const std::vector<int32>& attribs, gfx::GLShareGroup* share_group) { scoped_refptr<gfx::GLSurface> surface( - gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1))); + gfx::GLSurface::CreateOffscreenGLSurface(software, gfx::Size(1, 1))); if (!surface.get()) { LOG(ERROR) << "CreateOffscreenGLSurface failed.\n"; Destroy(); diff --git a/gpu/command_buffer/service/gpu_scheduler_win.cc b/gpu/command_buffer/service/gpu_scheduler_win.cc index 20e5382..84f2b83 100644 --- a/gpu/command_buffer/service/gpu_scheduler_win.cc +++ b/gpu/command_buffer/service/gpu_scheduler_win.cc @@ -16,6 +16,7 @@ namespace gpu { bool GpuScheduler::Initialize( gfx::PluginWindowHandle window, const gfx::Size& size, + bool software, const gles2::DisallowedExtensions& disallowed_extensions, const char* allowed_extensions, const std::vector<int32>& attribs, @@ -23,9 +24,10 @@ bool GpuScheduler::Initialize( // Create either a view or pbuffer based GLSurface. scoped_refptr<gfx::GLSurface> surface; if (window) { - surface = gfx::GLSurface::CreateViewGLSurface(window); + surface = gfx::GLSurface::CreateViewGLSurface(software, window); } else { - surface = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); + surface = gfx::GLSurface::CreateOffscreenGLSurface(software, + gfx::Size(1, 1)); } if (!surface.get()) { diff --git a/gpu/demos/framework/window.cc b/gpu/demos/framework/window.cc index 30ba86c..f609a55 100644 --- a/gpu/demos/framework/window.cc +++ b/gpu/demos/framework/window.cc @@ -61,7 +61,7 @@ bool Window::CreateRenderContext(gfx::PluginWindowHandle hwnd) { GpuScheduler* gpu_scheduler( new GpuScheduler(command_buffer.get(), NULL, NULL)); - if (!gpu_scheduler->Initialize(hwnd, gfx::Size(), + if (!gpu_scheduler->Initialize(hwnd, gfx::Size(), false, gpu::gles2::DisallowedExtensions(), NULL, std::vector<int32>(), NULL)) { |