Skip to content

Commit

Permalink
Flush pending graphics commands when the unref queue is drained on th…
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-simmons authored Aug 18, 2023
1 parent 72c4e61 commit 6ceebc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flow/skia_gpu_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ class UnrefQueue : public fml::RefCountedThreadSafe<UnrefQueue<T>> {
if (!skia_objects.empty()) {
context->performDeferredCleanup(std::chrono::milliseconds(0));
}

context->flushAndSubmit(true);
}
}

Expand Down
1 change: 1 addition & 0 deletions flow/skia_gpu_object_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6ceebc9

Please sign in to comment.