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

Side by Side Diff: content/common/gpu/client/command_buffer_proxy_impl.h

Issue 12330129: Make WaitSyncPoint go through command buffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/common/gpu/client/command_buffer_proxy_impl.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_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 bool DiscardBackbuffer(); 91 bool DiscardBackbuffer();
92 bool EnsureBackbuffer(); 92 bool EnsureBackbuffer();
93 93
94 // Inserts a sync point, returning its ID. This is handled on the IO thread of 94 // Inserts a sync point, returning its ID. This is handled on the IO thread of
95 // the GPU process, and so should be relatively fast, but its effect is 95 // the GPU process, and so should be relatively fast, but its effect is
96 // ordered wrt other messages (in particular, Flush). Sync point IDs are 96 // ordered wrt other messages (in particular, Flush). Sync point IDs are
97 // global and can be used for cross-channel synchronization. 97 // global and can be used for cross-channel synchronization.
98 uint32 InsertSyncPoint(); 98 uint32 InsertSyncPoint();
99 99
100 // Makes this command buffer wait on a sync point. This command buffer will be
101 // unscheduled until the command buffer that inserted that sync point reaches
102 // it, or gets destroyed.
103 void WaitSyncPoint(uint32);
104
105 // Makes this command buffer invoke a task when a sync point is reached, or 100 // Makes this command buffer invoke a task when a sync point is reached, or
106 // the command buffer that inserted that sync point is destroyed. 101 // the command buffer that inserted that sync point is destroyed.
107 bool SignalSyncPoint(uint32 sync_point, 102 bool SignalSyncPoint(uint32 sync_point,
108 const base::Closure& callback); 103 const base::Closure& callback);
109 104
110 // Generates n unique mailbox names that can be used with 105 // Generates n unique mailbox names that can be used with
111 // GL_texture_mailbox_CHROMIUM. Unlike genMailboxCHROMIUM, this IPC is 106 // GL_texture_mailbox_CHROMIUM. Unlike genMailboxCHROMIUM, this IPC is
112 // handled only on the GPU process' IO thread, and so is not effectively 107 // handled only on the GPU process' IO thread, and so is not effectively
113 // a finish. 108 // a finish.
114 bool GenerateMailboxNames(unsigned num, std::vector<std::string>* names); 109 bool GenerateMailboxNames(unsigned num, std::vector<std::string>* names);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Tasks to be invoked in SignalSyncPoint responses. 185 // Tasks to be invoked in SignalSyncPoint responses.
191 uint32 next_signal_id_; 186 uint32 next_signal_id_;
192 SignalTaskMap signal_tasks_; 187 SignalTaskMap signal_tasks_;
193 188
194 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); 189 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
195 }; 190 };
196 191
197 } // namespace content 192 } // namespace content
198 193
199 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 194 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/client/command_buffer_proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698