Flutter Engine
 
Loading...
Searching...
No Matches
display_manager.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
6
9
10namespace flutter {
11
13
15
17 std::scoped_lock lock(displays_mutex_);
18 if (displays_.empty()) {
20 } else {
21 return displays_[0]->GetRefreshRate();
22 }
23}
24
26 std::vector<std::unique_ptr<Display>> displays) {
27 std::scoped_lock lock(displays_mutex_);
28 displays_ = std::move(displays);
29}
30
31} // namespace flutter
double GetMainDisplayRefreshRate() const
void HandleDisplayUpdates(std::vector< std::unique_ptr< Display > > displays)
Handles the display updates.
static constexpr double kUnknownDisplayRefreshRate
To be used when the display refresh rate is unknown.
Definition display.h:20
std::vector< FlutterEngineDisplay > * displays