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

Side by Side Diff: gpu/command_buffer/service/in_process_command_buffer.h

Issue 1417853006: gpu: introduce glSetStreamTextureSizeCHROMIUM(GLuint texture, GLint stream_id, GLsizei width, GLsiz… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android_webview.test failure Created 5 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 size_t height, 118 size_t height,
119 unsigned internalformat, 119 unsigned internalformat,
120 unsigned usage) override; 120 unsigned usage) override;
121 uint32 InsertSyncPoint() override; 121 uint32 InsertSyncPoint() override;
122 uint32 InsertFutureSyncPoint() override; 122 uint32 InsertFutureSyncPoint() override;
123 void RetireSyncPoint(uint32 sync_point) override; 123 void RetireSyncPoint(uint32 sync_point) override;
124 void SignalSyncPoint(uint32 sync_point, 124 void SignalSyncPoint(uint32 sync_point,
125 const base::Closure& callback) override; 125 const base::Closure& callback) override;
126 void SignalQuery(uint32 query_id, const base::Closure& callback) override; 126 void SignalQuery(uint32 query_id, const base::Closure& callback) override;
127 void SetSurfaceVisible(bool visible) override; 127 void SetSurfaceVisible(bool visible) override;
128 uint32 CreateStreamTexture(uint32 texture_id) override; 128 int32 CreateStreamTexture(uint32 texture_id) override;
129 void SetStreamTextureSize(uint32 texture_id,
130 int32 stream_id,
131 size_t width,
132 size_t height) override;
129 void SetLock(base::Lock*) override; 133 void SetLock(base::Lock*) override;
130 bool IsGpuChannelLost() override; 134 bool IsGpuChannelLost() override;
131 CommandBufferNamespace GetNamespaceID() const override; 135 CommandBufferNamespace GetNamespaceID() const override;
132 uint64_t GetCommandBufferID() const override; 136 uint64_t GetCommandBufferID() const override;
133 uint64_t GenerateFenceSyncRelease() override; 137 uint64_t GenerateFenceSyncRelease() override;
134 bool IsFenceSyncRelease(uint64_t release) override; 138 bool IsFenceSyncRelease(uint64_t release) override;
135 bool IsFenceSyncFlushed(uint64_t release) override; 139 bool IsFenceSyncFlushed(uint64_t release) override;
136 bool IsFenceSyncFlushReceived(uint64_t release) override; 140 bool IsFenceSyncFlushReceived(uint64_t release) override;
137 void SignalSyncToken(const SyncToken& sync_token, 141 void SignalSyncToken(const SyncToken& sync_token,
138 const base::Closure& callback) override; 142 const base::Closure& callback) override;
(...skipping 29 matching lines...) Expand all
168 172
169 private: 173 private:
170 scoped_refptr<gfx::GLShareGroup> share_group_; 174 scoped_refptr<gfx::GLShareGroup> share_group_;
171 scoped_refptr<gles2::MailboxManager> mailbox_manager_; 175 scoped_refptr<gles2::MailboxManager> mailbox_manager_;
172 scoped_refptr<gles2::SubscriptionRefSet> subscription_ref_set_; 176 scoped_refptr<gles2::SubscriptionRefSet> subscription_ref_set_;
173 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; 177 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_;
174 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; 178 scoped_ptr<gpu::gles2::ProgramCache> program_cache_;
175 }; 179 };
176 180
177 #if defined(OS_ANDROID) 181 #if defined(OS_ANDROID)
178 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( 182 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture(int32 stream_id);
179 uint32 stream_id);
180 #endif 183 #endif
181 184
182 private: 185 private:
183 struct InitializeOnGpuThreadParams { 186 struct InitializeOnGpuThreadParams {
184 bool is_offscreen; 187 bool is_offscreen;
185 gfx::AcceleratedWidget window; 188 gfx::AcceleratedWidget window;
186 const gfx::Size& size; 189 const gfx::Size& size;
187 const std::vector<int32>& attribs; 190 const std::vector<int32>& attribs;
188 gfx::GpuPreference gpu_preference; 191 gfx::GpuPreference gpu_preference;
189 gpu::Capabilities* capabilities; // Ouptut. 192 gpu::Capabilities* capabilities; // Ouptut.
(...skipping 15 matching lines...) Expand all
205 gpu_preference(gpu_preference), 208 gpu_preference(gpu_preference),
206 capabilities(capabilities), 209 capabilities(capabilities),
207 context_group(share_group), 210 context_group(share_group),
208 image_factory(image_factory) {} 211 image_factory(image_factory) {}
209 }; 212 };
210 213
211 bool InitializeOnGpuThread(const InitializeOnGpuThreadParams& params); 214 bool InitializeOnGpuThread(const InitializeOnGpuThreadParams& params);
212 bool DestroyOnGpuThread(); 215 bool DestroyOnGpuThread();
213 void FlushOnGpuThread(int32 put_offset, uint32_t order_num); 216 void FlushOnGpuThread(int32 put_offset, uint32_t order_num);
214 void ScheduleDelayedWorkOnGpuThread(); 217 void ScheduleDelayedWorkOnGpuThread();
215 uint32 CreateStreamTextureOnGpuThread(uint32 client_texture_id); 218 int32 CreateStreamTextureOnGpuThread(uint32 client_texture_id);
219 void SetStreamTextureSizeOnGpuThread(uint32 texture_id,
220 int32 stream_id,
221 size_t width,
222 size_t height);
216 bool MakeCurrent(); 223 bool MakeCurrent();
217 base::Closure WrapCallback(const base::Closure& callback); 224 base::Closure WrapCallback(const base::Closure& callback);
218 State GetStateFast(); 225 State GetStateFast();
219 void QueueTask(const base::Closure& task) { service_->ScheduleTask(task); } 226 void QueueTask(const base::Closure& task) { service_->ScheduleTask(task); }
220 void CheckSequencedThread(); 227 void CheckSequencedThread();
221 void RetireSyncPointOnGpuThread(uint32 sync_point); 228 void RetireSyncPointOnGpuThread(uint32 sync_point);
222 bool WaitSyncPointOnGpuThread(uint32 sync_point); 229 bool WaitSyncPointOnGpuThread(uint32 sync_point);
223 void FenceSyncReleaseOnGpuThread(uint64_t release); 230 void FenceSyncReleaseOnGpuThread(uint64_t release);
224 bool WaitFenceSyncOnGpuThread(gpu::CommandBufferNamespace namespace_id, 231 bool WaitFenceSyncOnGpuThread(gpu::CommandBufferNamespace namespace_id,
225 uint64_t command_buffer_id, 232 uint64_t command_buffer_id,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 SyncPointManager* sync_point_manager_; // Non-owning. 322 SyncPointManager* sync_point_manager_; // Non-owning.
316 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; 323 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_;
317 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> 324 scoped_refptr<gpu::gles2::FramebufferCompletenessCache>
318 framebuffer_completeness_cache_; 325 framebuffer_completeness_cache_;
319 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); 326 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread);
320 }; 327 };
321 328
322 } // namespace gpu 329 } // namespace gpu
323 330
324 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ 331 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698