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.
This commit is contained in:
Chris Bracken
2018-03-16 15:40:31 -07:00
committed by GitHub
parent 16892af75c
commit c4d964e1f5

View File

@@ -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);