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

A |Display| that listens to refresh rate changes. More...

#include <android_display.h>

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

Public Member Functions

 AndroidDisplay (std::shared_ptr< PlatformViewAndroidJNI > jni_facade)
 
 ~AndroidDisplay ()=default
 
double GetRefreshRate () const override
 
virtual double GetWidth () const override
 The width of the display in physical pixels. More...
 
virtual double GetHeight () const override
 The height of the display in physical pixels. More...
 
virtual double GetDevicePixelRatio () const override
 The device pixel ratio of the display. More...
 
- 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| that listens to refresh rate changes.

Definition at line 17 of file android_display.h.

Constructor & Destructor Documentation

◆ AndroidDisplay()

flutter::AndroidDisplay::AndroidDisplay ( std::shared_ptr< PlatformViewAndroidJNI jni_facade)
explicit

Definition at line 9 of file android_display.cc.

11 : Display(0,
12 jni_facade->GetDisplayRefreshRate(),
13 jni_facade->GetDisplayWidth(),
14 jni_facade->GetDisplayHeight(),
15 jni_facade->GetDisplayDensity()),
16 jni_facade_(std::move(jni_facade)) {}
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

◆ ~AndroidDisplay()

flutter::AndroidDisplay::~AndroidDisplay ( )
default

Member Function Documentation

◆ GetDevicePixelRatio()

double flutter::AndroidDisplay::GetDevicePixelRatio ( ) const
overridevirtual

The device pixel ratio of the display.

Reimplemented from flutter::Display.

Definition at line 30 of file android_display.cc.

30 {
31 return jni_facade_->GetDisplayDensity();
32}

◆ GetHeight()

double flutter::AndroidDisplay::GetHeight ( ) const
overridevirtual

The height of the display in physical pixels.

Reimplemented from flutter::Display.

Definition at line 26 of file android_display.cc.

26 {
27 return jni_facade_->GetDisplayHeight();
28}

◆ GetRefreshRate()

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

Reimplemented from flutter::Display.

Definition at line 18 of file android_display.cc.

18 {
19 return jni_facade_->GetDisplayRefreshRate();
20}

◆ GetWidth()

double flutter::AndroidDisplay::GetWidth ( ) const
overridevirtual

The width of the display in physical pixels.

Reimplemented from flutter::Display.

Definition at line 22 of file android_display.cc.

22 {
23 return jni_facade_->GetDisplayWidth();
24}

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