Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 11f9263

Browse files
committed
[fuchsia] Add tests for Fuchsia-specific layer behavior.
Inspect commands going to Scenic and make sure they match what is expected. Also, restructure code to need less member variables, and other cleanups based on review feedback.
1 parent f98238d commit 11f9263

9 files changed

+811
-63
lines changed

flow/BUILD.gn

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ source_set("flow") {
8686

8787
if (using_fuchsia_sdk) {
8888
public_deps += [
89+
"$fuchsia_sdk_root/fidl:fuchsia.ui.app",
8990
"$fuchsia_sdk_root/fidl:fuchsia.ui.gfx",
9091
"$fuchsia_sdk_root/pkg:scenic_cpp",
9192
]
@@ -156,6 +157,10 @@ executable("flow_unittests") {
156157
"texture_unittests.cc",
157158
]
158159

160+
if (is_fuchsia) {
161+
sources += ["layers/fuchsia_layer_unittests.cc",]
162+
}
163+
159164
deps = [
160165
":flow",
161166
":flow_fixtures",
@@ -167,6 +172,10 @@ executable("flow_unittests") {
167172
"//third_party/googletest:gtest",
168173
"//third_party/skia",
169174
]
175+
176+
if (is_fuchsia) {
177+
deps += ["//build/fuchsia/pkg:sys_cpp_testing",]
178+
}
170179
}
171180

172181
if (is_fuchsia) {

flow/layers/child_scene_layer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void ChildSceneLayer::UpdateScene(SceneUpdateContext& context) {
5151
FML_DCHECK(view_holder);
5252

5353
view_holder->UpdateScene(context, offset_, size_,
54-
sk_float_round2int(context.alphaf() * 255),
54+
SkScalarRoundToInt(context.alphaf() * 255),
5555
hit_testable_);
5656
}
5757

0 commit comments

Comments
 (0)