Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
flutter::Display Class Reference

#include <display.h>

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

Public Member Functions

 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.
 
virtual ~Display ()=default
 
virtual double GetRefreshRate () const
 
DisplayId GetDisplayId () const
 Returns the DisplayId of the display.
 
virtual double GetWidth () const
 The width of the display in physical pixels.
 
virtual double GetHeight () const
 The height of the display in physical pixels.
 
virtual double GetDevicePixelRatio () const
 The device pixel ratio of the display.
 
DisplayData GetDisplayData ()
 

Detailed Description

Display refers to a graphics hardware system consisting of a framebuffer, typically a monitor or a screen. This class holds the various display settings.

Definition at line 35 of file display.h.

Constructor & Destructor Documentation

◆ Display()

flutter::Display::Display ( DisplayId  display_id,
double  refresh_rate,
double  width,
double  height,
double  device_pixel_ratio 
)
inline

Construct a new Display object in case where the display id of the display is known.

Definition at line 40 of file display.h.

45 : display_id_(display_id),
46 refresh_rate_(refresh_rate),
47 width_(width),
48 height_(height),
49 device_pixel_ratio_(device_pixel_ratio) {}
int32_t height
int32_t width

◆ ~Display()

virtual flutter::Display::~Display ( )
virtualdefault

Member Function Documentation

◆ GetDevicePixelRatio()

virtual double flutter::Display::GetDevicePixelRatio ( ) const
inlinevirtual

The device pixel ratio of the display.

Reimplemented in flutter::AndroidDisplay.

Definition at line 67 of file display.h.

67{ return device_pixel_ratio_; }

◆ GetDisplayData()

DisplayData flutter::Display::GetDisplayData ( )
inline

Definition at line 69 of file display.h.

69 {
70 return DisplayData{
71 .id = GetDisplayId(),
72 .width = GetWidth(),
73 .height = GetHeight(),
74 .pixel_ratio = GetDevicePixelRatio(),
75 .refresh_rate = GetRefreshRate(),
76 };
77 }
virtual double GetRefreshRate() const
Definition display.cc:8
virtual double GetWidth() const
The width of the display in physical pixels.
Definition display.h:61
DisplayId GetDisplayId() const
Returns the DisplayId of the display.
Definition display.h:58
virtual double GetHeight() const
The height of the display in physical pixels.
Definition display.h:64
virtual double GetDevicePixelRatio() const
The device pixel ratio of the display.
Definition display.h:67

◆ GetDisplayId()

DisplayId flutter::Display::GetDisplayId ( ) const
inline

Returns the DisplayId of the display.

Definition at line 58 of file display.h.

58{ return display_id_; }

◆ GetHeight()

virtual double flutter::Display::GetHeight ( ) const
inlinevirtual

The height of the display in physical pixels.

Reimplemented in flutter::AndroidDisplay.

Definition at line 64 of file display.h.

64{ return height_; }

◆ GetRefreshRate()

double flutter::Display::GetRefreshRate ( ) const
virtual

Reimplemented in flutter::VariableRefreshRateDisplay, and flutter::AndroidDisplay.

Definition at line 8 of file display.cc.

8 {
9 return refresh_rate_;
10}

◆ GetWidth()

virtual double flutter::Display::GetWidth ( ) const
inlinevirtual

The width of the display in physical pixels.

Reimplemented in flutter::AndroidDisplay.

Definition at line 61 of file display.h.

61{ return width_; }

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