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

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

Issue 1336623004: content/gpu: Simplify gpu channel message handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dcheng's final comments Created 5 years, 3 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
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_channel_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // Remove the channel for a particular renderer. 76 // Remove the channel for a particular renderer.
77 void RemoveChannel(int client_id); 77 void RemoveChannel(int client_id);
78 78
79 // Listener overrides. 79 // Listener overrides.
80 bool OnMessageReceived(const IPC::Message& msg) override; 80 bool OnMessageReceived(const IPC::Message& msg) override;
81 81
82 // Sender overrides. 82 // Sender overrides.
83 bool Send(IPC::Message* msg) override; 83 bool Send(IPC::Message* msg) override;
84 84
85 uint32_t ProcessedOrderNumber();
86 uint32_t UnprocessedOrderNumber();
87
88 void LoseAllContexts(); 85 void LoseAllContexts();
89 86
90 int GenerateRouteID(); 87 int GenerateRouteID();
91 void AddRoute(int32 routing_id, IPC::Listener* listener); 88 void AddRoute(int32 routing_id, IPC::Listener* listener);
92 void RemoveRoute(int32 routing_id); 89 void RemoveRoute(int32 routing_id);
93 90
94 gpu::gles2::ProgramCache* program_cache(); 91 gpu::gles2::ProgramCache* program_cache();
95 gpu::gles2::ShaderTranslatorCache* shader_translator_cache(); 92 gpu::gles2::ShaderTranslatorCache* shader_translator_cache();
96 gpu::gles2::FramebufferCompletenessCache* framebuffer_completeness_cache(); 93 gpu::gles2::FramebufferCompletenessCache* framebuffer_completeness_cache();
97 94
98 GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; } 95 GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; }
99 96
100 GpuChannel* LookupChannel(int32 client_id); 97 GpuChannel* LookupChannel(int32 client_id) const;
101 98
102 gpu::SyncPointManager* sync_point_manager() { 99 gpu::SyncPointManager* sync_point_manager() {
103 return sync_point_manager_; 100 return sync_point_manager_;
104 } 101 }
105 102
106 gfx::GLSurface* GetDefaultOffscreenSurface(); 103 gfx::GLSurface* GetDefaultOffscreenSurface();
107 104
108 GpuMemoryBufferFactory* gpu_memory_buffer_factory() { 105 GpuMemoryBufferFactory* gpu_memory_buffer_factory() {
109 return gpu_memory_buffer_factory_; 106 return gpu_memory_buffer_factory_;
110 } 107 }
111 108
109 // Returns the maximum order number for unprocessed IPC messages across all
110 // channels.
111 uint32_t GetUnprocessedOrderNum() const;
112
113 // Returns the maximum order number for processed IPC messages across all
114 // channels.
115 uint32_t GetProcessedOrderNum() const;
116
112 protected: 117 protected:
113 virtual scoped_ptr<GpuChannel> CreateGpuChannel( 118 virtual scoped_ptr<GpuChannel> CreateGpuChannel(
114 gfx::GLShareGroup* share_group, 119 gfx::GLShareGroup* share_group,
115 gpu::gles2::MailboxManager* mailbox_manager, 120 gpu::gles2::MailboxManager* mailbox_manager,
116 int client_id, 121 int client_id,
117 uint64_t client_tracing_id, 122 uint64_t client_tracing_id,
118 bool allow_future_sync_points, 123 bool allow_future_sync_points,
119 bool allow_real_time_streams); 124 bool allow_real_time_streams);
120 125
121 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 126 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // that any WeakPtrs to Controller are invalidated before its members 186 // that any WeakPtrs to Controller are invalidated before its members
182 // variable's destructors are executed, rendering them invalid. 187 // variable's destructors are executed, rendering them invalid.
183 base::WeakPtrFactory<GpuChannelManager> weak_factory_; 188 base::WeakPtrFactory<GpuChannelManager> weak_factory_;
184 189
185 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); 190 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager);
186 }; 191 };
187 192
188 } // namespace content 193 } // namespace content
189 194
190 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ 195 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698