1.10 |
This chapter discusses several environment variables that can be used to configure the EGT library at run time.
EGT will look at several run time environment variables to change the operation of the library. For example, you can change some configurations and set log levels using environment variables.
There are many ways to set an environment variable for a process, but generally speaking you can run a process in a shell and specify some environment variables just for that process:
Set the numeric log level for the framework. If the library is compiled with debug turned off, the internal DEBUG and TRACE log levels are removed at compile time.
See Configure Options for more information on compile time options.
Select what backend to use for rendering to the screen. If this environment variable is not specified, a suitable default will be chosen.
Specify the number of buffers to use for KMS. If you specify a single buffer, no buffering will be used. If you specify 2 buffers, double buffering will be used. If you specify 3 buffers, triple buffering will be used, and so on.
Configure mapping of input devices to their EGT input backend.
Available backends include:
Specifying input devices remove the default backend.
Use libinput and tslib to handle different touchscreens:
Get keyboard events for the USER button on a SOM1-EK board:
Change EGT installed default icons directory with an absolute or relative path.
The directory path contents specified must be in the expected format as the default EGT icons directory, containing subdirectories of icon size. For example, 16px, 32px, 64px, and 128px.
Example
Set a custom screen size. This is only possible with some backends, like X11.
Example
Add additional search directories to find resources.
Example
A non-empty value tells the screen backend to perform asynchronous flip operations. Note that when this is enabled, screen tearing may be possible.
Example
A non-empty value turns off window decorations on an X11 window.
When non-empty, print timing information for drawing every widget.
When non-empty, print timing information for the event loop.
When non-empty, print the frames per second of the event loop.
Instead of using a composition buffer, always render directly into the framebuffer. This only works if there is a backend with a single framebuffer. For example, when using KMS, the environment variable EGT_KMS_BUFFERS must equal 1. Otherwise it has no effect and may not apply to all backends.
A non-empty value enables the use of the GFX2D GPU. Set this option only if the device has a 2D GPU. If cairo doesn't have the libm2d support, this option has no effect.
A non-empty value enables drawing of damage rectangles to the display. This can be used to identify, visually, what is being redrawn each flip to the screen. This is a debug option and can create additional burden on performance. This option requires a composition buffer, so it cannot be used with EGT_NO_COMPOSITION_BUFFER.
When non-zero, specifies the amount of decay in milliseconds to visually keep wireframe rectangles around. This option only applies when EGT_WIREFRAME_ENABLE is non-empty.
When non-empty, logs the bandwidth to render the final screen frames. In other words, the number of bytes transmitted through damage rectangles to the framebuffer being displayed. This can be used to gauge the amount of data changing to render a screen.
When non-empty, turns on verbose logging from libinput as log level info.
When non-empty, prints timing information for handling input events.