Flush pending graphics commands when the unref queue is drained on the IO thread (flutter/engine#44831)

See https://github.com/flutter/flutter/issues/131524
This commit is contained in:
Jason Simmons
2023-08-18 11:31:04 -07:00
committed by GitHub
parent d696c29f5a
commit 8c77e605e6
2 changed files with 3 additions and 0 deletions

View File

@@ -128,6 +128,8 @@ class UnrefQueue : public fml::RefCountedThreadSafe<UnrefQueue<T>> {
if (!skia_objects.empty()) {
context->performDeferredCleanup(std::chrono::milliseconds(0));
}
context->flushAndSubmit(true);
}
}

View File

@@ -43,6 +43,7 @@ class TestResourceContext : public TestSkObject {
~TestResourceContext() = default;
void performDeferredCleanup(std::chrono::milliseconds msNotUsed) {}
void deleteBackendTexture(const GrBackendTexture& texture) {}
void flushAndSubmit(bool syncCpu) {}
};
class SkiaGpuObjectTest : public ThreadTest {