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

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

Issue 24925002: Move Insert/SignalSyncPoint() to GpuControl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase past r226145 Created 7 years, 2 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 virtual void SetGetBuffer(int32 shm_id) OVERRIDE; 90 virtual void SetGetBuffer(int32 shm_id) OVERRIDE;
91 virtual void SetGetOffset(int32 get_offset) OVERRIDE; 91 virtual void SetGetOffset(int32 get_offset) OVERRIDE;
92 virtual gpu::Buffer CreateTransferBuffer(size_t size, 92 virtual gpu::Buffer CreateTransferBuffer(size_t size,
93 int32* id) OVERRIDE; 93 int32* id) OVERRIDE;
94 virtual void DestroyTransferBuffer(int32 id) OVERRIDE; 94 virtual void DestroyTransferBuffer(int32 id) OVERRIDE;
95 virtual gpu::Buffer GetTransferBuffer(int32 id) OVERRIDE; 95 virtual gpu::Buffer GetTransferBuffer(int32 id) OVERRIDE;
96 virtual void SetToken(int32 token) OVERRIDE; 96 virtual void SetToken(int32 token) OVERRIDE;
97 virtual void SetParseError(gpu::error::Error error) OVERRIDE; 97 virtual void SetParseError(gpu::error::Error error) OVERRIDE;
98 virtual void SetContextLostReason( 98 virtual void SetContextLostReason(
99 gpu::error::ContextLostReason reason) OVERRIDE; 99 gpu::error::ContextLostReason reason) OVERRIDE;
100 virtual uint32 InsertSyncPoint() OVERRIDE;
101 100
102 // gpu::GpuControl implementation: 101 // gpu::GpuControl implementation:
103 virtual bool SupportsGpuMemoryBuffer() OVERRIDE; 102 virtual bool SupportsGpuMemoryBuffer() OVERRIDE;
104 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer( 103 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(
105 size_t width, 104 size_t width,
106 size_t height, 105 size_t height,
107 unsigned internalformat, 106 unsigned internalformat,
108 int32* id) OVERRIDE; 107 int32* id) OVERRIDE;
109 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; 108 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE;
110 virtual bool GenerateMailboxNames(unsigned num, 109 virtual bool GenerateMailboxNames(unsigned num,
111 std::vector<gpu::Mailbox>* names) OVERRIDE; 110 std::vector<gpu::Mailbox>* names) OVERRIDE;
111 virtual uint32 InsertSyncPoint() OVERRIDE;
112 virtual void SignalSyncPoint(uint32 sync_point,
113 const base::Closure& callback) OVERRIDE;
112 114
113 int GetRouteID() const; 115 int GetRouteID() const;
114 bool Echo(const base::Closure& callback); 116 bool Echo(const base::Closure& callback);
115 bool ProduceFrontBuffer(const gpu::Mailbox& mailbox); 117 bool ProduceFrontBuffer(const gpu::Mailbox& mailbox);
116 void SetChannelErrorCallback(const base::Closure& callback); 118 void SetChannelErrorCallback(const base::Closure& callback);
117 119
118 void SetMemoryAllocationChangedCallback( 120 void SetMemoryAllocationChangedCallback(
119 const base::Callback<void(const GpuMemoryAllocationForRenderer&)>& 121 const base::Callback<void(const GpuMemoryAllocationForRenderer&)>&
120 callback); 122 callback);
121 123
122 void AddDeletionObserver(DeletionObserver* observer); 124 void AddDeletionObserver(DeletionObserver* observer);
123 void RemoveDeletionObserver(DeletionObserver* observer); 125 void RemoveDeletionObserver(DeletionObserver* observer);
124 126
125 bool DiscardBackbuffer(); 127 bool DiscardBackbuffer();
126 bool EnsureBackbuffer(); 128 bool EnsureBackbuffer();
127 129
128 // Makes this command buffer invoke a task when a sync point is reached, or
129 // the command buffer that inserted that sync point is destroyed.
130 bool SignalSyncPoint(uint32 sync_point,
131 const base::Closure& callback);
132
133 // Makes this command buffer invoke a task when a query is completed, or 130 // Makes this command buffer invoke a task when a query is completed, or
134 // the command buffer that inserted that sync point is destroyed or the 131 // the command buffer that inserted that sync point is destroyed or the
135 // query was deleted. Should be invoked after endQuery. 132 // query was deleted. Should be invoked after endQuery.
136 bool SignalQuery(unsigned query, const base::Closure& callback); 133 bool SignalQuery(unsigned query, const base::Closure& callback);
137 134
138 // Sends an IPC message with the new state of surface visibility. 135 // Sends an IPC message with the new state of surface visibility.
139 bool SetSurfaceVisible(bool visible); 136 bool SetSurfaceVisible(bool visible);
140 137
141 void SetOnConsoleMessageCallback( 138 void SetOnConsoleMessageCallback(
142 const GpuConsoleMessageCallback& callback); 139 const GpuConsoleMessageCallback& callback);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // Tasks to be invoked in SignalSyncPoint responses. 209 // Tasks to be invoked in SignalSyncPoint responses.
213 uint32 next_signal_id_; 210 uint32 next_signal_id_;
214 SignalTaskMap signal_tasks_; 211 SignalTaskMap signal_tasks_;
215 212
216 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); 213 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
217 }; 214 };
218 215
219 } // namespace content 216 } // namespace content
220 217
221 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 218 #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