For some themes we want to read the firmware-logo to use as background,
when the LCD panel of a laptop is mounted non-upright and/or if it is
using scaling because of HiDPI then the image which we get from the
firmware will be pre-rotated and scaled to match the LCD panel.
This new function will allow renderers to let themes know about this so
that they can adjust for the logo being pre-rotated and scaled.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ply_renderer_input_source_t *input_source);
const char * (*get_device_name)(ply_renderer_backend_t *backend);
+ bool (*get_panel_properties)(ply_renderer_backend_t *backend,
+ int *width,
+ int *height,
+ ply_pixel_buffer_rotation_t *rotation,
+ int *scale);
} ply_renderer_plugin_interface_t;
#endif /* PLY_RENDERER_PLUGIN_H */
renderer->input_source_is_open = false;
}
+bool
+ply_renderer_get_panel_properties (ply_renderer_t *renderer,
+ int *width,
+ int *height,
+ ply_pixel_buffer_rotation_t *rotation,
+ int *scale)
+{
+ if (!renderer->plugin_interface->get_panel_properties)
+ return false;
+
+ return renderer->plugin_interface->get_panel_properties (renderer->backend,
+ width, height,
+ rotation, scale);
+}
+
/* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
void ply_renderer_close_input_source (ply_renderer_t *renderer,
ply_renderer_input_source_t *input_source);
+
+bool ply_renderer_get_panel_properties (ply_renderer_t *renderer,
+ int *width,
+ int *height,
+ ply_pixel_buffer_rotation_t *rotation,
+ int *scale);
#endif
#endif /* PLY_RENDERER_H */