void
ds_output_destroy(struct ds_output *output);
+void
+ds_output_enable(struct ds_output *output);
+
+void
+ds_output_disable(struct ds_output *output);
+
bool
ds_output_commit(struct ds_output *output);
static void output_handle_display_destroy(struct wl_listener *listener,
void *data);
+static void output_enable(struct ds_output *output, bool enable);
static void output_state_clear(struct ds_output_state *state);
static void output_state_clear_buffer(struct ds_output_state *state);
free(output);
}
+void
+ds_output_enable(struct ds_output *output)
+{
+ output_enable(output, true);
+}
+
+void
+ds_output_disable(struct ds_output *output)
+{
+ output_enable(output, false);
+}
+
WL_EXPORT bool
ds_output_commit(struct ds_output *output)
{
state->committed &= ~DS_OUTPUT_STATE_BUFFER;
}
+
+static void
+output_enable(struct ds_output *output, bool enable)
+{
+ if (output->enabled == enable) {
+ output->pending.committed &= ~DS_OUTPUT_STATE_ENABLED;
+ return;
+ }
+
+ output->pending.committed |= DS_OUTPUT_STATE_ENABLED;
+ output->pending.enabled = enable;
+}