Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions impeller/renderer/backend/gles/reactor_gles.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ bool ReactorGLES::React() {
}
TRACE_EVENT0("impeller", "ReactorGLES::React");
while (HasPendingOperations()) {
// Both the raster thread and the IO thread can flush queued operations.
// Ensure that execution of the ops is serialized.
Lock execution_lock(ops_execution_mutex_);

if (!ReactOnce()) {
return false;
}
Expand Down
3 changes: 2 additions & 1 deletion impeller/renderer/backend/gles/reactor_gles.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class ReactorGLES {

std::unique_ptr<ProcTableGLES> proc_table_;

Mutex ops_execution_mutex_;
mutable Mutex ops_mutex_;
std::vector<Operation> ops_ IPLR_GUARDED_BY(ops_mutex_);

Expand All @@ -88,7 +89,7 @@ class ReactorGLES {
bool can_set_debug_labels_ = false;
bool is_valid_ = false;

bool ReactOnce();
bool ReactOnce() IPLR_REQUIRES(ops_execution_mutex_);

bool HasPendingOperations() const;

Expand Down