Skip to content

Commit

Permalink
A few less TOUCH_UIs.
Browse files Browse the repository at this point in the history
There is no more TOUCH_UI. This is a NO-OP because defined(UI_COMPOSITOR_IMAGE_TRANSPORT) ==> !defined(TOOLKIT_USES_GTK).

BUG=None
TEST=None

Review URL: http://codereview.chromium.org/8617001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111142 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
backer@chromium.org committed Nov 22, 2011
1 parent 6c2b810 commit a0d9891
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions content/browser/gpu/gpu_process_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -400,7 +400,7 @@ void GpuProcessHost::CreateViewCommandBuffer(
DCHECK(CalledOnValidThread());
linked_ptr<CreateCommandBufferCallback> 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
Expand All @@ -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<ViewID, linked_ptr<SurfaceRef> >(
view_id, surface_ref));
#endif
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion content/browser/gpu/gpu_process_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class GpuProcessHost : public BrowserChildProcessHost,
std::queue<linked_ptr<CreateCommandBufferCallback> >
create_command_buffer_requests_;

#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI)
#if defined(TOOLKIT_USES_GTK)
typedef std::pair<int32 /* renderer_id */,
int32 /* render_view_id */> ViewID;

Expand Down
6 changes: 3 additions & 3 deletions content/browser/gpu/gpu_process_host_ui_shim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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,
Expand All @@ -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<GdkWindow*>(
gdk_xid_table_lookup(handle));
if (window) {
Expand Down
3 changes: 1 addition & 2 deletions content/browser/gpu/gpu_process_host_ui_shim.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion content/common/gpu/gpu_channel_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion gpu/command_buffer/service/gles2_cmd_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2787,7 +2787,8 @@ error::Error GLES2DecoderImpl::HandleResizeCHROMIUM(
GLuint width = static_cast<GLuint>(c.width);
GLuint height = static_cast<GLuint>(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
Expand Down
2 changes: 1 addition & 1 deletion gpu/gpu.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
'../build/linux/system.gyp:gtk',
],
}],
['touchui==1', {
['ui_compositor_image_transport==1', {
'include_dirs': [
'<(DEPTH)/third_party/angle/include',
],
Expand Down

0 comments on commit a0d9891

Please sign in to comment.