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
1 change: 1 addition & 0 deletions impeller/renderer/backend/gles/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,6 @@ impeller_component("gles") {
"../../:renderer",
"../../../shader_archive",
"//flutter/fml",
"//flutter/third_party/abseil-cpp/absl/container:flat_hash_map",
]
}
11 changes: 5 additions & 6 deletions impeller/renderer/backend/gles/reactor_gles.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <memory>
#include <vector>

#include "flutter/third_party/abseil-cpp/absl/container/flat_hash_map.h"
#include "fml/closure.h"
#include "impeller/base/thread.h"
#include "impeller/renderer/backend/gles/handle_gles.h"
Expand Down Expand Up @@ -276,12 +277,10 @@ class ReactorGLES {
std::map<std::thread::id, std::vector<Operation>> ops_ IPLR_GUARDED_BY(
ops_mutex_);

// Make sure the container is one where erasing items during iteration doesn't
// invalidate other iterators.
using LiveHandles = std::unordered_map<const HandleGLES,
LiveHandle,
HandleGLES::Hash,
HandleGLES::Equal>;
using LiveHandles = absl::flat_hash_map<const HandleGLES,
LiveHandle,
HandleGLES::Hash,
HandleGLES::Equal>;
mutable RWMutex handles_mutex_;
LiveHandles handles_ IPLR_GUARDED_BY(handles_mutex_);
int32_t handles_to_collect_count_ IPLR_GUARDED_BY(handles_mutex_) = 0;
Expand Down