Lines Matching refs:qxl

350 static void red_replay_point_ptr(SpiceReplay *replay, QXLPoint *qxl)  in red_replay_point_ptr()  argument
352 replay_fscanf(replay, "point %d %d\n", &qxl->x, &qxl->y); in red_replay_point_ptr()
355 static void red_replay_point16_ptr(SpiceReplay *replay, QXLPoint16 *qxl) in red_replay_point16_ptr() argument
359 qxl->x = x; in red_replay_point16_ptr()
360 qxl->y = y; in red_replay_point16_ptr()
363 static void red_replay_rect_ptr(SpiceReplay *replay, const char *prefix, QXLRect *qxl) in red_replay_rect_ptr() argument
368 replay_fscanf_check(replay, pattern, &qxl->top, &qxl->left, &qxl->bottom, &qxl->right, in red_replay_rect_ptr()
374 QXLPath *qxl = nullptr; in red_replay_path() local
377 data_size = red_replay_data_chunks(replay, "path", (uint8_t**)&qxl, sizeof(QXLPath)); in red_replay_path()
381 qxl->data_size = data_size; in red_replay_path()
382 return qxl; in red_replay_path()
387 auto qxl = (QXLPath*) QXLPHYSICAL_TO_PTR(p); in red_replay_path_free() local
389 red_replay_data_chunks_free(replay, qxl, sizeof(*qxl)); in red_replay_path_free()
394 QXLClipRects *qxl = nullptr; in red_replay_clip_rects() local
401 if (red_replay_data_chunks(replay, "clip_rects", (uint8_t**)&qxl, sizeof(QXLClipRects)) < 0) { in red_replay_clip_rects()
404 qxl->num_rects = num_rects; in red_replay_clip_rects()
405 return qxl; in red_replay_clip_rects()
408 static void red_replay_clip_rects_free(SpiceReplay *replay, QXLClipRects *qxl) in red_replay_clip_rects_free() argument
410 red_replay_data_chunks_free(replay, qxl, sizeof(*qxl)); in red_replay_clip_rects_free()
423 QXLImage* qxl = nullptr, *data; in red_replay_image() local
439 qxl = (QXLImage*)replay_malloc0(replay, sizeof(QXLImage)); in red_replay_image()
440 replay_fscanf(replay, "descriptor.id %" SCNu64 "\n", &qxl->descriptor.id); in red_replay_image()
441 replay_fscanf(replay, "descriptor.type %d\n", &temp); qxl->descriptor.type = temp; in red_replay_image()
442 replay_fscanf(replay, "descriptor.flags %d\n", &temp); qxl->descriptor.flags = temp; in red_replay_image()
443 replay_fscanf(replay, "descriptor.width %d\n", &qxl->descriptor.width); in red_replay_image()
444 replay_fscanf(replay, "descriptor.height %d\n", &qxl->descriptor.height); in red_replay_image()
449 switch (qxl->descriptor.type) { in red_replay_image()
451 replay_fscanf(replay, "bitmap.format %d\n", &temp); qxl->bitmap.format = temp; in red_replay_image()
452 replay_fscanf(replay, "bitmap.flags %d\n", &temp); qxl->bitmap.flags = temp; in red_replay_image()
453 replay_fscanf(replay, "bitmap.x %d\n", &qxl->bitmap.x); in red_replay_image()
454 replay_fscanf(replay, "bitmap.y %d\n", &qxl->bitmap.y); in red_replay_image()
455 replay_fscanf(replay, "bitmap.stride %d\n", &qxl->bitmap.stride); in red_replay_image()
456 qxl_flags = qxl->bitmap.flags; in red_replay_image()
468 qxl->bitmap.palette = QXLPHYSICAL_FROM_PTR(qp); in red_replay_image()
474 qxl->bitmap.palette = 0; in red_replay_image()
476 bitmap_size = qxl->bitmap.y * qxl->bitmap.stride; in red_replay_image()
477 qxl->bitmap.data = 0; in red_replay_image()
479qxl->bitmap.data = QXLPHYSICAL_FROM_PTR(red_replay_image_data_flat(replay, &bitmap_size)); in red_replay_image()
483 qxl->bitmap.data = QXLPHYSICAL_FROM_PTR(bitmap_data); in red_replay_image()
491 replay_fscanf(replay, "surface_image.surface_id %d\n", &qxl->surface_image.surface_id); in red_replay_image()
495 qxl->surface_image.surface_id = replay_id_get(replay, qxl->surface_image.surface_id); in red_replay_image()
500 replay_fscanf(replay, "quic.data_size %d\n", &qxl->quic.data_size); in red_replay_image()
508 spice_assert(size == qxl->quic.data_size); in red_replay_image()
509 data->descriptor = qxl->descriptor; in red_replay_image()
510 data->quic.data_size = qxl->quic.data_size; in red_replay_image()
511 replay_free(replay, qxl); in red_replay_image()
512 qxl = data; in red_replay_image()
517 return qxl; in red_replay_image()
522 auto qxl = (QXLImage*) QXLPHYSICAL_TO_PTR(p); in red_replay_image_free() local
523 if (!qxl) in red_replay_image_free()
526 switch (qxl->descriptor.type) { in red_replay_image_free()
528 g_free(QXLPHYSICAL_TO_PTR(qxl->bitmap.palette)); in red_replay_image_free()
529 if (qxl->bitmap.flags & QXL_BITMAP_DIRECT) { in red_replay_image_free()
530 g_free(QXLPHYSICAL_TO_PTR(qxl->bitmap.data)); in red_replay_image_free()
532 red_replay_data_chunks_free(replay, QXLPHYSICAL_TO_PTR(qxl->bitmap.data), 0); in red_replay_image_free()
538 red_replay_data_chunks_free(replay, qxl, in red_replay_image_free()
541 qxl = nullptr; in red_replay_image_free()
547 g_free(qxl); in red_replay_image_free()
550 static void red_replay_brush_ptr(SpiceReplay *replay, QXLBrush *qxl, uint32_t flags) in red_replay_brush_ptr() argument
552 replay_fscanf(replay, "type %d\n", &qxl->type); in red_replay_brush_ptr()
557 switch (qxl->type) { in red_replay_brush_ptr()
559 replay_fscanf(replay, "u.color %d\n", &qxl->u.color); in red_replay_brush_ptr()
562 qxl->u.pattern.pat = QXLPHYSICAL_FROM_PTR(red_replay_image(replay, flags)); in red_replay_brush_ptr()
563 red_replay_point_ptr(replay, &qxl->u.pattern.pos); in red_replay_brush_ptr()
568 static void red_replay_brush_free(SpiceReplay *replay, QXLBrush *qxl, uint32_t flags) in red_replay_brush_free() argument
570 switch (qxl->type) { in red_replay_brush_free()
572 red_replay_image_free(replay, qxl->u.pattern.pat, flags); in red_replay_brush_free()
577 static void red_replay_qmask_ptr(SpiceReplay *replay, QXLQMask *qxl, uint32_t flags) in red_replay_qmask_ptr() argument
581 replay_fscanf(replay, "flags %d\n", &temp); qxl->flags = temp; in red_replay_qmask_ptr()
582 red_replay_point_ptr(replay, &qxl->pos); in red_replay_qmask_ptr()
583 qxl->bitmap = QXLPHYSICAL_FROM_PTR(red_replay_image(replay, flags)); in red_replay_qmask_ptr()
586 static void red_replay_qmask_free(SpiceReplay *replay, QXLQMask *qxl, uint32_t flags) in red_replay_qmask_free() argument
588 red_replay_image_free(replay, qxl->bitmap, flags); in red_replay_qmask_free()
591 static void red_replay_fill_ptr(SpiceReplay *replay, QXLFill *qxl, uint32_t flags) in red_replay_fill_ptr() argument
595 red_replay_brush_ptr(replay, &qxl->brush, flags); in red_replay_fill_ptr()
596 replay_fscanf(replay, "rop_descriptor %d\n", &temp); qxl->rop_descriptor = temp; in red_replay_fill_ptr()
597 red_replay_qmask_ptr(replay, &qxl->mask, flags); in red_replay_fill_ptr()
600 static void red_replay_fill_free(SpiceReplay *replay, QXLFill *qxl, uint32_t flags) in red_replay_fill_free() argument
602 red_replay_brush_free(replay, &qxl->brush, flags); in red_replay_fill_free()
603 red_replay_qmask_free(replay, &qxl->mask, flags); in red_replay_fill_free()
606 static void red_replay_opaque_ptr(SpiceReplay *replay, QXLOpaque *qxl, uint32_t flags) in red_replay_opaque_ptr() argument
610 qxl->src_bitmap = QXLPHYSICAL_FROM_PTR(red_replay_image(replay, flags)); in red_replay_opaque_ptr()
611 red_replay_rect_ptr(replay, "src_area", &qxl->src_area); in red_replay_opaque_ptr()
612 red_replay_brush_ptr(replay, &qxl->brush, flags); in red_replay_opaque_ptr()
613 replay_fscanf(replay, "rop_descriptor %d\n", &temp); qxl->rop_descriptor = temp; in red_replay_opaque_ptr()
614 replay_fscanf(replay, "scale_mode %d\n", &temp); qxl->scale_mode = temp; in red_replay_opaque_ptr()
615 red_replay_qmask_ptr(replay, &qxl->mask, flags); in red_replay_opaque_ptr()
618 static void red_replay_opaque_free(SpiceReplay *replay, QXLOpaque *qxl, uint32_t flags) in red_replay_opaque_free() argument
620 red_replay_image_free(replay, qxl->src_bitmap, flags); in red_replay_opaque_free()
621 red_replay_brush_free(replay, &qxl->brush, flags); in red_replay_opaque_free()
622 red_replay_qmask_free(replay, &qxl->mask, flags); in red_replay_opaque_free()
625 static void red_replay_copy_ptr(SpiceReplay *replay, QXLCopy *qxl, uint32_t flags) in red_replay_copy_ptr() argument
629 qxl->src_bitmap = QXLPHYSICAL_FROM_PTR(red_replay_image(replay, flags)); in red_replay_copy_ptr()
630 red_replay_rect_ptr(replay, "src_area", &qxl->src_area); in red_replay_copy_ptr()
631 replay_fscanf(replay, "rop_descriptor %d\n", &temp); qxl->rop_descriptor = temp; in red_replay_copy_ptr()
632 replay_fscanf(replay, "scale_mode %d\n", &temp); qxl->scale_mode = temp; in red_replay_copy_ptr()
633 red_replay_qmask_ptr(replay, &qxl->mask, flags); in red_replay_copy_ptr()
636 static void red_replay_copy_free(SpiceReplay *replay, QXLCopy *qxl, uint32_t flags) in red_replay_copy_free() argument
638 red_replay_image_free(replay, qxl->src_bitmap, flags); in red_replay_copy_free()
639 red_replay_qmask_free(replay, &qxl->mask, flags); in red_replay_copy_free()
642 static void red_replay_blend_ptr(SpiceReplay *replay, QXLBlend *qxl, uint32_t flags) in red_replay_blend_ptr() argument
646 qxl->src_bitmap = QXLPHYSICAL_FROM_PTR(red_replay_image(replay, flags)); in red_replay_blend_ptr()
647 red_replay_rect_ptr(replay, "src_area", &qxl->src_area); in red_replay_blend_ptr()
648 replay_fscanf(replay, "rop_descriptor %d\n", &temp); qxl->rop_descriptor = temp; in red_replay_blend_ptr()
649 replay_fscanf(replay, "scale_mode %d\n", &temp); qxl->scale_mode = temp; in red_replay_blend_ptr()
650 red_replay_qmask_ptr(replay, &qxl->mask, flags); in red_replay_blend_ptr()
653 static void red_replay_blend_free(SpiceReplay *replay, QXLBlend *qxl, uint32_t flags) in red_replay_blend_free() argument
655 red_replay_image_free(replay, qxl->src_bitmap, flags); in red_replay_blend_free()
656 red_replay_qmask_free(replay, &qxl->mask, flags); in red_replay_blend_free()
659 static void red_replay_transparent_ptr(SpiceReplay *replay, QXLTransparent *qxl, uint32_t flags) in red_replay_transparent_ptr() argument
661 qxl->src_bitmap = QXLPHYSICAL_FROM_PTR(red_replay_image(replay, flags)); in red_replay_transparent_ptr()
662 red_replay_rect_ptr(replay, "src_area", &qxl->src_area); in red_replay_transparent_ptr()
663 replay_fscanf(replay, "src_color %d\n", &qxl->src_color); in red_replay_transparent_ptr()
664 replay_fscanf(replay, "true_color %d\n", &qxl->true_color); in red_replay_transparent_ptr()
667 static void red_replay_transparent_free(SpiceReplay *replay, QXLTransparent *qxl, uint32_t flags) in red_replay_transparent_free() argument
669 red_replay_image_free(replay, qxl->src_bitmap, flags); in red_replay_transparent_free()
672 static void red_replay_alpha_blend_ptr(SpiceReplay *replay, QXLAlphaBlend *qxl, uint32_t flags) in red_replay_alpha_blend_ptr() argument
676 replay_fscanf(replay, "alpha_flags %d\n", &temp); qxl->alpha_flags = temp; in red_replay_alpha_blend_ptr()
677 replay_fscanf(replay, "alpha %d\n", &temp); qxl->alpha = temp; in red_replay_alpha_blend_ptr()
678 qxl->src_bitmap = QXLPHYSICAL_FROM_PTR(red_replay_image(replay, flags)); in red_replay_alpha_blend_ptr()
679 red_replay_rect_ptr(replay, "src_area", &qxl->src_area); in red_replay_alpha_blend_ptr()
682 static void red_replay_alpha_blend_free(SpiceReplay *replay, QXLAlphaBlend *qxl, uint32_t flags) in red_replay_alpha_blend_free() argument
684 red_replay_image_free(replay, qxl->src_bitmap, flags); in red_replay_alpha_blend_free()
687 static void red_replay_alpha_blend_ptr_compat(SpiceReplay *replay, QXLCompatAlphaBlend *qxl, uint32… in red_replay_alpha_blend_ptr_compat() argument
691 replay_fscanf(replay, "alpha %d\n", &temp); qxl->alpha = temp; in red_replay_alpha_blend_ptr_compat()
692 qxl->src_bitmap = QXLPHYSICAL_FROM_PTR(red_replay_image(replay, flags)); in red_replay_alpha_blend_ptr_compat()
693 red_replay_rect_ptr(replay, "src_area", &qxl->src_area); in red_replay_alpha_blend_ptr_compat()
696 static void red_replay_rop3_ptr(SpiceReplay *replay, QXLRop3 *qxl, uint32_t flags) in red_replay_rop3_ptr() argument
700 qxl->src_bitmap = QXLPHYSICAL_FROM_PTR(red_replay_image(replay, flags)); in red_replay_rop3_ptr()
701 red_replay_rect_ptr(replay, "src_area", &qxl->src_area); in red_replay_rop3_ptr()
702 red_replay_brush_ptr(replay, &qxl->brush, flags); in red_replay_rop3_ptr()
703 replay_fscanf(replay, "rop3 %d\n", &temp); qxl->rop3 = temp; in red_replay_rop3_ptr()
704 replay_fscanf(replay, "scale_mode %d\n", &temp); qxl->scale_mode = temp; in red_replay_rop3_ptr()
705 red_replay_qmask_ptr(replay, &qxl->mask, flags); in red_replay_rop3_ptr()
708 static void red_replay_rop3_free(SpiceReplay *replay, QXLRop3 *qxl, uint32_t flags) in red_replay_rop3_free() argument
710 red_replay_image_free(replay, qxl->src_bitmap, flags); in red_replay_rop3_free()
711 red_replay_brush_free(replay, &qxl->brush, flags); in red_replay_rop3_free()
712 red_replay_qmask_free(replay, &qxl->mask, flags); in red_replay_rop3_free()
715 static void red_replay_stroke_ptr(SpiceReplay *replay, QXLStroke *qxl, uint32_t flags) in red_replay_stroke_ptr() argument
719 qxl->path = QXLPHYSICAL_FROM_PTR(red_replay_path(replay)); in red_replay_stroke_ptr()
720 replay_fscanf(replay, "attr.flags %d\n", &temp); qxl->attr.flags = temp; in red_replay_stroke_ptr()
724 if (qxl->attr.flags & SPICE_LINE_FLAGS_STYLED) { in red_replay_stroke_ptr()
727 replay_fscanf(replay, "attr.style_nseg %d\n", &temp); qxl->attr.style_nseg = temp; in red_replay_stroke_ptr()
730 qxl->attr.style = QXLPHYSICAL_FROM_PTR(data); in red_replay_stroke_ptr()
732 red_replay_brush_ptr(replay, &qxl->brush, flags); in red_replay_stroke_ptr()
733 replay_fscanf(replay, "fore_mode %d\n", &temp); qxl->fore_mode = temp; in red_replay_stroke_ptr()
734 replay_fscanf(replay, "back_mode %d\n", &temp); qxl->back_mode = temp; in red_replay_stroke_ptr()
737 static void red_replay_stroke_free(SpiceReplay *replay, QXLStroke *qxl, uint32_t flags) in red_replay_stroke_free() argument
739 red_replay_path_free(replay, qxl->path); in red_replay_stroke_free()
740 if (qxl->attr.flags & SPICE_LINE_FLAGS_STYLED) { in red_replay_stroke_free()
741 g_free(QXLPHYSICAL_TO_PTR(qxl->attr.style)); in red_replay_stroke_free()
743 red_replay_brush_free(replay, &qxl->brush, flags); in red_replay_stroke_free()
753 QXLString *qxl = nullptr; in red_replay_string() local
758 chunk_size = red_replay_data_chunks(replay, "string", (uint8_t**)&qxl, sizeof(QXLString)); in red_replay_string()
762 qxl->data_size = data_size; in red_replay_string()
763 qxl->length = length; in red_replay_string()
764 qxl->flags = flags; in red_replay_string()
765 spice_assert(chunk_size == qxl->data_size); in red_replay_string()
766 return qxl; in red_replay_string()
769 static void red_replay_string_free(SpiceReplay *replay, QXLString *qxl) in red_replay_string_free() argument
771 red_replay_data_chunks_free(replay, qxl, sizeof(*qxl)); in red_replay_string_free()
774 static void red_replay_text_ptr(SpiceReplay *replay, QXLText *qxl, uint32_t flags) in red_replay_text_ptr() argument
778 qxl->str = QXLPHYSICAL_FROM_PTR(red_replay_string(replay)); in red_replay_text_ptr()
779 red_replay_rect_ptr(replay, "back_area", &qxl->back_area); in red_replay_text_ptr()
780 red_replay_brush_ptr(replay, &qxl->fore_brush, flags); in red_replay_text_ptr()
781 red_replay_brush_ptr(replay, &qxl->back_brush, flags); in red_replay_text_ptr()
782 replay_fscanf(replay, "fore_mode %d\n", &temp); qxl->fore_mode = temp; in red_replay_text_ptr()
783 replay_fscanf(replay, "back_mode %d\n", &temp); qxl->back_mode = temp; in red_replay_text_ptr()
786 static void red_replay_text_free(SpiceReplay *replay, QXLText *qxl, uint32_t flags) in red_replay_text_free() argument
788 red_replay_string_free(replay, (QXLString*) QXLPHYSICAL_TO_PTR(qxl->str)); in red_replay_text_free()
789 red_replay_brush_free(replay, &qxl->fore_brush, flags); in red_replay_text_free()
790 red_replay_brush_free(replay, &qxl->back_brush, flags); in red_replay_text_free()
793 static void red_replay_whiteness_ptr(SpiceReplay *replay, QXLWhiteness *qxl, uint32_t flags) in red_replay_whiteness_ptr() argument
795 red_replay_qmask_ptr(replay, &qxl->mask, flags); in red_replay_whiteness_ptr()
798 static void red_replay_whiteness_free(SpiceReplay *replay, QXLWhiteness *qxl, uint32_t flags) in red_replay_whiteness_free() argument
800 red_replay_qmask_free(replay, &qxl->mask, flags); in red_replay_whiteness_free()
803 static void red_replay_blackness_ptr(SpiceReplay *replay, QXLBlackness *qxl, uint32_t flags) in red_replay_blackness_ptr() argument
805 red_replay_qmask_ptr(replay, &qxl->mask, flags); in red_replay_blackness_ptr()
808 static void red_replay_blackness_free(SpiceReplay *replay, QXLBlackness *qxl, uint32_t flags) in red_replay_blackness_free() argument
810 red_replay_qmask_free(replay, &qxl->mask, flags); in red_replay_blackness_free()
813 static void red_replay_invers_ptr(SpiceReplay *replay, QXLInvers *qxl, uint32_t flags) in red_replay_invers_ptr() argument
815 red_replay_qmask_ptr(replay, &qxl->mask, flags); in red_replay_invers_ptr()
818 static void red_replay_invers_free(SpiceReplay *replay, QXLInvers *qxl, uint32_t flags) in red_replay_invers_free() argument
820 red_replay_qmask_free(replay, &qxl->mask, flags); in red_replay_invers_free()
823 static void red_replay_clip_ptr(SpiceReplay *replay, QXLClip *qxl) in red_replay_clip_ptr() argument
825 replay_fscanf(replay, "type %d\n", &qxl->type); in red_replay_clip_ptr()
829 switch (qxl->type) { in red_replay_clip_ptr()
831 qxl->data = QXLPHYSICAL_FROM_PTR(red_replay_clip_rects(replay)); in red_replay_clip_ptr()
836 static void red_replay_clip_free(SpiceReplay *replay, QXLClip *qxl) in red_replay_clip_free() argument
838 switch (qxl->type) { in red_replay_clip_free()
840 red_replay_clip_rects_free(replay, (QXLClipRects*) QXLPHYSICAL_TO_PTR(qxl->data)); in red_replay_clip_free()
856 static void red_replay_composite_ptr(SpiceReplay *replay, QXLComposite *qxl, uint32_t flags) in red_replay_composite_ptr() argument
860 replay_fscanf(replay, "flags %d\n", &qxl->flags); in red_replay_composite_ptr()
861 qxl->src = QXLPHYSICAL_FROM_PTR(red_replay_image(replay, flags)); in red_replay_composite_ptr()
864 qxl->src_transform = enabled ? QXLPHYSICAL_FROM_PTR(red_replay_transform(replay)) : 0; in red_replay_composite_ptr()
867 qxl->mask = enabled ? QXLPHYSICAL_FROM_PTR(red_replay_image(replay, flags)) : 0; in red_replay_composite_ptr()
870 qxl->mask_transform = enabled ? QXLPHYSICAL_FROM_PTR(red_replay_transform(replay)) : 0; in red_replay_composite_ptr()
872 …replay_fscanf(replay, "src_origin %" SCNi16 " %" SCNi16 "\n", &qxl->src_origin.x, &qxl->src_origin… in red_replay_composite_ptr()
873 …replay_fscanf(replay, "mask_origin %" SCNi16 " %" SCNi16 "\n", &qxl->mask_origin.x, &qxl->mask_ori… in red_replay_composite_ptr()
876 static void red_replay_composite_free(SpiceReplay *replay, QXLComposite *qxl, uint32_t flags) in red_replay_composite_free() argument
878 red_replay_image_free(replay, qxl->src, flags); in red_replay_composite_free()
879 g_free(QXLPHYSICAL_TO_PTR(qxl->src_transform)); in red_replay_composite_free()
880 red_replay_image_free(replay, qxl->mask, flags); in red_replay_composite_free()
881 g_free(QXLPHYSICAL_TO_PTR(qxl->mask_transform)); in red_replay_composite_free()
887 …auto qxl = (QXLDrawable*) replay_malloc0(replay, sizeof(QXLDrawable)); // TODO - this is too large… in red_replay_native_drawable() local
891 red_replay_rect_ptr(replay, "bbox", &qxl->bbox); in red_replay_native_drawable()
892 red_replay_clip_ptr(replay, &qxl->clip); in red_replay_native_drawable()
893 replay_fscanf(replay, "effect %d\n", &temp); qxl->effect = temp; in red_replay_native_drawable()
894 replay_fscanf(replay, "mm_time %d\n", &qxl->mm_time); in red_replay_native_drawable()
895 replay_fscanf(replay, "self_bitmap %d\n", &temp); qxl->self_bitmap = temp; in red_replay_native_drawable()
896 red_replay_rect_ptr(replay, "self_bitmap_area", &qxl->self_bitmap_area); in red_replay_native_drawable()
897 replay_fscanf(replay, "surface_id %d\n", &qxl->surface_id); in red_replay_native_drawable()
901 qxl->surface_id = replay_id_get(replay, qxl->surface_id); in red_replay_native_drawable()
904 replay_fscanf(replay, "surfaces_dest %d\n", &qxl->surfaces_dest[i]); in red_replay_native_drawable()
908 qxl->surfaces_dest[i] = replay_id_get(replay, qxl->surfaces_dest[i]); in red_replay_native_drawable()
909 red_replay_rect_ptr(replay, "surfaces_rects", &qxl->surfaces_rects[i]); in red_replay_native_drawable()
912 replay_fscanf(replay, "type %d\n", &temp); qxl->type = temp; in red_replay_native_drawable()
916 switch (qxl->type) { in red_replay_native_drawable()
918 red_replay_alpha_blend_ptr(replay, &qxl->u.alpha_blend, flags); in red_replay_native_drawable()
921 red_replay_blackness_ptr(replay, &qxl->u.blackness, flags); in red_replay_native_drawable()
924 red_replay_blend_ptr(replay, &qxl->u.blend, flags); in red_replay_native_drawable()
927 red_replay_copy_ptr(replay, &qxl->u.copy, flags); in red_replay_native_drawable()
930 red_replay_point_ptr(replay, &qxl->u.copy_bits.src_pos); in red_replay_native_drawable()
933 red_replay_fill_ptr(replay, &qxl->u.fill, flags); in red_replay_native_drawable()
936 red_replay_opaque_ptr(replay, &qxl->u.opaque, flags); in red_replay_native_drawable()
939 red_replay_invers_ptr(replay, &qxl->u.invers, flags); in red_replay_native_drawable()
944 red_replay_rop3_ptr(replay, &qxl->u.rop3, flags); in red_replay_native_drawable()
947 red_replay_stroke_ptr(replay, &qxl->u.stroke, flags); in red_replay_native_drawable()
950 red_replay_text_ptr(replay, &qxl->u.text, flags); in red_replay_native_drawable()
953 red_replay_transparent_ptr(replay, &qxl->u.transparent, flags); in red_replay_native_drawable()
956 red_replay_whiteness_ptr(replay, &qxl->u.whiteness, flags); in red_replay_native_drawable()
959 red_replay_composite_ptr(replay, &qxl->u.composite, flags); in red_replay_native_drawable()
965 return qxl; in red_replay_native_drawable()
968 static void red_replay_native_drawable_free(SpiceReplay *replay, QXLDrawable *qxl, uint32_t flags) in red_replay_native_drawable_free() argument
970 red_replay_clip_free(replay, &qxl->clip); in red_replay_native_drawable_free()
972 switch (qxl->type) { in red_replay_native_drawable_free()
974 red_replay_alpha_blend_free(replay, &qxl->u.alpha_blend, flags); in red_replay_native_drawable_free()
977 red_replay_blackness_free(replay, &qxl->u.blackness, flags); in red_replay_native_drawable_free()
980 red_replay_blend_free(replay, &qxl->u.blend, flags); in red_replay_native_drawable_free()
983 red_replay_copy_free(replay, &qxl->u.copy, flags); in red_replay_native_drawable_free()
988 red_replay_fill_free(replay, &qxl->u.fill, flags); in red_replay_native_drawable_free()
991 red_replay_opaque_free(replay, &qxl->u.opaque, flags); in red_replay_native_drawable_free()
994 red_replay_invers_free(replay, &qxl->u.invers, flags); in red_replay_native_drawable_free()
999 red_replay_rop3_free(replay, &qxl->u.rop3, flags); in red_replay_native_drawable_free()
1002 red_replay_stroke_free(replay, &qxl->u.stroke, flags); in red_replay_native_drawable_free()
1005 red_replay_text_free(replay, &qxl->u.text, flags); in red_replay_native_drawable_free()
1008 red_replay_transparent_free(replay, &qxl->u.transparent, flags); in red_replay_native_drawable_free()
1011 red_replay_whiteness_free(replay, &qxl->u.whiteness, flags); in red_replay_native_drawable_free()
1014 red_replay_composite_free(replay, &qxl->u.composite, flags); in red_replay_native_drawable_free()
1021 g_free(qxl); in red_replay_native_drawable_free()
1027 …auto qxl = (QXLCompatDrawable*) replay_malloc0(replay, sizeof(QXLCompatDrawable)); // TODO - too l… in red_replay_compat_drawable() local
1029 red_replay_rect_ptr(replay, "bbox", &qxl->bbox); in red_replay_compat_drawable()
1030 red_replay_clip_ptr(replay, &qxl->clip); in red_replay_compat_drawable()
1031 replay_fscanf(replay, "effect %d\n", &temp); qxl->effect = temp; in red_replay_compat_drawable()
1032 replay_fscanf(replay, "mm_time %d\n", &qxl->mm_time); in red_replay_compat_drawable()
1034 replay_fscanf(replay, "bitmap_offset %d\n", &temp); qxl->bitmap_offset = temp; in red_replay_compat_drawable()
1035 red_replay_rect_ptr(replay, "bitmap_area", &qxl->bitmap_area); in red_replay_compat_drawable()
1037 replay_fscanf(replay, "type %d\n", &temp); qxl->type = temp; in red_replay_compat_drawable()
1041 switch (qxl->type) { in red_replay_compat_drawable()
1043 red_replay_alpha_blend_ptr_compat(replay, &qxl->u.alpha_blend, flags); in red_replay_compat_drawable()
1046 red_replay_blackness_ptr(replay, &qxl->u.blackness, flags); in red_replay_compat_drawable()
1049 red_replay_blend_ptr(replay, &qxl->u.blend, flags); in red_replay_compat_drawable()
1052 red_replay_copy_ptr(replay, &qxl->u.copy, flags); in red_replay_compat_drawable()
1055 red_replay_point_ptr(replay, &qxl->u.copy_bits.src_pos); in red_replay_compat_drawable()
1058 red_replay_fill_ptr(replay, &qxl->u.fill, flags); in red_replay_compat_drawable()
1061 red_replay_opaque_ptr(replay, &qxl->u.opaque, flags); in red_replay_compat_drawable()
1064 red_replay_invers_ptr(replay, &qxl->u.invers, flags); in red_replay_compat_drawable()
1069 red_replay_rop3_ptr(replay, &qxl->u.rop3, flags); in red_replay_compat_drawable()
1072 red_replay_stroke_ptr(replay, &qxl->u.stroke, flags); in red_replay_compat_drawable()
1075 red_replay_text_ptr(replay, &qxl->u.text, flags); in red_replay_compat_drawable()
1078 red_replay_transparent_ptr(replay, &qxl->u.transparent, flags); in red_replay_compat_drawable()
1081 red_replay_whiteness_ptr(replay, &qxl->u.whiteness, flags); in red_replay_compat_drawable()
1084 spice_error("unknown type %d", qxl->type); in red_replay_compat_drawable()
1087 return qxl; in red_replay_compat_drawable()
1104 auto qxl = (QXLUpdateCmd*) replay_malloc0(replay, sizeof(QXLUpdateCmd)); in red_replay_update_cmd() local
1107 red_replay_rect_ptr(replay, "area", &qxl->area); in red_replay_update_cmd()
1108 replay_fscanf(replay, "update_id %d\n", &qxl->update_id); in red_replay_update_cmd()
1109 replay_fscanf(replay, "surface_id %d\n", &qxl->surface_id); in red_replay_update_cmd()
1113 qxl->surface_id = replay_id_get(replay, qxl->surface_id); in red_replay_update_cmd()
1115 return qxl; in red_replay_update_cmd()
1120 QXLMessage *qxl = nullptr; in red_replay_message() local
1123 read_binary(replay, "message", &size, (uint8_t**)&qxl, sizeof(QXLMessage)); in red_replay_message()
1124 return qxl; in red_replay_message()
1132 auto qxl = (QXLSurfaceCmd*) replay_malloc0(replay, sizeof(QXLSurfaceCmd)); in red_replay_surface_cmd() local
1135 replay_fscanf(replay, "surface_id %d\n", &qxl->surface_id); in red_replay_surface_cmd()
1136 replay_fscanf(replay, "type %d\n", &temp); qxl->type = temp; in red_replay_surface_cmd()
1137 replay_fscanf(replay, "flags %d\n", &qxl->flags); in red_replay_surface_cmd()
1142 switch (qxl->type) { in red_replay_surface_cmd()
1144 replay_fscanf(replay, "u.surface_create.format %d\n", &qxl->u.surface_create.format); in red_replay_surface_cmd()
1145 replay_fscanf(replay, "u.surface_create.width %d\n", &qxl->u.surface_create.width); in red_replay_surface_cmd()
1146 replay_fscanf(replay, "u.surface_create.height %d\n", &qxl->u.surface_create.height); in red_replay_surface_cmd()
1147 replay_fscanf(replay, "u.surface_create.stride %d\n", &qxl->u.surface_create.stride); in red_replay_surface_cmd()
1151 size = qxl->u.surface_create.height * abs(qxl->u.surface_create.stride); in red_replay_surface_cmd()
1152 if ((qxl->flags & QXL_SURF_FLAG_KEEP_DATA) != 0) { in red_replay_surface_cmd()
1155 qxl->u.surface_create.data = QXLPHYSICAL_FROM_PTR(data); in red_replay_surface_cmd()
1160 qxl->u.surface_create.data = QXLPHYSICAL_FROM_PTR(replay_malloc(replay, size)); in red_replay_surface_cmd()
1162 qxl->surface_id = replay_id_new(replay, qxl->surface_id); in red_replay_surface_cmd()
1165 qxl->u.surface_create.data = 0; in red_replay_surface_cmd()
1166 qxl->surface_id = replay_id_get(replay, qxl->surface_id); in red_replay_surface_cmd()
1168 return qxl; in red_replay_surface_cmd()
1171 static void red_replay_surface_cmd_free(SpiceReplay *replay, QXLSurfaceCmd *qxl) in red_replay_surface_cmd_free() argument
1173 if (qxl->type == QXL_SURFACE_CMD_DESTROY) { in red_replay_surface_cmd_free()
1174 replay_id_free(replay, qxl->surface_id); in red_replay_surface_cmd_free()
1177 g_free(QXLPHYSICAL_TO_PTR(qxl->u.surface_create.data)); in red_replay_surface_cmd_free()
1178 g_free(qxl); in red_replay_surface_cmd_free()
1184 QXLCursor cursor, *qxl = nullptr; in red_replay_cursor() local
1203 data_size = red_replay_data_chunks(replay, "cursor", (uint8_t**)&qxl, sizeof(QXLCursor)); in red_replay_cursor()
1207 qxl->header = cursor.header; in red_replay_cursor()
1208 qxl->data_size = data_size; in red_replay_cursor()
1209 return qxl; in red_replay_cursor()
1215 auto qxl = (QXLCursorCmd*) replay_malloc0(replay, sizeof(QXLCursorCmd)); in red_replay_cursor_cmd() local
1222 qxl->type = temp; in red_replay_cursor_cmd()
1223 switch (qxl->type) { in red_replay_cursor_cmd()
1225 red_replay_point16_ptr(replay, &qxl->u.set.position); in red_replay_cursor_cmd()
1227 qxl->u.set.visible = temp; in red_replay_cursor_cmd()
1228 qxl->u.set.shape = QXLPHYSICAL_FROM_PTR(red_replay_cursor(replay)); in red_replay_cursor_cmd()
1231 red_replay_point16_ptr(replay, &qxl->u.position); in red_replay_cursor_cmd()
1235 qxl->u.trail.length = temp; in red_replay_cursor_cmd()
1237 qxl->u.trail.frequency = temp; in red_replay_cursor_cmd()
1240 return qxl; in red_replay_cursor_cmd()
1243 static void red_replay_cursor_cmd_free(SpiceReplay *replay, QXLCursorCmd *qxl) in red_replay_cursor_cmd_free() argument
1245 if (qxl->type == QXL_CURSOR_SET) { in red_replay_cursor_cmd_free()
1246 auto cursor = (QXLCursor*) QXLPHYSICAL_TO_PTR(qxl->u.set.shape); in red_replay_cursor_cmd_free()
1250 g_free(qxl); in red_replay_cursor_cmd_free()
1402 auto qxl = (QXLDrawable*) QXLPHYSICAL_TO_PTR(cmd->cmd.data); in spice_replay_free_cmd() local
1403 red_replay_native_drawable_free(replay, qxl, cmd->flags); in spice_replay_free_cmd()
1407 auto qxl = (QXLUpdateCmd*) QXLPHYSICAL_TO_PTR(cmd->cmd.data); in spice_replay_free_cmd() local
1408 g_free(qxl); in spice_replay_free_cmd()
1412 auto qxl = (QXLSurfaceCmd*) QXLPHYSICAL_TO_PTR(cmd->cmd.data); in spice_replay_free_cmd() local
1413 red_replay_surface_cmd_free(replay, qxl); in spice_replay_free_cmd()
1417 auto qxl = (QXLCursorCmd*) QXLPHYSICAL_TO_PTR(cmd->cmd.data); in spice_replay_free_cmd() local
1418 red_replay_cursor_cmd_free(replay, qxl); in spice_replay_free_cmd()