Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
shell
platform
android
android_display.cc
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
#include "flutter/shell/platform/android/android_display.h"
6
7
namespace
flutter
{
8
9
AndroidDisplay::AndroidDisplay
(
10
std::shared_ptr<PlatformViewAndroidJNI> jni_facade)
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)) {}
17
18
double
AndroidDisplay::GetRefreshRate
()
const
{
19
return
jni_facade_->GetDisplayRefreshRate();
20
}
21
22
double
AndroidDisplay::GetWidth
()
const
{
23
return
jni_facade_->GetDisplayWidth();
24
}
25
26
double
AndroidDisplay::GetHeight
()
const
{
27
return
jni_facade_->GetDisplayHeight();
28
}
29
30
double
AndroidDisplay::GetDevicePixelRatio
()
const
{
31
return
jni_facade_->GetDisplayDensity();
32
}
33
34
}
// namespace flutter
flutter::AndroidDisplay::AndroidDisplay
AndroidDisplay(std::shared_ptr< PlatformViewAndroidJNI > jni_facade)
Definition
android_display.cc:9
flutter::AndroidDisplay::GetDevicePixelRatio
virtual double GetDevicePixelRatio() const override
The device pixel ratio of the display.
Definition
android_display.cc:30
flutter::AndroidDisplay::GetWidth
virtual double GetWidth() const override
The width of the display in physical pixels.
Definition
android_display.cc:22
flutter::AndroidDisplay::GetHeight
virtual double GetHeight() const override
The height of the display in physical pixels.
Definition
android_display.cc:26
flutter::AndroidDisplay::GetRefreshRate
double GetRefreshRate() const override
Definition
android_display.cc:18
flutter::Display
Definition
display.h:35
flutter
Definition
asset_manager.cc:10
std
Definition
ref_ptr.h:256
Generated on Fri Apr 26 2024 06:14:19 for Flutter Engine by
1.9.8