OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
200 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfacePostSubBuffer, | 200 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfacePostSubBuffer, |
201 OnAcceleratedSurfacePostSubBuffer) | 201 OnAcceleratedSurfacePostSubBuffer) |
202 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceSuspend, | 202 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceSuspend, |
203 OnAcceleratedSurfaceSuspend) | 203 OnAcceleratedSurfaceSuspend) |
204 IPC_MESSAGE_HANDLER(GpuHostMsg_GraphicsInfoCollected, | 204 IPC_MESSAGE_HANDLER(GpuHostMsg_GraphicsInfoCollected, |
205 OnGraphicsInfoCollected) | 205 OnGraphicsInfoCollected) |
206 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceNew, | 206 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceNew, |
207 OnAcceleratedSurfaceNew) | 207 OnAcceleratedSurfaceNew) |
208 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceRelease, | 208 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceRelease, |
209 OnAcceleratedSurfaceRelease) | 209 OnAcceleratedSurfaceRelease) |
210 | 210 IPC_MESSAGE_HANDLER(GpuHostMsg_Vidmem, |
greggman
2012/08/14 23:48:17
Sorry to bring this up again but "OnVidmem" has no
ccameron
2012/08/15 02:20:41
Yes, this was a poor name. I change the vague "Vi
| |
211 OnVidmem); | |
211 #if defined(TOOLKIT_GTK) || defined(OS_WIN) | 212 #if defined(TOOLKIT_GTK) || defined(OS_WIN) |
212 IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView) | 213 IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView) |
213 #endif | 214 #endif |
214 | 215 |
215 IPC_MESSAGE_UNHANDLED_ERROR() | 216 IPC_MESSAGE_UNHANDLED_ERROR() |
216 IPC_END_MESSAGE_MAP() | 217 IPC_END_MESSAGE_MAP() |
217 | 218 |
218 return true; | 219 return true; |
219 } | 220 } |
220 | 221 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
360 } | 361 } |
361 | 362 |
362 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( | 363 void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease( |
363 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { | 364 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) { |
364 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( | 365 RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID( |
365 params.surface_id); | 366 params.surface_id); |
366 if (!view) | 367 if (!view) |
367 return; | 368 return; |
368 view->AcceleratedSurfaceRelease(params.identifier); | 369 view->AcceleratedSurfaceRelease(params.identifier); |
369 } | 370 } |
371 | |
372 void GpuProcessHostUIShim::OnVidmem(const content::GPUVidmem& vidmem) { | |
373 GpuDataManagerImpl::GetInstance()->UpdateVidmem(vidmem); | |
374 } | |
375 | |
OLD | NEW |