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

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

Issue 1325433003: command_buffer: Add support for creating non-WebGL ES 3 contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing hunk 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
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 GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 virtual ~TextureDetachObserver(); 248 virtual ~TextureDetachObserver();
249 249
250 virtual void OnTextureRefDetachedFromFramebuffer(TextureRef* texture) = 0; 250 virtual void OnTextureRefDetachedFromFramebuffer(TextureRef* texture) = 0;
251 251
252 private: 252 private:
253 DISALLOW_COPY_AND_ASSIGN(TextureDetachObserver); 253 DISALLOW_COPY_AND_ASSIGN(TextureDetachObserver);
254 }; 254 };
255 255
256 FramebufferManager(uint32 max_draw_buffers, 256 FramebufferManager(uint32 max_draw_buffers,
257 uint32 max_color_attachments, 257 uint32 max_color_attachments,
258 ContextGroup::ContextType context_type, 258 ContextType context_type,
259 const scoped_refptr<FramebufferCompletenessCache>& 259 const scoped_refptr<FramebufferCompletenessCache>&
260 framebuffer_combo_complete_cache); 260 framebuffer_combo_complete_cache);
261 ~FramebufferManager(); 261 ~FramebufferManager();
262 262
263 // Must call before destruction. 263 // Must call before destruction.
264 void Destroy(bool have_context); 264 void Destroy(bool have_context);
265 265
266 // Creates a Framebuffer for the given framebuffer. 266 // Creates a Framebuffer for the given framebuffer.
267 void CreateFramebuffer(GLuint client_id, GLuint service_id); 267 void CreateFramebuffer(GLuint client_id, GLuint service_id);
268 268
(...skipping 26 matching lines...) Expand all
295 } 295 }
296 296
297 void RemoveObserver(TextureDetachObserver* observer) { 297 void RemoveObserver(TextureDetachObserver* observer) {
298 texture_detach_observers_.erase( 298 texture_detach_observers_.erase(
299 std::remove(texture_detach_observers_.begin(), 299 std::remove(texture_detach_observers_.begin(),
300 texture_detach_observers_.end(), 300 texture_detach_observers_.end(),
301 observer), 301 observer),
302 texture_detach_observers_.end()); 302 texture_detach_observers_.end());
303 } 303 }
304 304
305 ContextGroup::ContextType context_type() const { 305 ContextType context_type() const { return context_type_; }
306 return context_type_;
307 }
308 306
309 private: 307 private:
310 friend class Framebuffer; 308 friend class Framebuffer;
311 309
312 void StartTracking(Framebuffer* framebuffer); 310 void StartTracking(Framebuffer* framebuffer);
313 void StopTracking(Framebuffer* framebuffer); 311 void StopTracking(Framebuffer* framebuffer);
314 312
315 void OnTextureRefDetached(TextureRef* texture); 313 void OnTextureRefDetached(TextureRef* texture);
316 314
317 FramebufferCompletenessCache* GetFramebufferComboCompleteCache() { 315 FramebufferCompletenessCache* GetFramebufferComboCompleteCache() {
(...skipping 11 matching lines...) Expand all
329 327
330 // Counts the number of Framebuffer allocated with 'this' as its manager. 328 // Counts the number of Framebuffer allocated with 'this' as its manager.
331 // Allows to check no Framebuffer will outlive this. 329 // Allows to check no Framebuffer will outlive this.
332 unsigned int framebuffer_count_; 330 unsigned int framebuffer_count_;
333 331
334 bool have_context_; 332 bool have_context_;
335 333
336 uint32 max_draw_buffers_; 334 uint32 max_draw_buffers_;
337 uint32 max_color_attachments_; 335 uint32 max_color_attachments_;
338 336
339 ContextGroup::ContextType context_type_; 337 ContextType context_type_;
340 338
341 typedef std::vector<TextureDetachObserver*> TextureDetachObserverVector; 339 typedef std::vector<TextureDetachObserver*> TextureDetachObserverVector;
342 TextureDetachObserverVector texture_detach_observers_; 340 TextureDetachObserverVector texture_detach_observers_;
343 341
344 scoped_refptr<FramebufferCompletenessCache> framebuffer_combo_complete_cache_; 342 scoped_refptr<FramebufferCompletenessCache> framebuffer_combo_complete_cache_;
345 343
346 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); 344 DISALLOW_COPY_AND_ASSIGN(FramebufferManager);
347 }; 345 };
348 346
349 } // namespace gles2 347 } // namespace gles2
350 } // namespace gpu 348 } // namespace gpu
351 349
352 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ 350 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/context_group_unittest.cc ('k') | gpu/command_buffer/service/framebuffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698