| 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 #include "gpu/command_buffer/service/framebuffer_manager.h" | 5 #include "gpu/command_buffer/service/framebuffer_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 TextureManager* /* texture_manager */, | 59 TextureManager* /* texture_manager */, |
| 60 bool cleared) override { | 60 bool cleared) override { |
| 61 DCHECK(renderbuffer_manager); | 61 DCHECK(renderbuffer_manager); |
| 62 renderbuffer_manager->SetCleared(renderbuffer_.get(), cleared); | 62 renderbuffer_manager->SetCleared(renderbuffer_.get(), cleared); |
| 63 } | 63 } |
| 64 | 64 |
| 65 bool IsPartiallyCleared() const override { return false; } | 65 bool IsPartiallyCleared() const override { return false; } |
| 66 | 66 |
| 67 bool IsTextureAttachment() const override { return false; } | 67 bool IsTextureAttachment() const override { return false; } |
| 68 bool IsRenderbufferAttachment() const override { return true; } | 68 bool IsRenderbufferAttachment() const override { return true; } |
| 69 bool IsTextureAttachmentImmutable() const override { return false; } |
| 69 | 70 |
| 70 bool IsTexture(TextureRef* /* texture */) const override { return false; } | 71 bool IsTexture(TextureRef* /* texture */) const override { return false; } |
| 71 | 72 |
| 72 bool IsRenderbuffer(Renderbuffer* renderbuffer) const override { | 73 bool IsRenderbuffer(Renderbuffer* renderbuffer) const override { |
| 73 return renderbuffer_.get() == renderbuffer; | 74 return renderbuffer_.get() == renderbuffer; |
| 74 } | 75 } |
| 75 | 76 |
| 76 bool IsSameAttachment(const Attachment* attachment) const override { | 77 bool IsSameAttachment(const Attachment* attachment) const override { |
| 77 if (attachment->IsRenderbufferAttachment()) { | 78 if (attachment->IsRenderbufferAttachment()) { |
| 78 const RenderbufferAttachment* other = | 79 const RenderbufferAttachment* other = |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 texture_manager->SetLevelCleared( | 199 texture_manager->SetLevelCleared( |
| 199 texture_ref_.get(), target_, level_, cleared); | 200 texture_ref_.get(), target_, level_, cleared); |
| 200 } | 201 } |
| 201 | 202 |
| 202 bool IsPartiallyCleared() const override { | 203 bool IsPartiallyCleared() const override { |
| 203 return texture_ref_->texture()->IsLevelPartiallyCleared(target_, level_); | 204 return texture_ref_->texture()->IsLevelPartiallyCleared(target_, level_); |
| 204 } | 205 } |
| 205 | 206 |
| 206 bool IsTextureAttachment() const override { return true; } | 207 bool IsTextureAttachment() const override { return true; } |
| 207 bool IsRenderbufferAttachment() const override { return false; } | 208 bool IsRenderbufferAttachment() const override { return false; } |
| 209 bool IsTextureAttachmentImmutable() const override { |
| 210 return texture_ref_->texture()->IsImmutable(); |
| 211 } |
| 208 | 212 |
| 209 bool IsTexture(TextureRef* texture) const override { | 213 bool IsTexture(TextureRef* texture) const override { |
| 210 return texture == texture_ref_.get(); | 214 return texture == texture_ref_.get(); |
| 211 } | 215 } |
| 212 | 216 |
| 213 bool IsSameAttachment(const Attachment* attachment) const override { | 217 bool IsSameAttachment(const Attachment* attachment) const override { |
| 214 if (attachment->IsTextureAttachment()) { | 218 if (attachment->IsTextureAttachment()) { |
| 215 const TextureAttachment* other = | 219 const TextureAttachment* other = |
| 216 reinterpret_cast<const TextureAttachment*>(attachment); | 220 reinterpret_cast<const TextureAttachment*>(attachment); |
| 217 return IsTexture(other->texture()) && | 221 return IsTexture(other->texture()) && |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1056 | 1060 |
| 1057 bool FramebufferManager::IsComplete( | 1061 bool FramebufferManager::IsComplete( |
| 1058 Framebuffer* framebuffer) { | 1062 Framebuffer* framebuffer) { |
| 1059 DCHECK(framebuffer); | 1063 DCHECK(framebuffer); |
| 1060 return framebuffer->framebuffer_complete_state_count_id() == | 1064 return framebuffer->framebuffer_complete_state_count_id() == |
| 1061 framebuffer_state_change_count_; | 1065 framebuffer_state_change_count_; |
| 1062 } | 1066 } |
| 1063 | 1067 |
| 1064 } // namespace gles2 | 1068 } // namespace gles2 |
| 1065 } // namespace gpu | 1069 } // namespace gpu |
| OLD | NEW |