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:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user