Change-Id: I03cc462fa158b4ac6557f3c890775276e9de8c4e
wayland_tbm_client_queue_check_activate(struct wayland_tbm_client *tbm_client, tbm_surface_queue_h queue)
{
struct wayland_tbm_surface_queue *queue_info = NULL;
wayland_tbm_client_queue_check_activate(struct wayland_tbm_client *tbm_client, tbm_surface_queue_h queue)
{
struct wayland_tbm_surface_queue *queue_info = NULL;
+ struct wayland_tbm_buffer *buffer = NULL;
WL_TBM_RETURN_VAL_IF_FAIL(tbm_client != NULL, 0);
WL_TBM_RETURN_VAL_IF_FAIL(queue != NULL, 0);
WL_TBM_RETURN_VAL_IF_FAIL(tbm_client != NULL, 0);
WL_TBM_RETURN_VAL_IF_FAIL(queue != NULL, 0);
pthread_mutex_lock(&queue_info->lock);
pthread_mutex_lock(&queue_info->lock);
- if (queue_info->is_active) {
+ if (!queue_info->is_active) {
pthread_mutex_unlock(&queue_info->lock);
pthread_mutex_unlock(&queue_info->lock);
+ return 0;
+ }
+
+ if (queue_info->active_flush) {
+ if (wl_list_empty(&queue_info->attach_bufs)) {
+ pthread_mutex_unlock(&queue_info->lock);
+ return 0;
+ }
+
+ wl_list_for_each(buffer, &queue_info->attach_bufs, link) {
+ if ((queue_info->width != buffer->width) ||
+ (queue_info->height != buffer->height) ||
+ (queue_info->format != buffer->format)) {
+ pthread_mutex_unlock(&queue_info->lock);
+ return 0;
+ }
+
+ break;
+ }
}
pthread_mutex_unlock(&queue_info->lock);
}
pthread_mutex_unlock(&queue_info->lock);