if (hwc_window->state == E_HWC_WINDOW_STATE_DEVICE)
{
- if ((hwc->pp_set) && (target_hwc_window->pp_queue))
+ if (target_hwc_window->pp_queue)
queue_buffer = e_hwc_window_queue_buffer_acquire(target_hwc_window->pp_queue);
else
queue_buffer = root_hwc_window->current.queue_buffer_ref.buffer;
if (width == 0 || height == 0)
return;
- src_crop.w = tbm_surface_get_width(src_tsurface);
- src_crop.h = tbm_surface_get_height(src_tsurface);
+ src_crop.w = hwc->pp_src_rect.w;
+ src_crop.h = hwc->pp_src_rect.h;
if (display_mode == E_OUTPUT_DISPLAY_MODE_MIRROR)
{
if (!src_target_hwc_window->hwc_window.current.buffer.tsurface) return EINA_FALSE;
if (hwc->mirror_src_tsurface == src_target_tsurface) return EINA_FALSE;
- queue = ((E_Hwc_Window *)target_hwc_window)->queue;
+ queue = hwc->pp_queue;
EINA_SAFETY_ON_NULL_RETURN_VAL(queue, EINA_FALSE);
if (hwc->pp_set)
}
else
{
- queue = ((E_Hwc_Window *)target_hwc_window)->queue;
- EINA_SAFETY_ON_NULL_RETURN_VAL(queue, EINA_FALSE);
-
+ if (!e_hwc_window_queue_buffer_can_dequeue(queue)) return EINA_FALSE;
/* dequeue buffer */
queue_buffer = e_hwc_window_queue_buffer_dequeue(queue);
EINA_SAFETY_ON_NULL_RETURN_VAL(queue_buffer, EINA_FALSE);
EHWSINF("PP Create tdm_pp:%p", NULL, hwc, hwc->tpp);
}
- if (!hwc->pp_tqueue)
- {
- _e_hwc_windows_zoom_pp_aligned_value_get(hwc, &w, &h);
- //TODO: Does e20 get the buffer flags from the tdm backend?
- hwc->pp_tqueue = tbm_surface_queue_create(3, w, h, TBM_FORMAT_ARGB8888, TBM_BO_SCANOUT);
- if (!hwc->pp_tqueue)
- {
- EHWSERR("fail tbm_surface_queue_create", hwc);
- goto fail;
- }
+ hwc->pp_set = EINA_TRUE;
+ }
- hwc->pp_queue = e_hwc_window_queue_get(hwc->pp_tqueue);
- if (!hwc->pp_queue)
- {
- EHWSERR("fail e_hwc_window_queue_get", hwc);
- goto fail;
- }
+ if (!hwc->pp_tqueue)
+ {
+ if (e_comp_screen_pp_support())
+ _e_hwc_windows_zoom_pp_aligned_value_get(hwc, &w, &h);
- EHWSINF("PP Create pp_tqueue:%p", NULL, hwc, hwc->pp_tqueue);
+ //TODO: Does e20 get the buffer flags from the tdm backend?
+ hwc->pp_tqueue = tbm_surface_queue_create(3, w, h, TBM_FORMAT_ARGB8888, TBM_BO_SCANOUT);
+ if (!hwc->pp_tqueue)
+ {
+ EHWSERR("fail tbm_surface_queue_create", hwc);
+ goto fail;
}
-
- _e_hwc_windows_target_window_pp_queue_set(hwc->target_hwc_window, hwc->pp_queue);
- e_hwc_windows_target_window_force_render(hwc->target_hwc_window);
- hwc->pp_set = EINA_TRUE;
+ hwc->pp_queue = e_hwc_window_queue_get(hwc->pp_tqueue);
+ if (!hwc->pp_queue)
+ {
+ EHWSERR("fail e_hwc_window_queue_get", hwc);
+ goto fail;
+ }
+ EHWSINF("PP Create pp_tqueue:%p", NULL, hwc, hwc->pp_tqueue);
}
+ _e_hwc_windows_target_window_pp_queue_set(hwc->target_hwc_window, hwc->pp_queue);
+ e_hwc_windows_target_window_force_render(hwc->target_hwc_window);
+
dst_rect.x = 0;
dst_rect.y = 0;
dst_rect.w = w;
hwc->pp_dst_buffer_clear = EINA_FALSE;
hwc->pp_hwc_window = NULL;
- if (e_comp_screen_pp_support())
- {
- hwc->pp_set = EINA_FALSE;
+ hwc->pp_set = EINA_FALSE;
- if (hwc->pp_tqueue)
- {
- EHWSINF("PP Destroy pp_tqueue:%p", NULL, hwc, hwc->pp_tqueue);
-
- hwc->pp_queue = NULL;
- tbm_surface_queue_destroy(hwc->pp_tqueue);
- hwc->pp_tqueue = NULL;
- }
+ if (hwc->pp_tqueue)
+ {
+ EHWSINF("PP Destroy pp_tqueue:%p", NULL, hwc, hwc->pp_tqueue);
+ hwc->pp_queue = NULL;
+ tbm_surface_queue_destroy(hwc->pp_tqueue);
+ hwc->pp_tqueue = NULL;
+ }
- if (!hwc->pp_commit)
+ if (!hwc->pp_commit)
+ {
+ if (hwc->tpp)
{
- if (hwc->tpp)
- {
- EHWSINF("PP Destroy tdm_pp:%p", NULL, hwc, hwc->tpp);
- tdm_pp_destroy(hwc->tpp);
- hwc->tpp = NULL;
- }
-
- e_hwc_window_buffer_set(&hwc->pp_buffer, NULL, NULL, 0);
+ EHWSINF("PP Destroy tdm_pp:%p", NULL, hwc, hwc->tpp);
+ tdm_pp_destroy(hwc->tpp);
+ hwc->tpp = NULL;
}
- _e_hwc_windows_target_window_pp_queue_set(hwc->target_hwc_window, NULL);
- e_hwc_windows_target_window_force_render(hwc->target_hwc_window);
+ e_hwc_window_buffer_set(&hwc->pp_buffer, NULL, NULL, 0);
}
+
+ _e_hwc_windows_target_window_pp_queue_set(hwc->target_hwc_window, NULL);
+ e_hwc_windows_target_window_force_render(hwc->target_hwc_window);
}
// add hwc_window to the render_list