diff options
Diffstat (limited to 'gpu/command_buffer/service/framebuffer_manager.cc')
-rw-r--r-- | gpu/command_buffer/service/framebuffer_manager.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc index 316bc32..909a451 100644 --- a/gpu/command_buffer/service/framebuffer_manager.cc +++ b/gpu/command_buffer/service/framebuffer_manager.cc @@ -47,6 +47,10 @@ class RenderbufferAttachment return false; } + virtual bool CanRenderTo() const { + return true; + } + RenderbufferManager::RenderbufferInfo* render_buffer() const { return render_buffer_.get(); } @@ -111,6 +115,10 @@ class TextureAttachment return texture_.get(); } + virtual bool CanRenderTo() const { + return texture_->CanRenderTo(); + } + private: TextureManager::TextureInfo::Ref texture_; GLenum target_; @@ -203,6 +211,9 @@ bool FramebufferManager::FramebufferInfo::IsNotComplete() const { if (attachment->width() == 0 || attachment->height() == 0) { return true; } + if (!attachment->CanRenderTo()) { + return true; + } } return false; } |