OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <map> | 8 #include <map> |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 typedef scoped_refptr<FramebufferInfo> Ref; | 26 typedef scoped_refptr<FramebufferInfo> Ref; |
27 | 27 |
28 explicit FramebufferInfo(GLuint service_id) | 28 explicit FramebufferInfo(GLuint service_id) |
29 : service_id_(service_id) { | 29 : service_id_(service_id) { |
30 } | 30 } |
31 | 31 |
32 GLuint service_id() const { | 32 GLuint service_id() const { |
33 return service_id_; | 33 return service_id_; |
34 } | 34 } |
35 | 35 |
| 36 bool HasUnclearedAttachment(GLenum attachment) const; |
| 37 |
36 // Attaches a renderbuffer to a particlar attachment. | 38 // Attaches a renderbuffer to a particlar attachment. |
37 // Pass null to detach. | 39 // Pass null to detach. |
38 void AttachRenderbuffer( | 40 void AttachRenderbuffer( |
39 GLenum attachment, RenderbufferManager::RenderbufferInfo* renderbuffer); | 41 GLenum attachment, RenderbufferManager::RenderbufferInfo* renderbuffer); |
40 | 42 |
| 43 void MarkAttachedRenderbuffersAsCleared(); |
| 44 |
41 bool IsDeleted() { | 45 bool IsDeleted() { |
42 return service_id_ == 0; | 46 return service_id_ == 0; |
43 } | 47 } |
44 | 48 |
45 private: | 49 private: |
46 friend class FramebufferManager; | 50 friend class FramebufferManager; |
47 friend class base::RefCounted<FramebufferInfo>; | 51 friend class base::RefCounted<FramebufferInfo>; |
48 | 52 |
49 ~FramebufferInfo() { } | 53 ~FramebufferInfo() { } |
50 | 54 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 92 |
89 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); | 93 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); |
90 }; | 94 }; |
91 | 95 |
92 } // namespace gles2 | 96 } // namespace gles2 |
93 } // namespace gpu | 97 } // namespace gpu |
94 | 98 |
95 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ | 99 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ |
96 | 100 |
97 | 101 |
OLD | NEW |