From b8111c902cdd7a2825326d5f6c7ec146282fd48d Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Fri, 5 Aug 2016 15:24:29 -0700 Subject: [PATCH] Flush image textures before they are bound by the UI thread (flutter/engine#2873) --- engine/src/flutter/flow/texture_image.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/src/flutter/flow/texture_image.cc b/engine/src/flutter/flow/texture_image.cc index 5e3ca70bc8..71a45c642a 100644 --- a/engine/src/flutter/flow/texture_image.cc +++ b/engine/src/flutter/flow/texture_image.cc @@ -114,6 +114,9 @@ static sk_sp TextureImageCreate(GrContext* context, // Clear the binding. We are done. glBindTexture(GL_TEXTURE_2D, GL_NONE); + // Flush the texture before it can be bound by another thread. + glFlush(); + GrGLTextureInfo texInfo; texInfo.fTarget = GL_TEXTURE_2D; texInfo.fID = handle;