From c4d964e1f5801442b080e6e11e01007561b2bafc Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 16 Mar 2018 15:40:31 -0700 Subject: [PATCH] Cache render buffer extents when no depth/stencil buffer (flutter/engine#4801) Previously iOS render buffer storage width and height were not cached if not using a depth/stencil buffer. This adds a similar check for colorBuffer to avoid reallocating render buffer storage. --- engine/src/flutter/shell/platform/darwin/ios/ios_gl_context.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/ios_gl_context.mm b/engine/src/flutter/shell/platform/darwin/ios/ios_gl_context.mm index 7a51dbb6b8..6ad9ada398 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/ios_gl_context.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/ios_gl_context.mm @@ -193,7 +193,7 @@ bool IOSGLContext::UpdateStorageSizeIfNecessary() { bool rebind_color_buffer = false; if (depthbuffer_ != GL_NONE || stencilbuffer_ != GL_NONE || - depth_stencil_packed_buffer_ != GL_NONE) { + depth_stencil_packed_buffer_ != GL_NONE || colorbuffer_ != GL_NONE) { // Fetch the dimensions of the color buffer whose backing was just updated // so that backing of the attachments can be updated glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &width);