{
tbm_surface_h tbm_surface = NULL;
- tbm_surface = tbm_surface_internal_create_with_flags(w, h, TBM_FORMAT_XRGB8888, TBM_BO_SCANOUT);
+ tbm_surface = tbm_surface_internal_create_with_flags(w, h, TBM_FORMAT_ARGB8888, TBM_BO_SCANOUT);
if (!tbm_surface)
return NULL;
}
static Eina_Bool
+_e_rdp_pixman_output_image_composite_cursor(E_Rdp_Output *output, E_Hwc_Window *hwc_window, pixman_image_t *pix_surface, int pix_w, int pix_h, int primary_w, int primary_h)
+{
+ Eina_Rectangle showing_pos = {0, };
+ Eina_Rectangle dst_pos = {0, };
+ Eina_Rectangle src_crop = {0, };
+ Eina_Rectangle dst_crop = {0, };
+ void *src_ptr = NULL;
+ int src_stride, img_w, img_h;
+ pixman_image_t *pix_shm_src = NULL;
+
+ if (!hwc_window->cursor.buffer)
+ return EINA_FALSE;
+
+ src_ptr = hwc_window->cursor.img_ptr;
+ src_stride = hwc_window->cursor.img_stride;
+ img_w = hwc_window->cursor.img_w;
+ img_h = hwc_window->cursor.img_h;
+
+ pix_shm_src = pixman_image_create_bits(PIXMAN_a8r8g8b8, img_w, img_h, (uint32_t*)src_ptr, src_stride);
+ if (!pix_shm_src)
+ {
+ ERR("create pixman image failed");
+ return EINA_FALSE;
+ }
+
+ _e_rdp_output_image_src_crop_get(hwc_window, &src_crop, &showing_pos, primary_w, primary_h);
+ _e_rdp_output_center_rect_get(primary_w, primary_h, pix_w, pix_h, &dst_pos);
+ _e_rdp_output_image_dst_crop_get(hwc_window, img_w, img_h, primary_w, primary_h, &dst_pos, &showing_pos, &dst_crop, 0);
+
+ _e_rdp_output_image_composite(pix_shm_src, pix_surface,
+ src_crop.x, src_crop.y, src_crop.w, src_crop.h,
+ dst_crop.x, dst_crop.y, dst_crop.w, dst_crop.h,
+ EINA_TRUE, 0, 0, 0);
+
+ pixman_image_unref(pix_shm_src);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
_e_rdp_pixman_output_image_composite(E_Rdp_Output *output, E_Hwc_Window *hwc_window, pixman_image_t *pix_surface, int pix_w, int pix_h, int primary_w, int primary_h)
{
Eina_Rectangle showing_pos = {0, };
if (!hwc_window) continue;
if (hwc_window->is_target) continue;
if (hwc_window->is_video) continue;
- if (hwc_window->is_cursor) continue;
if (hwc_window->state == E_HWC_WINDOW_STATE_NONE || hwc_window->zpos == -999) continue;
if (hwc_window->accepted_state == E_HWC_WINDOW_STATE_CLIENT)
if (hwc_window->accepted_state == E_HWC_WINDOW_STATE_DEVICE)
visible_list = eina_list_append(visible_list, hwc_window);
+
+ if (hwc_window->accepted_state == E_HWC_WINDOW_STATE_CURSOR)
+ {
+ if (hwc_window->cursor.buffer)
+ visible_list = eina_list_append(visible_list, hwc_window);
+ }
}
if (eina_list_count(visible_list) == 0)
continue;
}
- _e_rdp_pixman_output_image_composite(output, hwc_window, pix_surface, info.width, info.height, e_output_w, e_output_h);
+ if (hwc_window->is_cursor)
+ _e_rdp_pixman_output_image_composite_cursor(output, hwc_window, pix_surface, info.width, info.height, e_output_w, e_output_h);
+ else
+ _e_rdp_pixman_output_image_composite(output, hwc_window, pix_surface, info.width, info.height, e_output_w, e_output_h);
}
out:
if (client->CheckFileDescriptor(client))
{
- DBG("enable client activity %p", client);
+// DBG("enable client activity %p", client);
return 0;
}