-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Impeller Scene] Add DisplayList OP and Dart bindings #38676
Changes from all commits
71dd551
5b2f82e
ba2d970
ba045de
9073c44
65488a1
ad50a68
f9aa1cf
6c070e8
18407cc
42f31aa
50967f0
c27fdb4
6216684
16c0451
ca83033
4c92382
e2ffa6a
b06543e
079aba8
22c48c6
805e148
e29a794
7877d38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,13 @@ impeller_component("display_list") { | |
"//flutter/fml", | ||
"//third_party/skia", | ||
] | ||
|
||
if (!defined(defines)) { | ||
defines = [] | ||
} | ||
if (impeller_enable_3d) { | ||
defines += [ "IMPELLER_ENABLE_3D" ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why behind a flag? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I added the stubs originally, I believe there were some lint complaints about unused code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fuchsia doesn't build the shaders right now, so I ended up guarding everything to avoid the Fuchsia build depending on Impeller shader headers (Nodes depend on Meshes, Meshes depend on Materials, Materials depend on the shader headers). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A cleaner solution would probably be to have the DL op and friends use an agnostic type (e.g. DlSceneNode) and compile an empty version that debug errors when 3D support is off. |
||
} | ||
} | ||
|
||
impeller_component("display_list_unittests") { | ||
|
@@ -37,4 +44,11 @@ impeller_component("display_list_unittests") { | |
":display_list", | ||
"../playground:playground_test", | ||
] | ||
|
||
if (!defined(defines)) { | ||
defines = [] | ||
} | ||
if (impeller_enable_3d) { | ||
defines += [ "IMPELLER_ENABLE_3D" ] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like a lot of these ifdef blocks could be eliminated in favor of a single ifdef that controls whether or not the FOR_EACH macro contains
V(SetSceneColorSource)
If thatV()
entry doesn't exist then the code isn't generated for that op (and vice versa).