| OLD | NEW |
| 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_RENDERBUFFER_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 } | 67 } |
| 68 | 68 |
| 69 void MarkAsValid() { | 69 void MarkAsValid() { |
| 70 has_been_bound_ = true; | 70 has_been_bound_ = true; |
| 71 } | 71 } |
| 72 | 72 |
| 73 bool IsValid() const { | 73 bool IsValid() const { |
| 74 return has_been_bound_ && !IsDeleted(); | 74 return has_been_bound_ && !IsDeleted(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 // Regenerates the object backing this client_id, creating a new service_id. | |
| 78 // Also reattaches any framebuffers using this renderbuffer. | |
| 79 bool RegenerateAndBindBackingObjectIfNeeded(); | |
| 80 | |
| 81 void AddFramebufferAttachmentPoint(Framebuffer* framebuffer, | 77 void AddFramebufferAttachmentPoint(Framebuffer* framebuffer, |
| 82 GLenum attachment); | 78 GLenum attachment); |
| 83 void RemoveFramebufferAttachmentPoint(Framebuffer* framebuffer, | 79 void RemoveFramebufferAttachmentPoint(Framebuffer* framebuffer, |
| 84 GLenum attachment); | 80 GLenum attachment); |
| 85 | 81 |
| 86 size_t EstimatedSize(); | 82 size_t EstimatedSize(); |
| 87 | 83 |
| 88 size_t GetSignatureSize() const; | 84 size_t GetSignatureSize() const; |
| 89 void AddToSignature(std::string* signature) const; | 85 void AddToSignature(std::string* signature) const; |
| 90 | 86 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 112 | 108 |
| 113 // Client side renderbuffer id. | 109 // Client side renderbuffer id. |
| 114 GLuint client_id_; | 110 GLuint client_id_; |
| 115 | 111 |
| 116 // Service side renderbuffer id. | 112 // Service side renderbuffer id. |
| 117 GLuint service_id_; | 113 GLuint service_id_; |
| 118 | 114 |
| 119 // Whether this renderbuffer has been cleared | 115 // Whether this renderbuffer has been cleared |
| 120 bool cleared_; | 116 bool cleared_; |
| 121 | 117 |
| 122 // Whether this renderbuffer has been allocated. | |
| 123 bool allocated_; | |
| 124 | |
| 125 // Whether this renderbuffer has ever been bound. | 118 // Whether this renderbuffer has ever been bound. |
| 126 bool has_been_bound_; | 119 bool has_been_bound_; |
| 127 | 120 |
| 128 // Number of samples (for multi-sampled renderbuffers) | 121 // Number of samples (for multi-sampled renderbuffers) |
| 129 GLsizei samples_; | 122 GLsizei samples_; |
| 130 | 123 |
| 131 // Renderbuffer internalformat set through RenderbufferStorage(). | 124 // Renderbuffer internalformat set through RenderbufferStorage(). |
| 132 GLenum internal_format_; | 125 GLenum internal_format_; |
| 133 | 126 |
| 134 // Dimensions of renderbuffer. | 127 // Dimensions of renderbuffer. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 typedef base::hash_map<GLuint, scoped_refptr<Renderbuffer> > RenderbufferMap; | 218 typedef base::hash_map<GLuint, scoped_refptr<Renderbuffer> > RenderbufferMap; |
| 226 RenderbufferMap renderbuffers_; | 219 RenderbufferMap renderbuffers_; |
| 227 | 220 |
| 228 DISALLOW_COPY_AND_ASSIGN(RenderbufferManager); | 221 DISALLOW_COPY_AND_ASSIGN(RenderbufferManager); |
| 229 }; | 222 }; |
| 230 | 223 |
| 231 } // namespace gles2 | 224 } // namespace gles2 |
| 232 } // namespace gpu | 225 } // namespace gpu |
| 233 | 226 |
| 234 #endif // GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_ | 227 #endif // GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_ |
| OLD | NEW |