Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(736)

Side by Side Diff: content/browser/gpu/gpu_process_host_ui_shim.h

Issue 1726343003: Revert of Mustash: move content::GPUVideoMemoryUsageStats to gpu::VideoMemoryUsageStats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 7
8 // This class lives on the UI thread and supports classes like the 8 // This class lives on the UI thread and supports classes like the
9 // BackingStoreProxy, which must live on the UI thread. The IO thread 9 // BackingStoreProxy, which must live on the UI thread. The IO thread
10 // portion of this class, the GpuProcessHost, is responsible for 10 // portion of this class, the GpuProcessHost, is responsible for
11 // shuttling messages between the browser and GPU processes. 11 // shuttling messages between the browser and GPU processes.
12 12
13 #include <stdint.h> 13 #include <stdint.h>
14 14
15 #include <string> 15 #include <string>
16 16
17 #include "base/callback.h" 17 #include "base/callback.h"
18 #include "base/compiler_specific.h" 18 #include "base/compiler_specific.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 "build/build_config.h" 22 #include "build/build_config.h"
23 #include "content/common/content_export.h" 23 #include "content/common/content_export.h"
24 #include "content/public/common/gpu_memory_stats.h"
24 #include "gpu/config/gpu_info.h" 25 #include "gpu/config/gpu_info.h"
25 #include "gpu/ipc/common/memory_stats.h"
26 #include "ipc/ipc_listener.h" 26 #include "ipc/ipc_listener.h"
27 #include "ipc/ipc_sender.h" 27 #include "ipc/ipc_sender.h"
28 #include "ipc/message_router.h" 28 #include "ipc/message_router.h"
29 29
30 #if defined(OS_MACOSX) 30 #if defined(OS_MACOSX)
31 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; 31 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
32 #endif 32 #endif
33 33
34 namespace ui { 34 namespace ui {
35 class LatencyInfo; 35 class LatencyInfo;
36 } 36 }
37 37
38 namespace gfx { 38 namespace gfx {
39 class Size; 39 class Size;
40 } 40 }
41 41
42 namespace IPC { 42 namespace IPC {
43 class Message; 43 class Message;
44 } 44 }
45 45
46 namespace gpu {
47 struct VideoMemoryUsageStats;
48 }
49
50 namespace content { 46 namespace content {
51 void RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg); 47 void RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg);
52 48
53 class GpuProcessHostUIShim : public IPC::Listener, 49 class GpuProcessHostUIShim : public IPC::Listener,
54 public IPC::Sender, 50 public IPC::Sender,
55 public base::NonThreadSafe { 51 public base::NonThreadSafe {
56 public: 52 public:
57 // Create a GpuProcessHostUIShim with the given ID. The object can be found 53 // Create a GpuProcessHostUIShim with the given ID. The object can be found
58 // using FromID with the same id. 54 // using FromID with the same id.
59 static GpuProcessHostUIShim* Create(int host_id); 55 static GpuProcessHostUIShim* Create(int host_id);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void OnLogMessage(int level, const std::string& header, 94 void OnLogMessage(int level, const std::string& header,
99 const std::string& message); 95 const std::string& message);
100 96
101 void OnGraphicsInfoCollected(const gpu::GPUInfo& gpu_info); 97 void OnGraphicsInfoCollected(const gpu::GPUInfo& gpu_info);
102 98
103 #if defined(OS_MACOSX) 99 #if defined(OS_MACOSX)
104 void OnAcceleratedSurfaceBuffersSwapped( 100 void OnAcceleratedSurfaceBuffersSwapped(
105 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params); 101 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params);
106 #endif 102 #endif
107 void OnVideoMemoryUsageStatsReceived( 103 void OnVideoMemoryUsageStatsReceived(
108 const gpu::VideoMemoryUsageStats& video_memory_usage_stats); 104 const GPUVideoMemoryUsageStats& video_memory_usage_stats);
109 void OnAddSubscription(int32_t process_id, unsigned int target); 105 void OnAddSubscription(int32_t process_id, unsigned int target);
110 void OnRemoveSubscription(int32_t process_id, unsigned int target); 106 void OnRemoveSubscription(int32_t process_id, unsigned int target);
111 107
112 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. 108 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair.
113 int host_id_; 109 int host_id_;
114 base::Closure close_callback_; 110 base::Closure close_callback_;
115 }; 111 };
116 112
117 } // namespace content 113 } // namespace content
118 114
119 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ 115 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private_unittest.cc ('k') | content/browser/gpu/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698