TPL_OBJECT_UNLOCK(&disp_source->obj);
}
+tpl_result_t
+twe_display_get_buffer_count(twe_display_h display,
+ int *min, int *max)
+{
+ twe_wl_disp_source *disp_source = (twe_wl_disp_source *)display;
+ if (!disp_source || g_source_is_destroyed(&disp_source->gsource)) {
+ TPL_ERR("Invalid parameter. display(%p)", display);
+ return TPL_ERROR_INVALID_PARAMETER;
+ }
+
+ if (min) *min = disp_source->surface_capabilities.min_buffer;
+ if (max) *max = disp_source->surface_capabilities.max_buffer;
+
+ return TPL_ERROR_NONE;
+}
+
+tpl_result_t
+twe_display_get_present_mode(twe_display_h display,
+ int *present_modes)
+{
+ twe_wl_disp_source *disp_source = (twe_wl_disp_source *)display;
+ if (!disp_source || g_source_is_destroyed(&disp_source->gsource)) {
+ TPL_ERR("Invalid parameter. display(%p)", display);
+ return TPL_ERROR_INVALID_PARAMETER;
+ }
+
+ if (present_modes) {
+ *present_modes = TPL_DISPLAY_PRESENT_MODE_MAILBOX |
+ TPL_DISPLAY_PRESENT_MODE_IMMEDIATE |
+ TPL_DISPLAY_PRESENT_MODE_FIFO |
+ TPL_DISPLAY_PRESENT_MODE_FIFO_RELAXED |
+ disp_source->surface_capabilities.present_modes;
+ }
+
+ return TPL_ERROR_NONE;
+}
+
+
static void
__cb_destroy_callback(void *private)
{
void
twe_display_unlock(twe_display_h display);
+tpl_result_t
+twe_display_get_buffer_count(twe_display_h display,
+ int *min,
+ int *max);
+
+tpl_result_t
+twe_display_get_present_mode(twe_display_h display,
+ int *present_modes);
+
twe_surface_h
twe_surface_add(twe_thread* thread,
twe_display_h twe_display,