Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
7namespace flutter {
8
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
19 return jni_facade_->GetDisplayRefreshRate();
20}
21
23 return jni_facade_->GetDisplayWidth();
24}
25
27 return jni_facade_->GetDisplayHeight();
28}
29
31 return jni_facade_->GetDisplayDensity();
32}
33
34} // namespace flutter
AndroidDisplay(std::shared_ptr< PlatformViewAndroidJNI > jni_facade)
virtual double GetDevicePixelRatio() const override
The device pixel ratio of the display.
virtual double GetWidth() const override
The width of the display in physical pixels.
virtual double GetHeight() const override
The height of the display in physical pixels.
double GetRefreshRate() const override
Definition ref_ptr.h:256