Flush image textures before they are bound by the UI thread (flutter/engine#2873)

This commit is contained in:
Jason Simmons
2016-08-05 15:24:29 -07:00
committed by GitHub
parent 66484d2114
commit b8111c902c

View File

@@ -114,6 +114,9 @@ static sk_sp<SkImage> 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;