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

Side by Side Diff: content/common/gpu/gpu_channel_manager.h

Issue 1830193002: Move buffer_presented_params_mac to content/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 namespace IPC { 56 namespace IPC {
57 struct ChannelHandle; 57 struct ChannelHandle;
58 } 58 }
59 59
60 namespace content { 60 namespace content {
61 class GpuChannel; 61 class GpuChannel;
62 class GpuChannelManagerDelegate; 62 class GpuChannelManagerDelegate;
63 class GpuMemoryBufferFactory; 63 class GpuMemoryBufferFactory;
64 class GpuWatchdog; 64 class GpuWatchdog;
65 #if defined(OS_MACOSX)
66 struct BufferPresentedParams;
67 #endif
68 65
69 // A GpuChannelManager is a thread responsible for issuing rendering commands 66 // A GpuChannelManager is a thread responsible for issuing rendering commands
70 // managing the lifetimes of GPU channels and forwarding IPC requests from the 67 // managing the lifetimes of GPU channels and forwarding IPC requests from the
71 // browser process to them based on the corresponding renderer ID. 68 // browser process to them based on the corresponding renderer ID.
72 class CONTENT_EXPORT GpuChannelManager { 69 class CONTENT_EXPORT GpuChannelManager {
73 public: 70 public:
74 #if defined(OS_MACOSX) 71 #if defined(OS_MACOSX)
75 typedef base::Callback<void(const BufferPresentedParams&)> 72 typedef base::Callback<
73 void(int32_t, const base::TimeTicks&, const base::TimeDelta&)>
76 BufferPresentedCallback; 74 BufferPresentedCallback;
77 #endif 75 #endif
78 GpuChannelManager(const gpu::GpuPreferences& gpu_preferences, 76 GpuChannelManager(const gpu::GpuPreferences& gpu_preferences,
79 GpuChannelManagerDelegate* delegate, 77 GpuChannelManagerDelegate* delegate,
80 GpuWatchdog* watchdog, 78 GpuWatchdog* watchdog,
81 base::SingleThreadTaskRunner* task_runner, 79 base::SingleThreadTaskRunner* task_runner,
82 base::SingleThreadTaskRunner* io_task_runner, 80 base::SingleThreadTaskRunner* io_task_runner,
83 base::WaitableEvent* shutdown_event, 81 base::WaitableEvent* shutdown_event,
84 gpu::SyncPointManager* sync_point_manager, 82 gpu::SyncPointManager* sync_point_manager,
85 GpuMemoryBufferFactory* gpu_memory_buffer_factory); 83 GpuMemoryBufferFactory* gpu_memory_buffer_factory);
(...skipping 21 matching lines...) Expand all
107 105
108 // Remove the channel for a particular renderer. 106 // Remove the channel for a particular renderer.
109 void RemoveChannel(int client_id); 107 void RemoveChannel(int client_id);
110 108
111 void LoseAllContexts(); 109 void LoseAllContexts();
112 110
113 #if defined(OS_MACOSX) 111 #if defined(OS_MACOSX)
114 void AddBufferPresentedCallback(int32_t routing_id, 112 void AddBufferPresentedCallback(int32_t routing_id,
115 const BufferPresentedCallback& callback); 113 const BufferPresentedCallback& callback);
116 void RemoveBufferPresentedCallback(int32_t routing_id); 114 void RemoveBufferPresentedCallback(int32_t routing_id);
117 void BufferPresented(const BufferPresentedParams& params); 115 void BufferPresented(int32_t surface_id,
116 const base::TimeTicks& vsync_timebase,
117 const base::TimeDelta& vsync_interval);
118 #endif 118 #endif
119 119
120 const gpu::GpuPreferences& gpu_preferences() const { 120 const gpu::GpuPreferences& gpu_preferences() const {
121 return gpu_preferences_; 121 return gpu_preferences_;
122 } 122 }
123 gpu::gles2::ProgramCache* program_cache(); 123 gpu::gles2::ProgramCache* program_cache();
124 gpu::gles2::ShaderTranslatorCache* shader_translator_cache(); 124 gpu::gles2::ShaderTranslatorCache* shader_translator_cache();
125 gpu::gles2::FramebufferCompletenessCache* framebuffer_completeness_cache(); 125 gpu::gles2::FramebufferCompletenessCache* framebuffer_completeness_cache();
126 126
127 GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; } 127 GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // that any WeakPtrs to Controller are invalidated before its members 219 // that any WeakPtrs to Controller are invalidated before its members
220 // variable's destructors are executed, rendering them invalid. 220 // variable's destructors are executed, rendering them invalid.
221 base::WeakPtrFactory<GpuChannelManager> weak_factory_; 221 base::WeakPtrFactory<GpuChannelManager> weak_factory_;
222 222
223 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); 223 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager);
224 }; 224 };
225 225
226 } // namespace content 226 } // namespace content
227 227
228 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ 228 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_
OLDNEW
« no previous file with comments | « content/common/gpu/buffer_presented_params_mac.cc ('k') | content/common/gpu/gpu_channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698