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 #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/memory/linked_ptr.h" | 18 #include "base/memory/linked_ptr.h" |
19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
20 #include "base/threading/non_thread_safe.h" | 20 #include "base/threading/non_thread_safe.h" |
21 #include "content/common/content_export.h" | 21 #include "content/common/content_export.h" |
22 #include "content/common/message_router.h" | 22 #include "content/common/message_router.h" |
23 #include "content/public/common/gpu_info.h" | 23 #include "content/public/common/gpu_info.h" |
24 | 24 |
25 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; | 25 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
26 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; | 26 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; |
27 struct GpuHostMsg_AcceleratedSurfaceNew_Params; | 27 struct GpuHostMsg_AcceleratedSurfaceNew_Params; |
28 struct GpuHostMsg_AcceleratedSurfaceRelease_Params; | 28 struct GpuHostMsg_AcceleratedSurfaceRelease_Params; |
| 29 struct GpuHostMsg_AcceleratedSurfaceSuggestDiscard_Params; |
29 | 30 |
30 namespace gfx { | 31 namespace gfx { |
31 class Size; | 32 class Size; |
32 } | 33 } |
33 | 34 |
34 namespace IPC { | 35 namespace IPC { |
35 class Message; | 36 class Message; |
36 } | 37 } |
37 | 38 |
38 void RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg); | 39 void RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 void OnAcceleratedSurfaceSuspend(int32 surface_id); | 98 void OnAcceleratedSurfaceSuspend(int32 surface_id); |
98 | 99 |
99 #if defined(OS_MACOSX) || defined(USE_AURA) | 100 #if defined(OS_MACOSX) || defined(USE_AURA) |
100 void OnAcceleratedSurfaceNew( | 101 void OnAcceleratedSurfaceNew( |
101 const GpuHostMsg_AcceleratedSurfaceNew_Params& params); | 102 const GpuHostMsg_AcceleratedSurfaceNew_Params& params); |
102 #endif | 103 #endif |
103 | 104 |
104 #if defined(USE_AURA) | 105 #if defined(USE_AURA) |
105 void OnAcceleratedSurfaceRelease( | 106 void OnAcceleratedSurfaceRelease( |
106 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params); | 107 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params); |
| 108 void OnAcceleratedSurfaceSuggestDiscard( |
| 109 const GpuHostMsg_AcceleratedSurfaceSuggestDiscard_Params& params); |
107 #endif | 110 #endif |
108 | 111 |
109 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. | 112 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. |
110 int host_id_; | 113 int host_id_; |
111 }; | 114 }; |
112 | 115 |
113 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ | 116 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ |
OLD | NEW |