Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::VariableRefreshRateDisplay Class Reference

A Display where the refresh rate can change over time. More...

#include <variable_refresh_rate_display.h>

Inheritance diagram for flutter::VariableRefreshRateDisplay:
flutter::Display

Public Member Functions

 VariableRefreshRateDisplay (DisplayId display_id, const std::weak_ptr< VariableRefreshRateReporter > &refresh_rate_reporter, double width, double height, double device_pixel_ratio)
 
 ~VariableRefreshRateDisplay ()=default
 
double GetRefreshRate () const override
 
- Public Member Functions inherited from flutter::Display
 Display (DisplayId display_id, double refresh_rate, double width, double height, double device_pixel_ratio)
 Construct a new Display object in case where the display id of the display is known. More...
 
virtual ~Display ()=default
 
virtual double GetRefreshRate () const
 
DisplayId GetDisplayId () const
 Returns the DisplayId of the display. More...
 
virtual double GetWidth () const
 The width of the display in physical pixels. More...
 
virtual double GetHeight () const
 The height of the display in physical pixels. More...
 
virtual double GetDevicePixelRatio () const
 The device pixel ratio of the display. More...
 
DisplayData GetDisplayData ()
 

Detailed Description

A Display where the refresh rate can change over time.

Definition at line 17 of file variable_refresh_rate_display.h.

Constructor & Destructor Documentation

◆ VariableRefreshRateDisplay()

flutter::VariableRefreshRateDisplay::VariableRefreshRateDisplay ( DisplayId  display_id,
const std::weak_ptr< VariableRefreshRateReporter > &  refresh_rate_reporter,
double  width,
double  height,
double  device_pixel_ratio 
)
explicit

Definition at line 19 of file variable_refresh_rate_display.cc.

25 : Display(display_id,
26 GetInitialRefreshRate(refresh_rate_reporter),
27 width,
28 height,
29 device_pixel_ratio),
30 refresh_rate_reporter_(refresh_rate_reporter) {}
Display(DisplayId display_id, double refresh_rate, double width, double height, double device_pixel_ratio)
Construct a new Display object in case where the display id of the display is known.
Definition: display.h:40
int32_t height
int32_t width
static double GetInitialRefreshRate(const std::weak_ptr< flutter::VariableRefreshRateReporter > &refresh_rate_reporter)

◆ ~VariableRefreshRateDisplay()

flutter::VariableRefreshRateDisplay::~VariableRefreshRateDisplay ( )
default

Member Function Documentation

◆ GetRefreshRate()

double flutter::VariableRefreshRateDisplay::GetRefreshRate ( ) const
overridevirtual

Reimplemented from flutter::Display.

Definition at line 32 of file variable_refresh_rate_display.cc.

32 {
33 return GetInitialRefreshRate(refresh_rate_reporter_);
34}

The documentation for this class was generated from the following files: