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

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

Issue 180723023: gpu: Mailbox emulation with EGLImage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 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
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool cleared) = 0; 42 bool cleared) = 0;
43 virtual bool IsTexture(TextureRef* texture) const = 0; 43 virtual bool IsTexture(TextureRef* texture) const = 0;
44 virtual bool IsRenderbuffer( 44 virtual bool IsRenderbuffer(
45 Renderbuffer* renderbuffer) const = 0; 45 Renderbuffer* renderbuffer) const = 0;
46 virtual bool CanRenderTo() const = 0; 46 virtual bool CanRenderTo() const = 0;
47 virtual void DetachFromFramebuffer(Framebuffer* framebuffer) const = 0; 47 virtual void DetachFromFramebuffer(Framebuffer* framebuffer) const = 0;
48 virtual bool ValidForAttachmentType( 48 virtual bool ValidForAttachmentType(
49 GLenum attachment_type, uint32 max_color_attachments) = 0; 49 GLenum attachment_type, uint32 max_color_attachments) = 0;
50 virtual void AddToSignature( 50 virtual void AddToSignature(
51 TextureManager* texture_manager, std::string* signature) const = 0; 51 TextureManager* texture_manager, std::string* signature) const = 0;
52 virtual void OnWillRenderTo() const = 0;
53 virtual void OnDidRenderTo() const = 0;
52 54
53 protected: 55 protected:
54 friend class base::RefCounted<Attachment>; 56 friend class base::RefCounted<Attachment>;
55 virtual ~Attachment() {} 57 virtual ~Attachment() {}
56 }; 58 };
57 59
58 Framebuffer(FramebufferManager* manager, GLuint service_id); 60 Framebuffer(FramebufferManager* manager, GLuint service_id);
59 61
60 GLuint service_id() const { 62 GLuint service_id() const {
61 return service_id_; 63 return service_id_;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Return true if any draw buffers has an alpha channel. 132 // Return true if any draw buffers has an alpha channel.
131 bool HasAlphaMRT() const; 133 bool HasAlphaMRT() const;
132 134
133 static void ClearFramebufferCompleteComboMap(); 135 static void ClearFramebufferCompleteComboMap();
134 136
135 static bool AllowFramebufferComboCompleteMapForTesting() { 137 static bool AllowFramebufferComboCompleteMapForTesting() {
136 return allow_framebuffer_combo_complete_map_; 138 return allow_framebuffer_combo_complete_map_;
137 } 139 }
138 140
139 void OnTextureRefDetached(TextureRef* texture); 141 void OnTextureRefDetached(TextureRef* texture);
142 void OnWillRenderTo() const;
143 void OnDidRenderTo() const;
140 144
141 private: 145 private:
142 friend class FramebufferManager; 146 friend class FramebufferManager;
143 friend class base::RefCounted<Framebuffer>; 147 friend class base::RefCounted<Framebuffer>;
144 148
145 ~Framebuffer(); 149 ~Framebuffer();
146 150
147 void MarkAsDeleted(); 151 void MarkAsDeleted();
148 152
149 void MarkAttachmentsAsCleared( 153 void MarkAttachmentsAsCleared(
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 typedef std::vector<TextureDetachObserver*> TextureDetachObserverVector; 294 typedef std::vector<TextureDetachObserver*> TextureDetachObserverVector;
291 TextureDetachObserverVector texture_detach_observers_; 295 TextureDetachObserverVector texture_detach_observers_;
292 296
293 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); 297 DISALLOW_COPY_AND_ASSIGN(FramebufferManager);
294 }; 298 };
295 299
296 } // namespace gles2 300 } // namespace gles2
297 } // namespace gpu 301 } // namespace gpu
298 302
299 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ 303 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | gpu/command_buffer/service/framebuffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698