Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
shell
common
display_manager.h
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
#ifndef FLUTTER_SHELL_COMMON_DISPLAY_MANAGER_H_
6
#define FLUTTER_SHELL_COMMON_DISPLAY_MANAGER_H_
7
8
#include <mutex>
9
#include <vector>
10
11
#include "flutter/shell/common/display.h"
12
13
namespace
flutter
{
14
15
/// Manages lifecycle of the connected displays. This class is thread-safe.
16
class
DisplayManager
{
17
public
:
18
DisplayManager
();
19
20
~DisplayManager
();
21
22
/// Returns the display refresh rate of the main display. In cases where there
23
/// is only one display connected, it will return that. We do not yet support
24
/// cases where there are multiple displays.
25
///
26
/// When there are no registered displays, it returns
27
/// `kUnknownDisplayRefreshRate`.
28
double
GetMainDisplayRefreshRate
()
const
;
29
30
/// Handles the display updates.
31
void
HandleDisplayUpdates
(std::vector<std::unique_ptr<Display>> displays);
32
33
private
:
34
/// Guards `displays_` vector.
35
mutable
std::mutex displays_mutex_;
36
std::vector<std::unique_ptr<Display>> displays_;
37
};
38
39
}
// namespace flutter
40
41
#endif
// FLUTTER_SHELL_COMMON_DISPLAY_MANAGER_H_
flutter::DisplayManager
Manages lifecycle of the connected displays. This class is thread-safe.
Definition
display_manager.h:16
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()
flutter
Definition
asset_manager.cc:10
Generated on Fri Apr 26 2024 06:14:18 for Flutter Engine by
1.9.8