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" |
11 #include "base/debug/trace_event.h" | 11 #include "base/debug/trace_event.h" |
12 #include "base/id_map.h" | 12 #include "base/id_map.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "content/browser/gpu/gpu_data_manager_impl.h" | 15 #include "content/browser/gpu/gpu_data_manager_impl.h" |
16 #include "content/browser/gpu/gpu_process_host.h" | 16 #include "content/browser/gpu/gpu_process_host.h" |
17 #include "content/browser/gpu/gpu_surface_tracker.h" | 17 #include "content/browser/gpu/gpu_surface_tracker.h" |
18 #include "content/browser/renderer_host/render_process_host_impl.h" | 18 #include "content/browser/renderer_host/render_process_host_impl.h" |
19 #include "content/browser/renderer_host/render_view_host_impl.h" | 19 #include "content/browser/renderer_host/render_view_host_impl.h" |
20 #include "content/common/gpu/gpu_messages.h" | 20 #include "content/common/gpu/gpu_messages.h" |
21 #include "content/port/browser/render_widget_host_view_port.h" | 21 #include "content/port/browser/render_widget_host_view_port.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #include "ui/gl/gl_switches.h" | 23 #include "ui/gl/gl_switches.h" |
24 | 24 |
| 25 // From gl2/gl2ext.h. |
| 26 #ifndef GL_MAILBOX_SIZE_CHROMIUM |
| 27 #define GL_MAILBOX_SIZE_CHROMIUM 64 |
| 28 #endif |
| 29 |
25 namespace content { | 30 namespace content { |
26 | 31 |
27 namespace { | 32 namespace { |
28 | 33 |
29 // One of the linux specific headers defines this as a macro. | 34 // One of the linux specific headers defines this as a macro. |
30 #ifdef DestroyAll | 35 #ifdef DestroyAll |
31 #undef DestroyAll | 36 #undef DestroyAll |
32 #endif | 37 #endif |
33 | 38 |
34 base::LazyInstance<IDMap<GpuProcessHostUIShim> > g_hosts_by_id = | 39 base::LazyInstance<IDMap<GpuProcessHostUIShim> > g_hosts_by_id = |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 view->AcceleratedSurfaceRelease(); | 381 view->AcceleratedSurfaceRelease(); |
377 } | 382 } |
378 | 383 |
379 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( | 384 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( |
380 const GPUVideoMemoryUsageStats& video_memory_usage_stats) { | 385 const GPUVideoMemoryUsageStats& video_memory_usage_stats) { |
381 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( | 386 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( |
382 video_memory_usage_stats); | 387 video_memory_usage_stats); |
383 } | 388 } |
384 | 389 |
385 } // namespace content | 390 } // namespace content |
OLD | NEW |