| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 5 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 g_hosts_by_id.Pointer()->Remove(host_id_); | 164 g_hosts_by_id.Pointer()->Remove(host_id_); |
| 165 } | 165 } |
| 166 | 166 |
| 167 bool GpuProcessHostUIShim::OnControlMessageReceived( | 167 bool GpuProcessHostUIShim::OnControlMessageReceived( |
| 168 const IPC::Message& message) { | 168 const IPC::Message& message) { |
| 169 DCHECK(CalledOnValidThread()); | 169 DCHECK(CalledOnValidThread()); |
| 170 | 170 |
| 171 IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message) | 171 IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message) |
| 172 IPC_MESSAGE_HANDLER(GpuHostMsg_OnLogMessage, | 172 IPC_MESSAGE_HANDLER(GpuHostMsg_OnLogMessage, |
| 173 OnLogMessage) | 173 OnLogMessage) |
| 174 #if defined(TOOLKIT_USES_GTK) || defined(OS_WIN) | 174 |
| 175 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, | 175 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, |
| 176 OnAcceleratedSurfaceBuffersSwapped) | 176 OnAcceleratedSurfaceBuffersSwapped) |
| 177 |
| 178 #if defined(TOOLKIT_USES_GTK) || defined(OS_WIN) |
| 177 IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView) | 179 IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView) |
| 178 #endif | 180 #endif |
| 179 | 181 |
| 180 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 182 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 181 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceNew, | 183 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceNew, |
| 182 OnAcceleratedSurfaceNew) | 184 OnAcceleratedSurfaceNew) |
| 183 #endif | 185 #endif |
| 184 | 186 |
| 185 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 187 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 186 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceRelease, | 188 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceRelease, |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 params.render_view_id); | 348 params.render_view_id); |
| 347 if (!host) | 349 if (!host) |
| 348 return; | 350 return; |
| 349 RenderWidgetHostView* view = host->view(); | 351 RenderWidgetHostView* view = host->view(); |
| 350 if (!view) | 352 if (!view) |
| 351 return; | 353 return; |
| 352 view->AcceleratedSurfaceRelease(params.identifier); | 354 view->AcceleratedSurfaceRelease(params.identifier); |
| 353 } | 355 } |
| 354 | 356 |
| 355 #endif | 357 #endif |
| OLD | NEW |