Bug 1867190 - Initialise the PHC allocate delay later r=glandium
[gecko.git] / layout / style / GenerateCompositorAnimatableProperties.py
blobb64183b67998fe46b4096f8d5a0bb10f368b914a
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 # You can obtain one at http://mozilla.org/MPL/2.0/.
5 import runpy
8 def generate(output, dataFile):
9 output.write(
10 """/* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT */
11 #ifndef COMPOSITOR_ANIMATABLE_PROPERTY_LIST
12 #define COMPOSITOR_ANIMATABLE_PROPERTY_LIST { \\
13 """
16 def can_animate_on_compositor(p):
17 return "CanAnimateOnCompositor" in p.flags and p.type() != "alias"
19 properties = runpy.run_path(dataFile)["data"]
20 properties = filter(can_animate_on_compositor, properties.values())
22 count = 0
23 for p in properties:
24 output.write(" eCSSProperty_{}, \\\n".format(p.id))
25 count += 1
27 output.write("}\n")
28 output.write("#endif /* COMPOSITOR_ANIMATABLE_PROPERTY_LIST */\n")
30 output.write("\n")
31 output.write("#ifndef COMPOSITOR_ANIMATABLE_PROPERTY_LIST_LENGTH\n")
32 output.write(
33 "#define COMPOSITOR_ANIMATABLE_PROPERTY_LIST_LENGTH {}\n".format(count)
35 output.write("#endif /* COMPOSITOR_ANIMATABLE_PROPERTY_LIST_LENGTH */\n")