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
5
#include "
flutter/shell/common/display_manager.h
"
6
7
#include "
flutter/fml/logging.h
"
8
#include "
flutter/fml/macros.h
"
9
10
namespace
flutter
{
11
12
DisplayManager::DisplayManager
() =
default
;
13
14
DisplayManager::~DisplayManager
() =
default
;
15
16
double
DisplayManager::GetMainDisplayRefreshRate
()
const
{
17
std::scoped_lock lock(displays_mutex_);
18
if
(displays_.empty()) {
19
return
kUnknownDisplayRefreshRate
;
20
}
else
{
21
return
displays_[0]->GetRefreshRate();
22
}
23
}
24
25
void
DisplayManager::HandleDisplayUpdates
(
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
flutter::DisplayManager::~DisplayManager
~DisplayManager()
flutter::DisplayManager::GetMainDisplayRefreshRate
double GetMainDisplayRefreshRate() const
Definition
display_manager.cc:16
flutter::DisplayManager::HandleDisplayUpdates
void HandleDisplayUpdates(std::vector< std::unique_ptr< Display > > displays)
Handles the display updates.
Definition
display_manager.cc:25
flutter::DisplayManager::DisplayManager
DisplayManager()
display_manager.h
logging.h
macros.h
flutter
Definition
asset_manager.cc:10
flutter::kUnknownDisplayRefreshRate
static constexpr double kUnknownDisplayRefreshRate
To be used when the display refresh rate is unknown.
Definition
display.h:20
displays
std::vector< FlutterEngineDisplay > * displays
Definition
display_manager.cc:19
shell
common
display_manager.cc
Generated on Wed Nov 5 2025 21:33:18 for Flutter Engine by
1.9.8