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

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

Issue 12581004: Move InsertSyncPoint to GLES2Interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes 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/webgraphicscontext3d_command_buffer_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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 virtual void SetGetBuffer(int32 shm_id) OVERRIDE; 80 virtual void SetGetBuffer(int32 shm_id) OVERRIDE;
81 virtual void SetGetOffset(int32 get_offset) OVERRIDE; 81 virtual void SetGetOffset(int32 get_offset) OVERRIDE;
82 virtual gpu::Buffer CreateTransferBuffer(size_t size, 82 virtual gpu::Buffer CreateTransferBuffer(size_t size,
83 int32* id) OVERRIDE; 83 int32* id) OVERRIDE;
84 virtual void DestroyTransferBuffer(int32 id) OVERRIDE; 84 virtual void DestroyTransferBuffer(int32 id) OVERRIDE;
85 virtual gpu::Buffer GetTransferBuffer(int32 id) OVERRIDE; 85 virtual gpu::Buffer GetTransferBuffer(int32 id) OVERRIDE;
86 virtual void SetToken(int32 token) OVERRIDE; 86 virtual void SetToken(int32 token) OVERRIDE;
87 virtual void SetParseError(gpu::error::Error error) OVERRIDE; 87 virtual void SetParseError(gpu::error::Error error) OVERRIDE;
88 virtual void SetContextLostReason( 88 virtual void SetContextLostReason(
89 gpu::error::ContextLostReason reason) OVERRIDE; 89 gpu::error::ContextLostReason reason) OVERRIDE;
90 virtual uint32 InsertSyncPoint() OVERRIDE;
90 91
91 void SetMemoryAllocationChangedCallback( 92 void SetMemoryAllocationChangedCallback(
92 const base::Callback<void(const GpuMemoryAllocationForRenderer&)>& 93 const base::Callback<void(const GpuMemoryAllocationForRenderer&)>&
93 callback); 94 callback);
94 95
95 bool DiscardBackbuffer(); 96 bool DiscardBackbuffer();
96 bool EnsureBackbuffer(); 97 bool EnsureBackbuffer();
97 98
98 // Inserts a sync point, returning its ID. This is handled on the IO thread of
99 // the GPU process, and so should be relatively fast, but its effect is
100 // ordered wrt other messages (in particular, Flush). Sync point IDs are
101 // global and can be used for cross-channel synchronization.
102 uint32 InsertSyncPoint();
103
104 // Makes this command buffer invoke a task when a sync point is reached, or 99 // Makes this command buffer invoke a task when a sync point is reached, or
105 // the command buffer that inserted that sync point is destroyed. 100 // the command buffer that inserted that sync point is destroyed.
106 bool SignalSyncPoint(uint32 sync_point, 101 bool SignalSyncPoint(uint32 sync_point,
107 const base::Closure& callback); 102 const base::Closure& callback);
108 103
109 // Generates n unique mailbox names that can be used with 104 // Generates n unique mailbox names that can be used with
110 // GL_texture_mailbox_CHROMIUM. Unlike genMailboxCHROMIUM, this IPC is 105 // GL_texture_mailbox_CHROMIUM. Unlike genMailboxCHROMIUM, this IPC is
111 // handled only on the GPU process' IO thread, and so is not effectively 106 // handled only on the GPU process' IO thread, and so is not effectively
112 // a finish. 107 // a finish.
113 bool GenerateMailboxNames(unsigned num, std::vector<gpu::Mailbox>* names); 108 bool GenerateMailboxNames(unsigned num, std::vector<gpu::Mailbox>* names);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // Tasks to be invoked in SignalSyncPoint responses. 184 // Tasks to be invoked in SignalSyncPoint responses.
190 uint32 next_signal_id_; 185 uint32 next_signal_id_;
191 SignalTaskMap signal_tasks_; 186 SignalTaskMap signal_tasks_;
192 187
193 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); 188 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
194 }; 189 };
195 190
196 } // namespace content 191 } // namespace content
197 192
198 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 193 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698