tree: 4674b483cc2e699ea1b3e4caeec566c42a747d82 [path history] [tgz]
  1. displays/
  2. meta/
  3. tests/
  4. app.cc
  5. app.h
  6. BUILD.gn
  7. color_transform_handler.cc
  8. color_transform_handler.h
  9. constants.cc
  10. constants.h
  11. factory_reset_manager.cc
  12. factory_reset_manager.h
  13. injector.cc
  14. injector.h
  15. inspect.cc
  16. inspect.h
  17. main.cc
  18. media_buttons_handler.cc
  19. media_buttons_handler.h
  20. media_retriever.cc
  21. media_retriever.h
  22. OWNERS
  23. presentation.cc
  24. presentation.h
  25. README.md
  26. safe_presenter.cc
  27. safe_presenter.h
  28. services.config
src/ui/bin/root_presenter/README.md

Root Presenter

This directory contains the Root Presenter, a service which manages input device lifecycle, lower-level input event dispatch, creation of the root of the global scene graph, and connection of root-level Views by clients such as Sys UI.

This collection of code has a lot of complexity, and you may find various workarounds that exist for very specific purposes. Additionally, the code and comments make assumptions (both explicit and implicit) that may no longer hold. Please don't make plans and patches based on what you see in the repository! Instead, reach out to the OWNERS to coordinate your intended work.

Usage

This program is a server, and so is not started directly. See the present_view tool.

CMX file and integration tests

Note that the meta/ directory has two CMX files. One is for production, the other for tests.

The production package //src/ui/bin/root_presenter:root_presenter includes meta/root_presenter.cmx, which exists to enable access to the input device files in /dev/class/input-report. The regular content is pulled in from meta/root_presenter_base.cmx.

Test packages should include meta/root_presenter_base.cmx, which omits the driver access. Generally, test packages should include their own copy of a component (including CMX file) to ensure hermeticity with respect to package loading semantics.

Integration tests don't require access to the device files, because (1) input injection occurs at a different protocol in Root Presenter, and (2) exposure to the actual device files is a flake liability for these tests.

During regular maintenance, when adding a new service dependency, add it to meta/root_presenter_base.cmx, so that it is seen in both tests and production.