perf: prefer absl::flat_hash_set
over std::set
when sorted order is not needed (#46410)
* perf: use an absl::flat_hash_set for UsbChooserContext::ephemeral_devices_ * perf: use an absl::flat_hash_set for GlobalMenuBarRegistrarX11::live_windows_ * perf: use an absl::flat_hash_set for NativeWindowViews::forwarding_windows_ * perf: use an absl::flat_hash_set for OffScreenRenderWidgetHostView::guest_host_views_ perf: use an absl::flat_hash_set for OffScreenRenderWidgetHostView::proxy_views_ * perf: use an absl::flat_hash_set for NativeWindow::injected_frames_ * perf: use an absl::flat_hash_set for NativeWindow::background_throttling_sources_
This commit is contained in:
parent
36e233797c
commit
6f24dbaab4
7 changed files with 14 additions and 15 deletions
|
@ -9,7 +9,6 @@
|
|||
#include <memory>
|
||||
#include <optional>
|
||||
#include <queue>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
@ -23,6 +22,7 @@
|
|||
#include "content/public/browser/web_contents_user_data.h"
|
||||
#include "extensions/browser/app_window/size_constraints.h"
|
||||
#include "shell/browser/native_window_observer.h"
|
||||
#include "third_party/abseil-cpp/absl/container/flat_hash_set.h"
|
||||
#include "ui/views/widget/widget_delegate.h"
|
||||
|
||||
class SkRegion;
|
||||
|
@ -515,7 +515,8 @@ class NativeWindow : public base::SupportsUserData,
|
|||
// Observers of this window.
|
||||
base::ObserverList<NativeWindowObserver> observers_;
|
||||
|
||||
std::set<BackgroundThrottlingSource*> background_throttling_sources_;
|
||||
absl::flat_hash_set<BackgroundThrottlingSource*>
|
||||
background_throttling_sources_;
|
||||
|
||||
// Accessible title.
|
||||
std::u16string accessible_title_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue