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 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ |
6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // This class lives on the UI thread and supports classes like the | 9 // This class lives on the UI thread and supports classes like the |
10 // BackingStoreProxy, which must live on the UI thread. The IO thread | 10 // BackingStoreProxy, which must live on the UI thread. The IO thread |
11 // portion of this class, the GpuProcessHost, is responsible for | 11 // portion of this class, the GpuProcessHost, is responsible for |
12 // shuttling messages between the browser and GPU processes. | 12 // shuttling messages between the browser and GPU processes. |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/callback_forward.h" | 16 #include "base/callback_forward.h" |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/task.h" | 18 #include "base/task.h" |
19 #include "base/memory/linked_ptr.h" | 19 #include "base/memory/linked_ptr.h" |
20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
21 #include "base/threading/non_thread_safe.h" | 21 #include "base/threading/non_thread_safe.h" |
22 #include "content/common/content_export.h" | 22 #include "content/common/content_export.h" |
23 #include "content/common/message_router.h" | 23 #include "content/common/message_router.h" |
| 24 #include "content/public/common/gpu_info.h" |
24 | 25 |
25 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; | 26 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
26 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; | 27 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; |
27 struct GpuHostMsg_AcceleratedSurfaceNew_Params; | 28 struct GpuHostMsg_AcceleratedSurfaceNew_Params; |
28 struct GpuHostMsg_AcceleratedSurfaceRelease_Params; | 29 struct GpuHostMsg_AcceleratedSurfaceRelease_Params; |
29 | 30 |
30 namespace gfx { | 31 namespace gfx { |
31 class Size; | 32 class Size; |
32 } | 33 } |
33 | 34 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 94 |
94 void OnLogMessage(int level, const std::string& header, | 95 void OnLogMessage(int level, const std::string& header, |
95 const std::string& message); | 96 const std::string& message); |
96 #if defined(TOOLKIT_USES_GTK) || defined(OS_WIN) | 97 #if defined(TOOLKIT_USES_GTK) || defined(OS_WIN) |
97 void OnResizeView(int32 renderer_id, | 98 void OnResizeView(int32 renderer_id, |
98 int32 render_view_id, | 99 int32 render_view_id, |
99 int32 route_id, | 100 int32 route_id, |
100 gfx::Size size); | 101 gfx::Size size); |
101 #endif | 102 #endif |
102 | 103 |
| 104 void OnGraphicsInfoCollected(const content::GPUInfo& gpu_info); |
| 105 |
103 void OnAcceleratedSurfaceBuffersSwapped( | 106 void OnAcceleratedSurfaceBuffersSwapped( |
104 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params); | 107 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params); |
105 void OnAcceleratedSurfacePostSubBuffer( | 108 void OnAcceleratedSurfacePostSubBuffer( |
106 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params); | 109 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params); |
107 | 110 |
108 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 111 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
109 void OnAcceleratedSurfaceNew( | 112 void OnAcceleratedSurfaceNew( |
110 const GpuHostMsg_AcceleratedSurfaceNew_Params& params); | 113 const GpuHostMsg_AcceleratedSurfaceNew_Params& params); |
111 #endif | 114 #endif |
112 | 115 |
113 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 116 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
114 void OnAcceleratedSurfaceRelease( | 117 void OnAcceleratedSurfaceRelease( |
115 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params); | 118 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params); |
116 #endif | 119 #endif |
117 | 120 |
118 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. | 121 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. |
119 int host_id_; | 122 int host_id_; |
120 }; | 123 }; |
121 | 124 |
122 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ | 125 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ |
OLD | NEW |