Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: gpu/command_buffer/service/framebuffer_manager.cc

Issue 1231273002: Fix framebuffer completeness ES3 behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add unittest Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/framebuffer_manager.cc
diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc
index 173c2868ed0f1a3770478470c559d5c364bea40e..2798a5e2afd3c43d35816d7e5b596236c8ee530b 100644
--- a/gpu/command_buffer/service/framebuffer_manager.cc
+++ b/gpu/command_buffer/service/framebuffer_manager.cc
@@ -260,12 +260,14 @@ FramebufferManager::TextureDetachObserver::TextureDetachObserver() {}
FramebufferManager::TextureDetachObserver::~TextureDetachObserver() {}
FramebufferManager::FramebufferManager(
- uint32 max_draw_buffers, uint32 max_color_attachments)
+ uint32 max_draw_buffers, uint32 max_color_attachments,
+ ContextGroup::ContextType context_type)
: framebuffer_state_change_count_(1),
framebuffer_count_(0),
have_context_(true),
max_draw_buffers_(max_draw_buffers),
- max_color_attachments_(max_color_attachments) {
+ max_color_attachments_(max_color_attachments),
+ context_type_(context_type) {
DCHECK_GT(max_draw_buffers_, 0u);
DCHECK_GT(max_color_attachments_, 0u);
}
@@ -476,7 +478,9 @@ GLenum Framebuffer::IsPossiblyComplete() const {
if (width == 0 || height == 0) {
return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
}
- } else {
+ } else if (manager_->context_type() != ContextGroup::CONTEXT_TYPE_WEBGL2) {
+ // TODO(zmo): revisit this if we create ES3 contexts for clients other
+ // than WebGL 2.
if (attachment->width() != width || attachment->height() != height) {
return GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT;
}
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.h ('k') | gpu/command_buffer/service/framebuffer_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698