Flutter Engine
The Flutter Engine
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Properties
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
y
Enumerator
b
c
d
e
f
g
h
k
l
m
n
p
r
s
t
u
v
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
shell
platform
android
platform_view_android_unittests.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 "gmock/gmock.h"
6
#include "gtest/gtest.h"
7
#include "
shell/platform/android/flutter_main.h
"
8
#include "third_party/googletest/googlemock/include/gmock/gmock-nice-strict.h"
9
10
namespace
flutter
{
11
namespace
testing {
12
13
TEST
(AndroidPlatformView, SelectsVulkanBasedOnApiLevel) {
14
Settings
settings
;
15
settings
.enable_software_rendering =
false
;
16
settings
.enable_impeller =
true
;
17
18
int
api_level = android_get_device_api_level();
19
EXPECT_GT(api_level, 0);
20
if
(api_level >= 29) {
21
EXPECT_EQ(
FlutterMain::SelectedRenderingAPI
(
settings
),
22
AndroidRenderingAPI::kImpellerVulkan
);
23
}
else
{
24
EXPECT_EQ(
FlutterMain::SelectedRenderingAPI
(
settings
),
25
AndroidRenderingAPI::kSkiaOpenGLES
);
26
}
27
}
28
29
TEST
(AndroidPlatformView, SoftwareRenderingNotSupportedWithImpeller) {
30
Settings
settings
;
31
settings
.enable_software_rendering =
true
;
32
settings
.enable_impeller =
true
;
33
34
ASSERT_DEATH(
FlutterMain::SelectedRenderingAPI
(
settings
),
""
);
35
}
36
37
}
// namespace testing
38
}
// namespace flutter
flutter::FlutterMain::SelectedRenderingAPI
static AndroidRenderingAPI SelectedRenderingAPI(const flutter::Settings &settings)
Definition:
flutter_main.cc:234
flutter_main.h
flutter::testing::TEST
TEST(DisplayListComplexity, EmptyDisplayList)
Definition:
dl_complexity_unittests.cc:47
flutter
Definition:
asset_manager.cc:10
flutter::AndroidRenderingAPI::kSkiaOpenGLES
@ kSkiaOpenGLES
flutter::AndroidRenderingAPI::kImpellerVulkan
@ kImpellerVulkan
gn.compile_sksl_tests.settings
settings
Definition:
compile_sksl_tests.py:18
flutter::Settings
Definition:
settings.h:104
Generated on Sun Jun 23 2024 21:55:10 for Flutter Engine by
1.9.4