The display subsection specifies the configuration to apply to the physical displays that are supported by the platform.
This section must begin with begin display display_id and end with end display. Include this section in your configuration file only if your system supports displays. or if there are applications on your system that require them.
There can be multiple display sections within a configuration file. The number of display sections depends on the number of physical displays supported by the platform.
You use the display_id to associate each display section with a physical display. The display_id can be a number identifying the display, or it can be the connection type of the display.
If the display_id is an integer, Screen applies the configuration parameters to the display whose ID is that specified by display_id. Otherwise, if the display_id is a string that matches one of the valid display connection types, then Screen applies the configuration parameters to the first available display whose connection type matches that specified by the display_id.
Below is an example of a display subsection of a graphics.conf file. In this example, the display_id is a connection type of hdmi; therefore, the configuration parameters are applied to the first available display that supports hdmi:
begin display hdmi formats = rgba8888 rgbx8888 nv12 video-mode = 1280 x 720 @ 60 end display
The following are valid parameters that can be configured under the display subsection:
Parameter | Description | Type | Possible values (if applicable) |
---|---|---|---|
background | The background color of the display. Use RGB color code (hexadecimal value) to identify the color (e.g., blue = 0xff). | Unsigned long integer (hex) | 0x00 (default: black) |
cbabc | Content-based automatic brightness control; specifies the content type of the display | String |
|
cursor | The visibility of the cursor on the display | String |
|
cursor-type |
The configuration required to use a cursor shape. This parameter is specified in the following format: cursor-type; filename; hotspot_x,hotspot_y The parameters for cursor-type are defined as follows:
|
String | Depends on the cursor type. |
defer-framebuffer-creation | Specify whether Screen creates a framebuffer on startup or only when a framebuffer is required (e.g. for composition). Set to false if you want Screen to create a framebuffer always on startup. | String |
true false |
force-composition | Specify whether Screen must always use composition (i.e., Screen always requires a framebuffer) even when the scene doesn't require it. Set to true if you want Screen to always use composition. | String |
true false |
formats |
The pixel format(s) supported by the display. You can configure this parameter with multiple values. Specifying the format reduces startup time because Screen doesn't need to discover which formats are supported. |
String |
byte rgba4444 rgbx4444 rgba5551 rgbx5111 rgb565 rgb888 rgba8888 rgbx8888 yvu9 yuv420 nv12 yv12 uyvy yuy2 v422 ayuv |
gamma | The gamma value of the WFD driver. The range for this gamma value is specific to the driver. | Unsigned long integer | 0 to 255 |
idle-timeout | The number of seconds after which the display enters an idle state. | String or unsigned long integer |
off 0 to 4,294,967,295 |
mirroring | The mirror type. | String |
|
priority | The priority of the update thread (i.e., the thread that renders the framebuffer or framebuffers). | Integer | 0 to 4,294,967,295 15 (default) |
protection-enable | Content protection for the window(s) on the display. Typically, you set this parameter only if the application is interested in HDCP (High-Bandwidth Digital Content Protection). | String |
true false |
rotation |
The clockwise rotation of a display, in degrees. Display rotation is absolute. If you specify rotation, then you must also set defer-framebuffer-creation to false. Otherwise, Screen can't rotate the display. |
Long integer |
0 90 180 270 |
rotation-mode | Your preference of display rotation mode. If the mode of rotation that's specified isn't supported by your display controller, then Screen defaults to none. | String |
|
shadow |
The configuration required to use window shadows. This parameter is specified in the following format: filename; position_x,position_y,width,height The parameters for shadow are defined as follows:
|
String | Example: myfilename; 10, 10, 100, 100 |
splash | The indicator to post the framebuffer on startup. This parameter is considered only if the WFD driver supports it. | Integer |
|
stack-size | The stack size (in units of bytes) that Screen is to use for its threads. This stack-size must be configured appropriately for blitters/compositors that are using Mesa (e.g., gles2blt). The default stack size is insufficient for these types of blitters/compositors. | Integer | 0 to 4,294,967,295 Example: 2097152 |
strict-pipelines | The indicator to request that Screen respects your pipeline assignment. You can assign pipelines by using the pipeline parameter in class subsection of your configuration file, or by setting the SCREEN_PROPERTY_PIPELINE property through the Screen API. | Integer |
|
touch-adjustments | The x and y adjustments to be added to all touch events. This configuration must be in the form: x-adjustment,y-adjustment | Unsigned long integer | 0 to 4,294,967,295 Example: 10,10 |
video-mode |
The initial resolution and refresh rate for the display port. This configuration must be one that is reported by the WFD driver. If you set this to values that aren't supported, then the resolution and refresh rate defaults to the first mode specified by the driver. The resolution and refresh rate must be in the form of: widthxheight@irefresh The i indicates that interlacing is set. |
String | video-mode = 1280x720@60 |