| 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;
|
| }
|
|
|