Fix texture corruption on Windows (flutter/engine#25349)

Notify Skia that we've updated texture handles within the current
binding such that Skia invalidates any assumptions about previous
context modifications that it had made.

This fixes a texture corruption issue reported in
https://github.com/flutter/flutter/issues/78648
This commit is contained in:
Chris Bracken
2021-04-05 14:21:31 -07:00
committed by GitHub
parent 5884859f96
commit fda4d07757

View File

@@ -48,6 +48,8 @@ sk_sp<SkImage> EmbedderExternalTextureGL::ResolveTexture(
int64_t texture_id,
GrDirectContext* context,
const SkISize& size) {
context->flushAndSubmit();
context->resetContext(kAll_GrBackendState);
std::unique_ptr<FlutterOpenGLTexture> texture =
external_texture_callback_(texture_id, size.width(), size.height());