主权项 |
1. A method comprising:
by a computing device, executing, by a main thread, instructions to generate a GUI hierarchy comprising a representation of a graphical user interface (GUI), the GUI hierarchy comprising a hierarchical organization of layers, wherein each layer represents a logical grouping of components of the GUI and provide copies of the GUI hierarchy to an input thread and a graphics thread; by the computing device, asynchronously executing, by the graphics thread, instructions to render, based on the information about the user input received from the input thread, the GUI in relation to one or more layers of the GUI hierarchy; by the computing device, asynchronously executing, by the input thread, instructions to process user input to determine a gesture based on data received from input devices, wherein the data indicates user interactions with at least one identified layer of the GUI hierarchy and provide information about the user input to the main thread and to the graphics thread; and by the computing device, asynchronously executing, by the graphics thread, instructions to update, based on the information about the user input received from the input thread, the GUI in relation to one or more layers of the GUI hierarchy. |