| 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 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 9 #include "gpu/command_buffer/service/renderbuffer_manager.h" | 9 #include "gpu/command_buffer/service/renderbuffer_manager.h" |
| 10 #include "gpu/command_buffer/service/texture_manager.h" | 10 #include "gpu/command_buffer/service/texture_manager.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 119 } |
| 120 | 120 |
| 121 virtual void AddToSignature( | 121 virtual void AddToSignature( |
| 122 TextureManager* texture_manager, std::string* signature) const override { | 122 TextureManager* texture_manager, std::string* signature) const override { |
| 123 DCHECK(signature); | 123 DCHECK(signature); |
| 124 renderbuffer_->AddToSignature(signature); | 124 renderbuffer_->AddToSignature(signature); |
| 125 } | 125 } |
| 126 | 126 |
| 127 virtual void OnWillRenderTo() const override {} | 127 virtual void OnWillRenderTo() const override {} |
| 128 virtual void OnDidRenderTo() const override {} | 128 virtual void OnDidRenderTo() const override {} |
| 129 virtual bool FormsFeedbackLoop( |
| 130 TextureRef* /* texture */, GLint /*level */) const override { |
| 131 return false; |
| 132 } |
| 129 | 133 |
| 130 protected: | 134 protected: |
| 131 virtual ~RenderbufferAttachment() { } | 135 virtual ~RenderbufferAttachment() { } |
| 132 | 136 |
| 133 private: | 137 private: |
| 134 scoped_refptr<Renderbuffer> renderbuffer_; | 138 scoped_refptr<Renderbuffer> renderbuffer_; |
| 135 | 139 |
| 136 DISALLOW_COPY_AND_ASSIGN(RenderbufferAttachment); | 140 DISALLOW_COPY_AND_ASSIGN(RenderbufferAttachment); |
| 137 }; | 141 }; |
| 138 | 142 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 } | 261 } |
| 258 | 262 |
| 259 virtual void OnWillRenderTo() const override { | 263 virtual void OnWillRenderTo() const override { |
| 260 texture_ref_->texture()->OnWillModifyPixels(); | 264 texture_ref_->texture()->OnWillModifyPixels(); |
| 261 } | 265 } |
| 262 | 266 |
| 263 virtual void OnDidRenderTo() const override { | 267 virtual void OnDidRenderTo() const override { |
| 264 texture_ref_->texture()->OnDidModifyPixels(); | 268 texture_ref_->texture()->OnDidModifyPixels(); |
| 265 } | 269 } |
| 266 | 270 |
| 271 virtual bool FormsFeedbackLoop( |
| 272 TextureRef* texture, GLint level) const override { |
| 273 return texture == texture_ref_.get() && level == level_; |
| 274 } |
| 275 |
| 267 protected: | 276 protected: |
| 268 virtual ~TextureAttachment() {} | 277 virtual ~TextureAttachment() {} |
| 269 | 278 |
| 270 private: | 279 private: |
| 271 scoped_refptr<TextureRef> texture_ref_; | 280 scoped_refptr<TextureRef> texture_ref_; |
| 272 GLenum target_; | 281 GLenum target_; |
| 273 GLint level_; | 282 GLint level_; |
| 274 GLsizei samples_; | 283 GLsizei samples_; |
| 275 | 284 |
| 276 DISALLOW_COPY_AND_ASSIGN(TextureAttachment); | 285 DISALLOW_COPY_AND_ASSIGN(TextureAttachment); |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 ++it) { | 763 ++it) { |
| 755 TextureDetachObserver* observer = *it; | 764 TextureDetachObserver* observer = *it; |
| 756 observer->OnTextureRefDetachedFromFramebuffer(texture); | 765 observer->OnTextureRefDetachedFromFramebuffer(texture); |
| 757 } | 766 } |
| 758 } | 767 } |
| 759 | 768 |
| 760 } // namespace gles2 | 769 } // namespace gles2 |
| 761 } // namespace gpu | 770 } // namespace gpu |
| 762 | 771 |
| 763 | 772 |
| OLD | NEW |