Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
shell
common
variable_refresh_rate_display.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_VARIABLE_REFRESH_RATE_DISPLAY_H_
6
#define FLUTTER_SHELL_COMMON_VARIABLE_REFRESH_RATE_DISPLAY_H_
7
8
#include <optional>
9
10
#include "
display.h
"
11
#include "flutter/fml/macros.h"
12
#include "
variable_refresh_rate_reporter.h
"
13
14
namespace
flutter
{
15
16
/// A Display where the refresh rate can change over time.
17
class
VariableRefreshRateDisplay
:
public
Display
{
18
public
:
19
explicit
VariableRefreshRateDisplay
(
20
DisplayId
display_id,
21
const
std::weak_ptr<VariableRefreshRateReporter>& refresh_rate_reporter,
22
double
width
,
23
double
height
,
24
double
device_pixel_ratio);
25
~VariableRefreshRateDisplay
() =
default
;
26
27
// |Display|
28
double
GetRefreshRate
()
const override
;
29
30
private
:
31
const
std::weak_ptr<VariableRefreshRateReporter> refresh_rate_reporter_;
32
33
FML_DISALLOW_COPY_AND_ASSIGN
(
VariableRefreshRateDisplay
);
34
};
35
36
}
// namespace flutter
37
38
#endif
// FLUTTER_SHELL_COMMON_VARIABLE_REFRESH_RATE_DISPLAY_H_
flutter::Display
Definition
display.h:35
flutter::VariableRefreshRateDisplay
A Display where the refresh rate can change over time.
Definition
variable_refresh_rate_display.h:17
flutter::VariableRefreshRateDisplay::~VariableRefreshRateDisplay
~VariableRefreshRateDisplay()=default
flutter::VariableRefreshRateDisplay::GetRefreshRate
double GetRefreshRate() const override
Definition
variable_refresh_rate_display.cc:32
FML_DISALLOW_COPY_AND_ASSIGN
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition
macros.h:27
flutter
Definition
asset_manager.cc:10
flutter::DisplayId
size_t DisplayId
Definition
display.h:17
height
int32_t height
Definition
serialization_callbacks.cc:1
width
int32_t width
Definition
serialization_callbacks.cc:0
display.h
variable_refresh_rate_reporter.h
Generated on Fri Apr 26 2024 06:14:19 for Flutter Engine by
1.9.8