diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc index c7b952ba61fd5b..fd2d2180ac57f2 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -97,7 +97,7 @@ void SendGpuProcessMessage(int renderer_id, } // anonymous namespace -#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) +#if defined(TOOLKIT_USES_GTK) // Used to put a lock on surfaces so that the window to which the GPU // process is drawing to doesn't disappear while it is drawing when // a tab is closed. @@ -122,7 +122,7 @@ GpuProcessHost::SurfaceRef::~SurfaceRef() { FROM_HERE, new ReleasePermanentXIDDispatcher(surface_)); } -#endif // defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) +#endif // defined(TOOLKIT_USES_GTK) // This class creates a GPU thread (instead of a GPU process), when running // with --in-process-gpu or --single-process. @@ -400,7 +400,7 @@ void GpuProcessHost::CreateViewCommandBuffer( DCHECK(CalledOnValidThread()); linked_ptr wrapped_callback(callback); -#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) +#if defined(TOOLKIT_USES_GTK) ViewID view_id(renderer_id, render_view_id); // There should only be one such command buffer (for the compositor). In @@ -413,13 +413,13 @@ void GpuProcessHost::CreateViewCommandBuffer( surface_ref = (*it).second; else surface_ref.reset(new SurfaceRef(compositing_surface)); -#endif // defined(TOOLKIT_USES_GTK) && defined(TOUCH_UI) +#endif // defined(TOOLKIT_USES_GTK) if (compositing_surface != gfx::kNullPluginWindow && Send(new GpuMsg_CreateViewCommandBuffer( compositing_surface, render_view_id, renderer_id, init_params))) { create_command_buffer_requests_.push(wrapped_callback); -#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) +#if defined(TOOLKIT_USES_GTK) surface_refs_.insert(std::pair >( view_id, surface_ref)); #endif @@ -472,12 +472,12 @@ void GpuProcessHost::OnCommandBufferCreated(const int32 route_id) { void GpuProcessHost::OnDestroyCommandBuffer( gfx::PluginWindowHandle window, int32 renderer_id, int32 render_view_id) { -#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) +#if defined(TOOLKIT_USES_GTK) ViewID view_id(renderer_id, render_view_id); SurfaceRefMap::iterator it = surface_refs_.find(view_id); if (it != surface_refs_.end()) surface_refs_.erase(it); -#endif // defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) +#endif // defined(TOOLKIT_USES_GTK) } void GpuProcessHost::OnGraphicsInfoCollected(const content::GPUInfo& gpu_info) { diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h index c6788b0fb57010..e6ba2c0d9c8913 100644 --- a/content/browser/gpu/gpu_process_host.h +++ b/content/browser/gpu/gpu_process_host.h @@ -126,7 +126,7 @@ class GpuProcessHost : public BrowserChildProcessHost, std::queue > create_command_buffer_requests_; -#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) +#if defined(TOOLKIT_USES_GTK) typedef std::pair ViewID; diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc index ed633d1e0f042d..04c2f6792d70a2 100644 --- a/content/browser/gpu/gpu_process_host_ui_shim.cc +++ b/content/browser/gpu/gpu_process_host_ui_shim.cc @@ -171,7 +171,7 @@ bool GpuProcessHostUIShim::OnControlMessageReceived( IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message) IPC_MESSAGE_HANDLER(GpuHostMsg_OnLogMessage, OnLogMessage) -#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) || defined(OS_WIN) +#if defined(TOOLKIT_USES_GTK) || defined(OS_WIN) IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView) #endif @@ -203,7 +203,7 @@ void GpuProcessHostUIShim::OnLogMessage( GpuDataManager::GetInstance()->AddLogMessage(dict); } -#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) || defined(OS_WIN) +#if defined(TOOLKIT_USES_GTK) || defined(OS_WIN) void GpuProcessHostUIShim::OnResizeView(int32 renderer_id, int32 render_view_id, @@ -230,7 +230,7 @@ void GpuProcessHostUIShim::OnResizeView(int32 renderer_id, // Resize the window synchronously. The GPU process must not issue GL // calls on the command buffer until the window is the size it expects it // to be. -#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) +#if defined(TOOLKIT_USES_GTK) GdkWindow* window = reinterpret_cast( gdk_xid_table_lookup(handle)); if (window) { diff --git a/content/browser/gpu/gpu_process_host_ui_shim.h b/content/browser/gpu/gpu_process_host_ui_shim.h index 1d17643af802b6..ca54d2e343796b 100644 --- a/content/browser/gpu/gpu_process_host_ui_shim.h +++ b/content/browser/gpu/gpu_process_host_ui_shim.h @@ -87,8 +87,7 @@ class GpuProcessHostUIShim void OnLogMessage(int level, const std::string& header, const std::string& message); -#if defined(TOOLKIT_USES_GTK) && !defined(UI_COMPOSITOR_IMAGE_TRANSPORT) || \ - defined(OS_WIN) +#if defined(TOOLKIT_USES_GTK) || defined(OS_WIN) void OnResizeView(int32 renderer_id, int32 render_view_id, int32 command_buffer_route_id, diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc index 850ae2a795e5d8..cd0b1153b87121 100644 --- a/content/common/gpu/gpu_channel_manager.cc +++ b/content/common/gpu/gpu_channel_manager.cc @@ -62,7 +62,7 @@ bool GpuChannelManager::OnMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER(GpuMsg_CreateViewCommandBuffer, OnCreateViewCommandBuffer) IPC_MESSAGE_HANDLER(GpuMsg_VisibilityChanged, OnVisibilityChanged) -#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) || defined(OS_WIN) +#if defined(TOOLKIT_USES_GTK) || defined(OS_WIN) IPC_MESSAGE_HANDLER(GpuMsg_ResizeViewACK, OnResizeViewACK); #endif IPC_MESSAGE_UNHANDLED(handled = false) diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index af3ff32e5c39b8..e8deed62af8147 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -2787,7 +2787,8 @@ error::Error GLES2DecoderImpl::HandleResizeCHROMIUM( GLuint width = static_cast(c.width); GLuint height = static_cast(c.height); TRACE_EVENT2("gpu", "glResizeChromium", "width", width, "height", height); -#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(TOUCH_UI) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && \ + !defined(UI_COMPOSITOR_IMAGE_TRANSPORT) // Make sure that we are done drawing to the back buffer before resizing. glFinish(); #endif diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp index 399f307de0049c..ab5650a2b517c6 100644 --- a/gpu/gpu.gyp +++ b/gpu/gpu.gyp @@ -242,7 +242,7 @@ '../build/linux/system.gyp:gtk', ], }], - ['touchui==1', { + ['ui_compositor_image_transport==1', { 'include_dirs': [ '<(DEPTH)/third_party/angle/include', ],