| 1 | /* |
| 2 | * Copyright 2010 Red Hat, Inc. |
| 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | * copy of this software and associated documentation files (the "Software"), |
| 6 | * to deal in the Software without restriction, including without limitation |
| 7 | * on the rights to use, copy, modify, merge, publish, distribute, sub |
| 8 | * license, and/or sell copies of the Software, and to permit persons to whom |
| 9 | * the Software is furnished to do so, subject to the following conditions: |
| 10 | * |
| 11 | * The above copyright notice and this permission notice (including the next |
| 12 | * paragraph) shall be included in all copies or substantial portions of the |
| 13 | * Software. |
| 14 | * |
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL |
| 18 | * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
| 19 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 20 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 21 | */ |
| 22 | |
| 23 | #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:410:9`! |
| 24 | #include "config.h"cxx . . $ `<file>/config.h`/ |
| 25 | #endif |
| 26 | |
| 27 | #include "qxl.h"cxx . . $ `<file>/src/qxl.h`/ |
| 28 | #include "qxl_surface.h"cxx . . $ `<file>/src/qxl_surface.h`//* send anything pending to the other side */ |
| 29 | |
| 30 | |
| 31 | enum ROPDescriptorcxx . . $ ROPDescriptor# |
| 32 | { |
| 33 | ROPD_INVERS_SRCcxx . . $ ROPD_INVERS_SRC. = (1 << 0), |
| 34 | ROPD_INVERS_BRUSHcxx . . $ ROPD_INVERS_BRUSH. = (1 << 1), |
| 35 | ROPD_INVERS_DESTcxx . . $ ROPD_INVERS_DEST. = (1 << 2), |
| 36 | ROPD_OP_PUTcxx . . $ ROPD_OP_PUT. = (1 << 3), |
| 37 | ROPD_OP_ORcxx . . $ ROPD_OP_OR. = (1 << 4), |
| 38 | ROPD_OP_ANDcxx . . $ ROPD_OP_AND. = (1 << 5), |
| 39 | ROPD_OP_XORcxx . . $ ROPD_OP_XOR. = (1 << 6), |
| 40 | ROPD_OP_BLACKNESScxx . . $ ROPD_OP_BLACKNESS. = (1 << 7), |
| 41 | ROPD_OP_WHITENESScxx . . $ ROPD_OP_WHITENESS. = (1 << 8), |
| 42 | ROPD_OP_INVERScxx . . $ ROPD_OP_INVERS. = (1 << 9), |
| 43 | ROPD_INVERS_REScxx . . $ ROPD_INVERS_RES. = (1 <<10), |
| 44 | }; |
| 45 | |
| 46 | static struct qxl_bocxx . . $ qxl_bo# * |
| 47 | make_drawablecxx . . $ make_drawable(aca879a4b267382a). (qxl_screen_tcxx . . $ qxl_screen_t# *qxl, qxl_surface_tcxx . . $ qxl_surface_t# *surf, uint8_tcxx . . $ uint8_t# type, |
| 48 | const struct QXLRectcxx . . $ QXLRect# *rect |
| 49 | /* , pRegion clip */) |
| 50 | { |
| 51 | struct QXLDrawablecxx . . $ QXLDrawable# *drawable; |
| 52 | struct qxl_bocxx . . $ qxl_bo# *draw_bo; |
| 53 | int i; |
| 54 | |
| 55 | draw_bo = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->cmd_alloccxx . . $ qxl_bo_funcs#cmd_alloc. (qxl, sizeof *drawable, "drawable command"); |
| 56 | assertcxx . . $ `/usr/include/assert.h:118:11`!(draw_bo); |
| 57 | drawable = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_mapcxx . . $ qxl_bo_funcs#bo_map.(draw_bo); |
| 58 | assertcxx . . $ `/usr/include/assert.h:118:11`!(drawable); |
| 59 | |
| 60 | drawable->release_infocxx . . $ QXLDrawable#release_info..idcxx . . $ QXLReleaseInfo#id. = pointer_to_u64cxx . . $ pointer_to_u64(751e5d26f8574c32). (draw_bo); |
| 61 | |
| 62 | drawable->typecxx . . $ QXLDrawable#type. = type; |
| 63 | |
| 64 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_surf_reloccxx . . $ qxl_bo_funcs#bo_output_surf_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(struct QXLDrawable, surface_id), draw_bo, surf); |
| 65 | |
| 66 | drawable->effectcxx . . $ QXLDrawable#effect. = QXL_EFFECT_OPAQUEcxx . . $ QXL_EFFECT_OPAQUE.; |
| 67 | drawable->self_bitmapcxx . . $ QXLDrawable#self_bitmap. = 0; |
| 68 | drawable->self_bitmap_areacxx . . $ QXLDrawable#self_bitmap_area..topcxx . . $ QXLRect#top. = 0; |
| 69 | drawable->self_bitmap_areacxx . . $ QXLDrawable#self_bitmap_area..leftcxx . . $ QXLRect#left. = 0; |
| 70 | drawable->self_bitmap_areacxx . . $ QXLDrawable#self_bitmap_area..bottomcxx . . $ QXLRect#bottom. = 0; |
| 71 | drawable->self_bitmap_areacxx . . $ QXLDrawable#self_bitmap_area..rightcxx . . $ QXLRect#right. = 0; |
| 72 | /* FIXME: add clipping */ |
| 73 | drawable->clipcxx . . $ QXLDrawable#clip..typecxx . . $ QXLClip#type. = SPICE_CLIP_TYPE_NONEcxx . . $ SPICE_CLIP_TYPE_NONE.; |
| 74 | |
| 75 | /* |
| 76 | * surfaces_dest[i] should apparently be filled out with the |
| 77 | * surfaces that we depend on, and surface_rects should be |
| 78 | * filled with the rectangles of those surfaces that we |
| 79 | * are going to use. |
| 80 | */ |
| 81 | for (i = 0; i < 3; ++i) |
| 82 | drawable->surfaces_destcxx . . $ QXLDrawable#surfaces_dest.[i] = -1; |
| 83 | |
| 84 | if (rect) |
| 85 | drawable->bboxcxx . . $ QXLDrawable#bbox. = *rect; |
| 86 | |
| 87 | /* No longer needed since spice-server commit c541d7e29 */ |
| 88 | if (!qxl->kms_enabledcxx . . $ _qxl_screen_t#kms_enabled.) |
| 89 | drawable->mm_timecxx . . $ QXLDrawable#mm_time. = qxl->romcxx . . $ _qxl_screen_t#rom.->mm_clockcxx . . $ QXLRom#mm_clock.; |
| 90 | else |
| 91 | drawable->mm_timecxx . . $ QXLDrawable#mm_time. = 0; |
| 92 | |
| 93 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_unmapcxx . . $ qxl_bo_funcs#bo_unmap.(draw_bo); |
| 94 | return draw_bo; |
| 95 | } |
| 96 | |
| 97 | static void |
| 98 | push_drawablecxx . . $ push_drawable(cafdee6b4ac3c810). (qxl_screen_tcxx . . $ qxl_screen_t# *qxl, struct qxl_bocxx . . $ qxl_bo# *drawable_bo) |
| 99 | { |
| 100 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->write_commandcxx . . $ qxl_bo_funcs#write_command. (qxl, QXL_CMD_DRAWcxx . . $ QXL_CMD_DRAW., drawable_bo); |
| 101 | } |
| 102 | |
| 103 | static void |
| 104 | submit_fillcxx . . $ submit_fill(91681b47e0e22566). (qxl_screen_tcxx . . $ qxl_screen_t# *qxl, qxl_surface_tcxx . . $ qxl_surface_t# *surf, |
| 105 | const struct QXLRectcxx . . $ QXLRect# *rect, uint32_tcxx . . $ uint32_t# color) |
| 106 | { |
| 107 | struct qxl_bocxx . . $ qxl_bo# *drawable_bo; |
| 108 | struct QXLDrawablecxx . . $ QXLDrawable# *drawable; |
| 109 | |
| 110 | drawable_bo = make_drawablecxx . . $ make_drawable(aca879a4b267382a). (qxl, surf, QXL_DRAW_FILLcxx . . $ QXL_DRAW_FILL., rect); |
| 111 | |
| 112 | drawable = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_mapcxx . . $ qxl_bo_funcs#bo_map.(drawable_bo); |
| 113 | drawable->ucxx . . $ QXLDrawable#u..fillcxx . . $ QXLDrawable#$anonymous_type_16#fill..brushcxx . . $ QXLFill#brush..typecxx . . $ QXLBrush#type. = SPICE_BRUSH_TYPE_SOLIDcxx . . $ SPICE_BRUSH_TYPE_SOLID.; |
| 114 | drawable->ucxx . . $ QXLDrawable#u..fillcxx . . $ QXLDrawable#$anonymous_type_16#fill..brushcxx . . $ QXLFill#brush..ucxx . . $ QXLBrush#u..colorcxx . . $ QXLBrush#$anonymous_type_12#color. = color; |
| 115 | drawable->ucxx . . $ QXLDrawable#u..fillcxx . . $ QXLDrawable#$anonymous_type_16#fill..rop_descriptorcxx . . $ QXLFill#rop_descriptor. = ROPD_OP_PUTcxx . . $ ROPD_OP_PUT.; |
| 116 | drawable->ucxx . . $ QXLDrawable#u..fillcxx . . $ QXLDrawable#$anonymous_type_16#fill..maskcxx . . $ QXLFill#mask..flagscxx . . $ QXLQMask#flags. = 0; |
| 117 | drawable->ucxx . . $ QXLDrawable#u..fillcxx . . $ QXLDrawable#$anonymous_type_16#fill..maskcxx . . $ QXLFill#mask..poscxx . . $ QXLQMask#pos..xcxx . . $ QXLPoint#x. = 0; |
| 118 | drawable->ucxx . . $ QXLDrawable#u..fillcxx . . $ QXLDrawable#$anonymous_type_16#fill..maskcxx . . $ QXLFill#mask..poscxx . . $ QXLQMask#pos..ycxx . . $ QXLPoint#y. = 0; |
| 119 | drawable->ucxx . . $ QXLDrawable#u..fillcxx . . $ QXLDrawable#$anonymous_type_16#fill..maskcxx . . $ QXLFill#mask..bitmapcxx . . $ QXLQMask#bitmap. = 0; |
| 120 | |
| 121 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_unmapcxx . . $ qxl_bo_funcs#bo_unmap.(drawable_bo); |
| 122 | |
| 123 | push_drawablecxx . . $ push_drawable(cafdee6b4ac3c810). (qxl, drawable_bo); |
| 124 | } |
| 125 | |
| 126 | void |
| 127 | qxl_surface_flushcxx . . $ qxl_surface_flush(4a42921aa764193e). (qxl_surface_tcxx . . $ qxl_surface_t# *surface) |
| 128 | { |
| 129 | ; |
| 130 | } |
| 131 | |
| 132 | /* access */ |
| 133 | static void |
| 134 | download_box_no_updatecxx . . $ download_box_no_update(9ef2abdac6f61c07). (qxl_surface_tcxx . . $ qxl_surface_t# *surface, int x1, int y1, int x2, int y2) |
| 135 | { |
| 136 | pixman_image_compositecxx . . $ pixman_image_composite(191c842ee49e5cd7). (PIXMAN_OP_SRCcxx . . $ PIXMAN_OP_SRC., |
| 137 | surface->dev_imagecxx . . $ qxl_surface_t#dev_image., |
| 138 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 139 | surface->host_imagecxx . . $ qxl_surface_t#host_image., |
| 140 | x1, y1, 0, 0, x1, y1, x2 - x1, y2 - y1); |
| 141 | } |
| 142 | |
| 143 | void |
| 144 | qxl_download_boxcxx . . $ qxl_download_box(9ef2abdac6f61c07). (qxl_surface_tcxx . . $ qxl_surface_t# *surface, int x1, int y1, int x2, int y2) |
| 145 | { |
| 146 | assertcxx . . $ `/usr/include/assert.h:118:11`! (x2 >= x1 && y2 >= y1); |
| 147 | |
| 148 | if (x1 == x2 || y1 == y2) |
| 149 | return; |
| 150 | |
| 151 | surface->qxlcxx . . $ qxl_surface_t#qxl.->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->update_areacxx . . $ qxl_bo_funcs#update_area.(surface, x1, y1, x2, y2); |
| 152 | |
| 153 | download_box_no_updatecxx . . $ download_box_no_update(9ef2abdac6f61c07).(surface, x1, y1, x2, y2); |
| 154 | } |
| 155 | |
| 156 | Boolcxx . . $ Bool# |
| 157 | qxl_surface_prepare_accesscxx . . $ qxl_surface_prepare_access(9d8b7aaf8fd246e6). (qxl_surface_tcxx . . $ qxl_surface_t# *surface, |
| 158 | PixmapPtrcxx . . $ PixmapPtr# pixmap, |
| 159 | RegionPtrcxx . . $ RegionPtr# region, |
| 160 | uxa_access_tcxx . . $ uxa_access_t# access) |
| 161 | { |
| 162 | int n_boxes; |
| 163 | BoxPtrcxx . . $ BoxPtr# boxes; |
| 164 | ScreenPtrcxx . . $ ScreenPtr# pScreen = pixmap->drawablecxx . . $ _Pixmap#drawable..pScreencxx . . $ _Drawable#pScreen.; |
| 165 | ScrnInfoPtrcxx . . $ ScrnInfoPtr# pScrn = xf86ScreenToScrncxx . . $ xf86ScreenToScrn(9f15ec202845c37c).(pScreen); |
| 166 | RegionReccxx . . $ RegionRec# new; |
| 167 | |
| 168 | if (!pScrn->vtSemacxx . . $ _ScrnInfoRec#vtSema.) |
| 169 | return FALSEcxx . . $ `<external>/6164077692963123767/macros.h:106:9`!; |
| 170 | |
| 171 | REGION_INITcxx . . $ `<external>/14128946855725894503/regionstr.h:370:9`! (NULL, &new, (BoxPtr)NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 0); |
| 172 | REGION_SUBTRACTcxx . . $ `<external>/14128946855725894503/regionstr.h:360:9`! (NULL, &new, region, &surface->access_region); |
| 173 | |
| 174 | if (access == UXA_ACCESS_RWcxx . . $ UXA_ACCESS_RW.) |
| 175 | surface->access_typecxx . . $ qxl_surface_t#access_type. = UXA_ACCESS_RWcxx . . $ UXA_ACCESS_RW.; |
| 176 | |
| 177 | region = &new; |
| 178 | |
| 179 | n_boxes = REGION_NUM_RECTScxx . . $ `<external>/14128946855725894503/regionstr.h:346:9`! (region); |
| 180 | boxes = REGION_RECTScxx . . $ `<external>/14128946855725894503/regionstr.h:348:9`! (region); |
| 181 | |
| 182 | if (n_boxes < 25) |
| 183 | { |
| 184 | while (n_boxes--) |
| 185 | { |
| 186 | qxl_download_boxcxx . . $ qxl_download_box(9ef2abdac6f61c07). (surface, boxes->x1cxx . . $ pixman_box16#x1., boxes->y1cxx . . $ pixman_box16#y1., boxes->x2cxx . . $ pixman_box16#x2., boxes->y2cxx . . $ pixman_box16#y2.); |
| 187 | |
| 188 | boxes++; |
| 189 | } |
| 190 | } |
| 191 | else |
| 192 | { |
| 193 | qxl_download_boxcxx . . $ qxl_download_box(9ef2abdac6f61c07). ( |
| 194 | surface, |
| 195 | new.extentscxx . . $ pixman_region16#extents..x1cxx . . $ pixman_box16#x1., new.extentscxx . . $ pixman_region16#extents..y1cxx . . $ pixman_box16#y1., new.extentscxx . . $ pixman_region16#extents..x2cxx . . $ pixman_box16#x2., new.extentscxx . . $ pixman_region16#extents..y2cxx . . $ pixman_box16#y2.); |
| 196 | } |
| 197 | |
| 198 | REGION_UNIONcxx . . $ `<external>/14128946855725894503/regionstr.h:359:9`! (pScreen, |
| 199 | &(surface->access_region), |
| 200 | &(surface->access_region), |
| 201 | region); |
| 202 | |
| 203 | REGION_UNINITcxx . . $ `<external>/14128946855725894503/regionstr.h:371:9`! (NULL, &new); |
| 204 | |
| 205 | pScreen->ModifyPixmapHeadercxx . . $ _Screen#ModifyPixmapHeader.( |
| 206 | pixmap, |
| 207 | pixmap->drawablecxx . . $ _Pixmap#drawable..widthcxx . . $ _Drawable#width., |
| 208 | pixmap->drawablecxx . . $ _Pixmap#drawable..heightcxx . . $ _Drawable#height., |
| 209 | -1, -1, -1, |
| 210 | pixman_image_get_datacxx . . $ pixman_image_get_data(d654764b2964478d). (surface->host_imagecxx . . $ qxl_surface_t#host_image.)); |
| 211 | |
| 212 | pixmap->devKindcxx . . $ _Pixmap#devKind. = pixman_image_get_stridecxx . . $ pixman_image_get_stride(1233b5bf7ad32299). (surface->host_imagecxx . . $ qxl_surface_t#host_image.); |
| 213 | |
| 214 | return TRUEcxx . . $ `<external>/6164077692963123767/macros.h:110:9`!; |
| 215 | } |
| 216 | |
| 217 | static void |
| 218 | translate_rectcxx . . $ translate_rect(e7b690548df70f83). (struct QXLRectcxx . . $ QXLRect# *rect) |
| 219 | { |
| 220 | rect->rightcxx . . $ QXLRect#right. -= rect->leftcxx . . $ QXLRect#left.; |
| 221 | rect->bottomcxx . . $ QXLRect#bottom. -= rect->topcxx . . $ QXLRect#top.; |
| 222 | rect->leftcxx . . $ QXLRect#left. = rect->topcxx . . $ QXLRect#top. = 0; |
| 223 | } |
| 224 | |
| 225 | static void |
| 226 | real_upload_boxcxx . . $ real_upload_box(9ef2abdac6f61c07). (qxl_surface_tcxx . . $ qxl_surface_t# *surface, int x1, int y1, int x2, int y2) |
| 227 | { |
| 228 | struct QXLRectcxx . . $ QXLRect# rect; |
| 229 | struct QXLDrawablecxx . . $ QXLDrawable# *drawable; |
| 230 | struct qxl_bocxx . . $ qxl_bo# *image_bo, *drawable_bo; |
| 231 | qxl_screen_tcxx . . $ qxl_screen_t# *qxl = surface->qxlcxx . . $ qxl_surface_t#qxl.; |
| 232 | uint32_tcxx . . $ uint32_t# *data; |
| 233 | int stride; |
| 234 | |
| 235 | rect.leftcxx . . $ QXLRect#left. = x1; |
| 236 | rect.rightcxx . . $ QXLRect#right. = x2; |
| 237 | rect.topcxx . . $ QXLRect#top. = y1; |
| 238 | rect.bottomcxx . . $ QXLRect#bottom. = y2; |
| 239 | |
| 240 | drawable_bo = make_drawablecxx . . $ make_drawable(aca879a4b267382a). (qxl, surface, QXL_DRAW_COPYcxx . . $ QXL_DRAW_COPY., &rect); |
| 241 | drawable = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_mapcxx . . $ qxl_bo_funcs#bo_map.(drawable_bo); |
| 242 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area. = rect; |
| 243 | translate_rectcxx . . $ translate_rect(e7b690548df70f83). (&drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area.); |
| 244 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..rop_descriptorcxx . . $ QXLCopy#rop_descriptor. = ROPD_OP_PUTcxx . . $ ROPD_OP_PUT.; |
| 245 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..scale_modecxx . . $ QXLCopy#scale_mode. = 0; |
| 246 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..flagscxx . . $ QXLQMask#flags. = 0; |
| 247 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..poscxx . . $ QXLQMask#pos..xcxx . . $ QXLPoint#x. = 0; |
| 248 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..poscxx . . $ QXLQMask#pos..ycxx . . $ QXLPoint#y. = 0; |
| 249 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..bitmapcxx . . $ QXLQMask#bitmap. = 0; |
| 250 | |
| 251 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_unmapcxx . . $ qxl_bo_funcs#bo_unmap.(drawable_bo); |
| 252 | |
| 253 | data = pixman_image_get_datacxx . . $ pixman_image_get_data(d654764b2964478d). (surface->host_imagecxx . . $ qxl_surface_t#host_image.); |
| 254 | stride = pixman_image_get_stridecxx . . $ pixman_image_get_stride(1233b5bf7ad32299). (surface->host_imagecxx . . $ qxl_surface_t#host_image.); |
| 255 | |
| 256 | image_bo = qxl_image_createcxx . . $ qxl_image_create(6d1611a996a53b34). ( |
| 257 | qxl, (const uint8_tcxx . . $ uint8_t# *)data, x1, y1, x2 - x1, y2 - y1, stride, |
| 258 | surface->bppcxx . . $ qxl_surface_t#bpp. == 24 ? 4 : surface->bppcxx . . $ qxl_surface_t#bpp. / 8, TRUEcxx . . $ `<external>/6164077692963123767/macros.h:110:9`!); |
| 259 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_bo_reloccxx . . $ qxl_bo_funcs#bo_output_bo_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(QXLDrawable, u.copy.src_bitmap), |
| 260 | drawable_bo, image_bo); |
| 261 | push_drawablecxx . . $ push_drawable(cafdee6b4ac3c810). (qxl, drawable_bo); |
| 262 | |
| 263 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_decrefcxx . . $ qxl_bo_funcs#bo_decref.(qxl, image_bo); |
| 264 | } |
| 265 | |
| 266 | #define TILE_WIDTHcxx . . $ `src/qxl_surface.c:266:9`! 512 |
| 267 | #define TILE_HEIGHTcxx . . $ `src/qxl_surface.c:267:9`! 512 |
| 268 | |
| 269 | void |
| 270 | qxl_upload_boxcxx . . $ qxl_upload_box(9ef2abdac6f61c07). (qxl_surface_tcxx . . $ qxl_surface_t# *surface, int x1, int y1, int x2, int y2) |
| 271 | { |
| 272 | int tile_x1, tile_y1; |
| 273 | |
| 274 | for (tile_y1 = y1; tile_y1 < y2; tile_y1 += TILE_HEIGHTcxx . . $ `src/qxl_surface.c:267:9`!) |
| 275 | { |
| 276 | for (tile_x1 = x1; tile_x1 < x2; tile_x1 += TILE_WIDTHcxx . . $ `src/qxl_surface.c:266:9`!) |
| 277 | { |
| 278 | int tile_x2 = tile_x1 + TILE_WIDTHcxx . . $ `src/qxl_surface.c:266:9`!; |
| 279 | int tile_y2 = tile_y1 + TILE_HEIGHTcxx . . $ `src/qxl_surface.c:267:9`!; |
| 280 | |
| 281 | if (tile_x2 > x2) |
| 282 | tile_x2 = x2; |
| 283 | if (tile_y2 > y2) |
| 284 | tile_y2 = y2; |
| 285 | |
| 286 | real_upload_boxcxx . . $ real_upload_box(9ef2abdac6f61c07). (surface, tile_x1, tile_y1, tile_x2, tile_y2); |
| 287 | } |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | static void |
| 292 | upload_one_primary_regioncxx . . $ upload_one_primary_region(6d9201cc9ca1e54e).(qxl_screen_tcxx . . $ qxl_screen_t# *qxl, PixmapPtrcxx . . $ PixmapPtr# pixmap, BoxPtrcxx . . $ BoxPtr# b) |
| 293 | { |
| 294 | struct QXLRectcxx . . $ QXLRect# rect; |
| 295 | struct qxl_bocxx . . $ qxl_bo# *drawable_bo, *image_bo; |
| 296 | struct QXLDrawablecxx . . $ QXLDrawable# *drawable; |
| 297 | FbBitscxx . . $ FbBits# *data; |
| 298 | int stride; |
| 299 | int bpp; |
| 300 | |
| 301 | if (b->x1cxx . . $ pixman_box16#x1. >= qxl->virtual_xcxx . . $ _qxl_screen_t#virtual_x. || b->y1cxx . . $ pixman_box16#y1. >= qxl->virtual_ycxx . . $ _qxl_screen_t#virtual_y.) |
| 302 | return; |
| 303 | |
| 304 | rect.leftcxx . . $ QXLRect#left. = b->x1cxx . . $ pixman_box16#x1.; |
| 305 | rect.rightcxx . . $ QXLRect#right. = mincxx . . $ `<external>/18388808314464358495/misc.h:136:9`!(b->x2, qxl->virtual_x); |
| 306 | rect.topcxx . . $ QXLRect#top. = b->y1cxx . . $ pixman_box16#y1.; |
| 307 | rect.bottomcxx . . $ QXLRect#bottom. = mincxx . . $ `<external>/18388808314464358495/misc.h:136:9`!(b->y2, qxl->virtual_y); |
| 308 | |
| 309 | drawable_bo = make_drawablecxx . . $ make_drawable(aca879a4b267382a). (qxl, qxl->primarycxx . . $ _qxl_screen_t#primary., QXL_DRAW_COPYcxx . . $ QXL_DRAW_COPY., &rect); |
| 310 | drawable = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_mapcxx . . $ qxl_bo_funcs#bo_map.(drawable_bo); |
| 311 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area. = rect; |
| 312 | translate_rectcxx . . $ translate_rect(e7b690548df70f83). (&drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area.); |
| 313 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..rop_descriptorcxx . . $ QXLCopy#rop_descriptor. = ROPD_OP_PUTcxx . . $ ROPD_OP_PUT.; |
| 314 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..scale_modecxx . . $ QXLCopy#scale_mode. = 0; |
| 315 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..flagscxx . . $ QXLQMask#flags. = 0; |
| 316 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..poscxx . . $ QXLQMask#pos..xcxx . . $ QXLPoint#x. = 0; |
| 317 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..poscxx . . $ QXLQMask#pos..ycxx . . $ QXLPoint#y. = 0; |
| 318 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..bitmapcxx . . $ QXLQMask#bitmap. = 0; |
| 319 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_unmapcxx . . $ qxl_bo_funcs#bo_unmap.(drawable_bo); |
| 320 | |
| 321 | fbGetPixmapBitsDatacxx . . $ `<external>/469613206824382343/fb.h:467:9`!(pixmap, data, stride, bpp); |
| 322 | image_bo = qxl_image_createcxx . . $ qxl_image_create(6d1611a996a53b34). ( |
| 323 | qxl, (const uint8_tcxx . . $ uint8_t# *)data, rect.leftcxx . . $ QXLRect#left., rect.topcxx . . $ QXLRect#top., rect.rightcxx . . $ QXLRect#right. - rect.leftcxx . . $ QXLRect#left., rect.bottomcxx . . $ QXLRect#bottom. - rect.topcxx . . $ QXLRect#top., stride * sizeof(*data), |
| 324 | bpp == 24 ? 4 : bpp / 8, TRUEcxx . . $ `<external>/6164077692963123767/macros.h:110:9`!); |
| 325 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_bo_reloccxx . . $ qxl_bo_funcs#bo_output_bo_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(QXLDrawable, u.copy.src_bitmap), |
| 326 | drawable_bo, image_bo); |
| 327 | |
| 328 | push_drawablecxx . . $ push_drawable(cafdee6b4ac3c810). (qxl, drawable_bo); |
| 329 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_decrefcxx . . $ qxl_bo_funcs#bo_decref.(qxl, image_bo); |
| 330 | } |
| 331 | |
| 332 | void |
| 333 | qxl_surface_upload_primary_regionscxx . . $ qxl_surface_upload_primary_regions(4b1fc4a9f889002a).(qxl_screen_tcxx . . $ qxl_screen_t# *qxl, PixmapPtrcxx . . $ PixmapPtr# pixmap, RegionReccxx . . $ RegionRec# *r) |
| 334 | { |
| 335 | int n_boxes; |
| 336 | BoxPtrcxx . . $ BoxPtr# boxes; |
| 337 | |
| 338 | n_boxes = RegionNumRectscxx . . $ RegionNumRects(962b0f5c995f9297).(r); |
| 339 | boxes = RegionRectscxx . . $ RegionRects(1fec39518143ba42).(r); |
| 340 | |
| 341 | while (n_boxes--) |
| 342 | { |
| 343 | upload_one_primary_regioncxx . . $ upload_one_primary_region(6d9201cc9ca1e54e).(qxl, pixmap, boxes); |
| 344 | boxes++; |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | void |
| 349 | qxl_surface_finish_accesscxx . . $ qxl_surface_finish_access(f9afd3abba16c60f). (qxl_surface_tcxx . . $ qxl_surface_t# *surface, PixmapPtrcxx . . $ PixmapPtr# pixmap) |
| 350 | { |
| 351 | ScreenPtrcxx . . $ ScreenPtr# pScreen = pixmap->drawablecxx . . $ _Pixmap#drawable..pScreencxx . . $ _Drawable#pScreen.; |
| 352 | int w = pixmap->drawablecxx . . $ _Pixmap#drawable..widthcxx . . $ _Drawable#width.; |
| 353 | int h = pixmap->drawablecxx . . $ _Pixmap#drawable..heightcxx . . $ _Drawable#height.; |
| 354 | int n_boxes; |
| 355 | BoxPtrcxx . . $ BoxPtr# boxes; |
| 356 | |
| 357 | n_boxes = REGION_NUM_RECTScxx . . $ `<external>/14128946855725894503/regionstr.h:346:9`! (&surface->access_regioncxx . . $ qxl_surface_t#access_region.); |
| 358 | boxes = REGION_RECTScxx . . $ `<external>/14128946855725894503/regionstr.h:348:9`! (&surface->access_regioncxx . . $ qxl_surface_t#access_region.); |
| 359 | |
| 360 | if (surface->access_typecxx . . $ qxl_surface_t#access_type. == UXA_ACCESS_RWcxx . . $ UXA_ACCESS_RW.) |
| 361 | { |
| 362 | if (n_boxes < 25) |
| 363 | { |
| 364 | while (n_boxes--) |
| 365 | { |
| 366 | qxl_upload_boxcxx . . $ qxl_upload_box(9ef2abdac6f61c07). (surface, boxes->x1cxx . . $ pixman_box16#x1., boxes->y1cxx . . $ pixman_box16#y1., boxes->x2cxx . . $ pixman_box16#x2., boxes->y2cxx . . $ pixman_box16#y2.); |
| 367 | |
| 368 | boxes++; |
| 369 | } |
| 370 | } |
| 371 | else |
| 372 | { |
| 373 | qxl_upload_boxcxx . . $ qxl_upload_box(9ef2abdac6f61c07). (surface, |
| 374 | surface->access_regioncxx . . $ qxl_surface_t#access_region..extentscxx . . $ pixman_region16#extents..x1cxx . . $ pixman_box16#x1., |
| 375 | surface->access_regioncxx . . $ qxl_surface_t#access_region..extentscxx . . $ pixman_region16#extents..y1cxx . . $ pixman_box16#y1., |
| 376 | surface->access_regioncxx . . $ qxl_surface_t#access_region..extentscxx . . $ pixman_region16#extents..x2cxx . . $ pixman_box16#x2., |
| 377 | surface->access_regioncxx . . $ qxl_surface_t#access_region..extentscxx . . $ pixman_region16#extents..y2cxx . . $ pixman_box16#y2.); |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | REGION_EMPTYcxx . . $ `<external>/14128946855725894503/regionstr.h:375:9`! (pScreen, &surface->access_region); |
| 382 | surface->access_typecxx . . $ qxl_surface_t#access_type. = UXA_ACCESS_ROcxx . . $ UXA_ACCESS_RO.; |
| 383 | |
| 384 | pScreen->ModifyPixmapHeadercxx . . $ _Screen#ModifyPixmapHeader.(pixmap, w, h, -1, -1, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 385 | } |
| 386 | |
| 387 | |
| 388 | #ifdef DEBUG_REGIONS |
| 389 | static void |
| 390 | print_region (const char *header, RegionPtr pRegion) |
| 391 | { |
| 392 | int nbox = REGION_NUM_RECTS (pRegion); |
| 393 | BoxPtr pbox = REGION_RECTS (pRegion); |
| 394 | |
| 395 | ErrorF ("%s", header); |
| 396 | |
| 397 | if (nbox == 0) |
| 398 | ErrorF (" (empty)\n"); |
| 399 | else |
| 400 | ErrorF ("\n"); |
| 401 | |
| 402 | while (nbox--) |
| 403 | { |
| 404 | ErrorF (" %d %d %d %d (size: %d %d)\n", |
| 405 | pbox->x1, pbox->y1, pbox->x2, pbox->y2, |
| 406 | pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); |
| 407 | |
| 408 | pbox++; |
| 409 | } |
| 410 | } |
| 411 | #endif // DEBUG_REGIONS |
| 412 | |
| 413 | /* solid */ |
| 414 | Boolcxx . . $ Bool# |
| 415 | qxl_surface_prepare_solidcxx . . $ qxl_surface_prepare_solid(1469a1158a9faa42). (qxl_surface_tcxx . . $ qxl_surface_t# *destination, |
| 416 | Pixelcxx . . $ Pixel# fg) |
| 417 | { |
| 418 | if (!REGION_NILcxx . . $ `<external>/14128946855725894503/regionstr.h:344:9`! (&(destination->access_regioncxx . . $ qxl_surface_t#access_region.))) |
| 419 | { |
| 420 | ErrorFcxx . . $ ErrorF(326aeb464d16410c). (" solid not in vmem\n"); |
| 421 | } |
| 422 | |
| 423 | #ifdef DEBUG_REGIONS |
| 424 | print_region ("prepare solid", &(destination->access_region)); |
| 425 | #endif |
| 426 | |
| 427 | destination->ucxx . . $ qxl_surface_t#u..solid_pixelcxx . . $ qxl_surface_t#$anonymous_type_0#solid_pixel. = fg; // ^ (rand() >> 16); |
| 428 | |
| 429 | return TRUEcxx . . $ `<external>/6164077692963123767/macros.h:110:9`!; |
| 430 | } |
| 431 | |
| 432 | void |
| 433 | qxl_surface_solidcxx . . $ qxl_surface_solid(9ef2abdac6f61c07). (qxl_surface_tcxx . . $ qxl_surface_t# *destination, |
| 434 | int x1, |
| 435 | int y1, |
| 436 | int x2, |
| 437 | int y2) |
| 438 | { |
| 439 | qxl_screen_tcxx . . $ qxl_screen_t# *qxl = destination->qxlcxx . . $ qxl_surface_t#qxl.; |
| 440 | struct QXLRectcxx . . $ QXLRect# qrect; |
| 441 | uint32_tcxx . . $ uint32_t# p; |
| 442 | |
| 443 | qrect.topcxx . . $ QXLRect#top. = y1; |
| 444 | qrect.bottomcxx . . $ QXLRect#bottom. = y2; |
| 445 | qrect.leftcxx . . $ QXLRect#left. = x1; |
| 446 | qrect.rightcxx . . $ QXLRect#right. = x2; |
| 447 | |
| 448 | p = destination->ucxx . . $ qxl_surface_t#u..solid_pixelcxx . . $ qxl_surface_t#$anonymous_type_0#solid_pixel.; |
| 449 | |
| 450 | submit_fillcxx . . $ submit_fill(91681b47e0e22566). (qxl, destination, &qrect, p); |
| 451 | } |
| 452 | |
| 453 | /* copy */ |
| 454 | Boolcxx . . $ Bool# |
| 455 | qxl_surface_prepare_copycxx . . $ qxl_surface_prepare_copy(fb89c7dbc2a9e710). (qxl_surface_tcxx . . $ qxl_surface_t# *dest, |
| 456 | qxl_surface_tcxx . . $ qxl_surface_t# *source) |
| 457 | { |
| 458 | if (!REGION_NILcxx . . $ `<external>/14128946855725894503/regionstr.h:344:9`! (&(dest->access_regioncxx . . $ qxl_surface_t#access_region.)) || |
| 459 | !REGION_NILcxx . . $ `<external>/14128946855725894503/regionstr.h:344:9`! (&(source->access_regioncxx . . $ qxl_surface_t#access_region.))) |
| 460 | { |
| 461 | return FALSEcxx . . $ `<external>/6164077692963123767/macros.h:106:9`!; |
| 462 | } |
| 463 | |
| 464 | dest->ucxx . . $ qxl_surface_t#u..copy_srccxx . . $ qxl_surface_t#$anonymous_type_0#copy_src. = source; |
| 465 | |
| 466 | return TRUEcxx . . $ `<external>/6164077692963123767/macros.h:110:9`!; |
| 467 | } |
| 468 | |
| 469 | |
| 470 | static struct qxl_bocxx . . $ qxl_bo# * |
| 471 | image_from_surface_internalcxx . . $ image_from_surface_internal(4a49dc3e6b444714).(qxl_screen_tcxx . . $ qxl_screen_t# *qxl, |
| 472 | qxl_surface_tcxx . . $ qxl_surface_t# *surface) |
| 473 | { |
| 474 | struct qxl_bocxx . . $ qxl_bo# *image_bo = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_alloccxx . . $ qxl_bo_funcs#bo_alloc. (qxl, sizeof(struct QXLImagecxx . . $ QXLImage#), "image struct for surface"); |
| 475 | struct QXLImagecxx . . $ QXLImage# *image = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_mapcxx . . $ qxl_bo_funcs#bo_map.(image_bo); |
| 476 | |
| 477 | image->descriptorcxx . . $ QXLImage#descriptor..idcxx . . $ QXLImageDescriptor#id. = 0; |
| 478 | image->descriptorcxx . . $ QXLImage#descriptor..typecxx . . $ QXLImageDescriptor#type. = SPICE_IMAGE_TYPE_SURFACEcxx . . $ SPICE_IMAGE_TYPE_SURFACE.; |
| 479 | image->descriptorcxx . . $ QXLImage#descriptor..widthcxx . . $ QXLImageDescriptor#width. = 0; |
| 480 | image->descriptorcxx . . $ QXLImage#descriptor..heightcxx . . $ QXLImageDescriptor#height. = 0; |
| 481 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_unmapcxx . . $ qxl_bo_funcs#bo_unmap.(image_bo); |
| 482 | return image_bo; |
| 483 | } |
| 484 | |
| 485 | static struct qxl_bocxx . . $ qxl_bo# *image_from_surfacecxx . . $ image_from_surface(4a49dc3e6b444714).(qxl_screen_tcxx . . $ qxl_screen_t# *qxl, qxl_surface_tcxx . . $ qxl_surface_t# *dest) |
| 486 | { |
| 487 | if (!dest->image_bocxx . . $ qxl_surface_t#image_bo.) |
| 488 | dest->image_bocxx . . $ qxl_surface_t#image_bo. = image_from_surface_internalcxx . . $ image_from_surface_internal(4a49dc3e6b444714).(qxl, dest); |
| 489 | |
| 490 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_increfcxx . . $ qxl_bo_funcs#bo_incref.(qxl, dest->image_bocxx . . $ qxl_surface_t#image_bo.); |
| 491 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_surf_reloccxx . . $ qxl_bo_funcs#bo_output_surf_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(struct QXLImage, surface_image.surface_id), dest->image_bocxx . . $ qxl_surface_t#image_bo., dest); |
| 492 | |
| 493 | return dest->image_bocxx . . $ qxl_surface_t#image_bo.; |
| 494 | } |
| 495 | |
| 496 | void |
| 497 | qxl_surface_copycxx . . $ qxl_surface_copy(5aa5100d1877ef8b). (qxl_surface_tcxx . . $ qxl_surface_t# *dest, |
| 498 | int src_x1, int src_y1, |
| 499 | int dest_x1, int dest_y1, |
| 500 | int width, int height) |
| 501 | { |
| 502 | qxl_screen_tcxx . . $ qxl_screen_t# *qxl = dest->qxlcxx . . $ qxl_surface_t#qxl.; |
| 503 | struct qxl_bocxx . . $ qxl_bo# *drawable_bo; |
| 504 | struct QXLDrawablecxx . . $ QXLDrawable# *drawable; |
| 505 | struct QXLRectcxx . . $ QXLRect# qrect; |
| 506 | |
| 507 | #ifdef DEBUG_REGIONS |
| 508 | print_region (" copy src", &(dest->u.copy_src->access_region)); |
| 509 | print_region (" copy dest", &(dest->access_region)); |
| 510 | #endif |
| 511 | |
| 512 | qrect.topcxx . . $ QXLRect#top. = dest_y1; |
| 513 | qrect.bottomcxx . . $ QXLRect#bottom. = dest_y1 + height; |
| 514 | qrect.leftcxx . . $ QXLRect#left. = dest_x1; |
| 515 | qrect.rightcxx . . $ QXLRect#right. = dest_x1 + width; |
| 516 | |
| 517 | if (dest->idcxx . . $ qxl_surface_t#id. == dest->ucxx . . $ qxl_surface_t#u..copy_srccxx . . $ qxl_surface_t#$anonymous_type_0#copy_src.->idcxx . . $ qxl_surface_t#id.) |
| 518 | { |
| 519 | drawable_bo = make_drawablecxx . . $ make_drawable(aca879a4b267382a). (qxl, dest, QXL_COPY_BITScxx . . $ QXL_COPY_BITS., &qrect); |
| 520 | |
| 521 | drawable = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_mapcxx . . $ qxl_bo_funcs#bo_map.(drawable_bo); |
| 522 | drawable->ucxx . . $ QXLDrawable#u..copy_bitscxx . . $ QXLDrawable#$anonymous_type_16#copy_bits..src_poscxx . . $ QXLCopyBits#src_pos..xcxx . . $ QXLPoint#x. = src_x1; |
| 523 | drawable->ucxx . . $ QXLDrawable#u..copy_bitscxx . . $ QXLDrawable#$anonymous_type_16#copy_bits..src_poscxx . . $ QXLCopyBits#src_pos..ycxx . . $ QXLPoint#y. = src_y1; |
| 524 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_unmapcxx . . $ qxl_bo_funcs#bo_unmap.(drawable_bo); |
| 525 | |
| 526 | push_drawablecxx . . $ push_drawable(cafdee6b4ac3c810). (qxl, drawable_bo); |
| 527 | |
| 528 | } |
| 529 | else |
| 530 | { |
| 531 | struct qxl_bocxx . . $ qxl_bo# *image_bo; |
| 532 | |
| 533 | dest->ucxx . . $ qxl_surface_t#u..copy_srccxx . . $ qxl_surface_t#$anonymous_type_0#copy_src.->ref_countcxx . . $ qxl_surface_t#ref_count.++; |
| 534 | |
| 535 | image_bo = image_from_surfacecxx . . $ image_from_surface(4a49dc3e6b444714).(qxl, dest->ucxx . . $ qxl_surface_t#u..copy_srccxx . . $ qxl_surface_t#$anonymous_type_0#copy_src.); |
| 536 | |
| 537 | drawable_bo = make_drawablecxx . . $ make_drawable(aca879a4b267382a). (qxl, dest, QXL_DRAW_COPYcxx . . $ QXL_DRAW_COPY., &qrect); |
| 538 | |
| 539 | drawable = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_mapcxx . . $ qxl_bo_funcs#bo_map.(drawable_bo); |
| 540 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_bo_reloccxx . . $ qxl_bo_funcs#bo_output_bo_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(QXLDrawable, u.copy.src_bitmap), |
| 541 | drawable_bo, image_bo); |
| 542 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area..leftcxx . . $ QXLRect#left. = src_x1; |
| 543 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area..topcxx . . $ QXLRect#top. = src_y1; |
| 544 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area..rightcxx . . $ QXLRect#right. = src_x1 + width; |
| 545 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area..bottomcxx . . $ QXLRect#bottom. = src_y1 + height; |
| 546 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..rop_descriptorcxx . . $ QXLCopy#rop_descriptor. = ROPD_OP_PUTcxx . . $ ROPD_OP_PUT.; |
| 547 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..scale_modecxx . . $ QXLCopy#scale_mode. = 0; |
| 548 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..flagscxx . . $ QXLQMask#flags. = 0; |
| 549 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..poscxx . . $ QXLQMask#pos..xcxx . . $ QXLPoint#x. = 0; |
| 550 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..poscxx . . $ QXLQMask#pos..ycxx . . $ QXLPoint#y. = 0; |
| 551 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..bitmapcxx . . $ QXLQMask#bitmap. = 0; |
| 552 | |
| 553 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_surf_reloccxx . . $ qxl_bo_funcs#bo_output_surf_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(struct QXLDrawable, surfaces_dest[0]), drawable_bo, dest->ucxx . . $ qxl_surface_t#u..copy_srccxx . . $ qxl_surface_t#$anonymous_type_0#copy_src.); |
| 554 | drawable->surfaces_rectscxx . . $ QXLDrawable#surfaces_rects.[0] = drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area.; |
| 555 | |
| 556 | assertcxx . . $ `/usr/include/assert.h:118:11`! (src_x1 >= 0); |
| 557 | assertcxx . . $ `/usr/include/assert.h:118:11`! (src_y1 >= 0); |
| 558 | |
| 559 | if (width > pixman_image_get_widthcxx . . $ pixman_image_get_width(1233b5bf7ad32299). (dest->ucxx . . $ qxl_surface_t#u..copy_srccxx . . $ qxl_surface_t#$anonymous_type_0#copy_src.->host_imagecxx . . $ qxl_surface_t#host_image.)) |
| 560 | { |
| 561 | ErrorFcxx . . $ ErrorF(326aeb464d16410c). ("dest w: %d src w: %d\n", |
| 562 | width, pixman_image_get_widthcxx . . $ pixman_image_get_width(1233b5bf7ad32299). (dest->ucxx . . $ qxl_surface_t#u..copy_srccxx . . $ qxl_surface_t#$anonymous_type_0#copy_src.->host_imagecxx . . $ qxl_surface_t#host_image.)); |
| 563 | } |
| 564 | |
| 565 | assertcxx . . $ `/usr/include/assert.h:118:11`! (width <= pixman_image_get_width (dest->u.copy_src->host_image)); |
| 566 | assertcxx . . $ `/usr/include/assert.h:118:11`! (height <= pixman_image_get_height (dest->u.copy_src->host_image)); |
| 567 | |
| 568 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_unmapcxx . . $ qxl_bo_funcs#bo_unmap.(drawable_bo); |
| 569 | push_drawablecxx . . $ push_drawable(cafdee6b4ac3c810). (qxl, drawable_bo); |
| 570 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_decrefcxx . . $ qxl_bo_funcs#bo_decref.(qxl, image_bo); |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | /* composite */ |
| 575 | Boolcxx . . $ Bool# |
| 576 | qxl_surface_prepare_compositecxx . . $ qxl_surface_prepare_composite(166656b68cf6e033). (int op, |
| 577 | PicturePtrcxx . . $ PicturePtr# src_picture, |
| 578 | PicturePtrcxx . . $ PicturePtr# mask_picture, |
| 579 | PicturePtrcxx . . $ PicturePtr# dest_picture, |
| 580 | qxl_surface_tcxx . . $ qxl_surface_t# * src, |
| 581 | qxl_surface_tcxx . . $ qxl_surface_t# * mask, |
| 582 | qxl_surface_tcxx . . $ qxl_surface_t# * dest) |
| 583 | { |
| 584 | dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..opcxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#op. = op; |
| 585 | dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..src_picturecxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#src_picture. = src_picture; |
| 586 | dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..mask_picturecxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#mask_picture. = mask_picture; |
| 587 | dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..dest_picturecxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#dest_picture. = dest_picture; |
| 588 | dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..srccxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#src. = src; |
| 589 | dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..maskcxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#mask. = mask; |
| 590 | dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..destcxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#dest. = dest; |
| 591 | |
| 592 | return TRUEcxx . . $ `<external>/6164077692963123767/macros.h:110:9`!; |
| 593 | } |
| 594 | |
| 595 | static struct qxl_bocxx . . $ qxl_bo# * |
| 596 | image_from_picturecxx . . $ image_from_picture(7f221d7ade41cff6). (qxl_screen_tcxx . . $ qxl_screen_t# *qxl, |
| 597 | PicturePtrcxx . . $ PicturePtr# picture, |
| 598 | qxl_surface_tcxx . . $ qxl_surface_t# *surface, |
| 599 | int *force_opaque) |
| 600 | { |
| 601 | if (picture->formatcxx . . $ _Picture#format. == PICT_x8r8g8b8cxx . . $ PICT_x8r8g8b8.) |
| 602 | *force_opaque = TRUEcxx . . $ `<external>/6164077692963123767/macros.h:110:9`!; |
| 603 | else |
| 604 | *force_opaque = FALSEcxx . . $ `<external>/6164077692963123767/macros.h:106:9`!; |
| 605 | |
| 606 | return image_from_surfacecxx . . $ image_from_surface(4a49dc3e6b444714).(qxl, surface); |
| 607 | } |
| 608 | |
| 609 | static struct qxl_bocxx . . $ qxl_bo# * |
| 610 | get_transformcxx . . $ get_transform(b1a4dc71f3788f4d). (qxl_screen_tcxx . . $ qxl_screen_t# *qxl, PictTransformcxx . . $ PictTransform# *transform) |
| 611 | { |
| 612 | if (transform) |
| 613 | { |
| 614 | struct qxl_bocxx . . $ qxl_bo# *qxform_bo = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_alloccxx . . $ qxl_bo_funcs#bo_alloc. (qxl, sizeof (QXLTransformcxx . . $ QXLTransform#), "transform"); |
| 615 | QXLTransformcxx . . $ QXLTransform# *qxform = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_mapcxx . . $ qxl_bo_funcs#bo_map.(qxform_bo); |
| 616 | |
| 617 | qxform->t00cxx . . $ $anonymous_type_5b09a8f371a4fc91_14#t00. = transform->matrixcxx . . $ pixman_transform#matrix.[0][0]; |
| 618 | qxform->t01cxx . . $ $anonymous_type_5b09a8f371a4fc91_14#t01. = transform->matrixcxx . . $ pixman_transform#matrix.[0][1]; |
| 619 | qxform->t02cxx . . $ $anonymous_type_5b09a8f371a4fc91_14#t02. = transform->matrixcxx . . $ pixman_transform#matrix.[0][2]; |
| 620 | qxform->t10cxx . . $ $anonymous_type_5b09a8f371a4fc91_14#t10. = transform->matrixcxx . . $ pixman_transform#matrix.[1][0]; |
| 621 | qxform->t11cxx . . $ $anonymous_type_5b09a8f371a4fc91_14#t11. = transform->matrixcxx . . $ pixman_transform#matrix.[1][1]; |
| 622 | qxform->t12cxx . . $ $anonymous_type_5b09a8f371a4fc91_14#t12. = transform->matrixcxx . . $ pixman_transform#matrix.[1][2]; |
| 623 | |
| 624 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_unmapcxx . . $ qxl_bo_funcs#bo_unmap.(qxform_bo); |
| 625 | return qxform_bo; |
| 626 | } |
| 627 | else |
| 628 | { |
| 629 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 630 | } |
| 631 | } |
| 632 | |
| 633 | static QXLRectcxx . . $ QXLRect# |
| 634 | full_rectcxx . . $ full_rect(5b65e928e4a576ab). (qxl_surface_tcxx . . $ qxl_surface_t# *surface) |
| 635 | { |
| 636 | QXLRectcxx . . $ QXLRect# r; |
| 637 | int w = pixman_image_get_widthcxx . . $ pixman_image_get_width(1233b5bf7ad32299). (surface->host_imagecxx . . $ qxl_surface_t#host_image.); |
| 638 | int h = pixman_image_get_heightcxx . . $ pixman_image_get_height(1233b5bf7ad32299). (surface->host_imagecxx . . $ qxl_surface_t#host_image.); |
| 639 | |
| 640 | r.leftcxx . . $ QXLRect#left. = r.topcxx . . $ QXLRect#top. = 0; |
| 641 | r.rightcxx . . $ QXLRect#right. = w; |
| 642 | r.bottomcxx . . $ QXLRect#bottom. = h; |
| 643 | |
| 644 | return r; |
| 645 | } |
| 646 | |
| 647 | void |
| 648 | qxl_surface_compositecxx . . $ qxl_surface_composite(9d0dc65001ec0696). (qxl_surface_tcxx . . $ qxl_surface_t# *dest, |
| 649 | int src_x, int src_y, |
| 650 | int mask_x, int mask_y, |
| 651 | int dest_x, int dest_y, |
| 652 | int width, int height) |
| 653 | { |
| 654 | qxl_screen_tcxx . . $ qxl_screen_t# *qxl = dest->qxlcxx . . $ qxl_surface_t#qxl.; |
| 655 | PicturePtrcxx . . $ PicturePtr# src = dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..src_picturecxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#src_picture.; |
| 656 | qxl_surface_tcxx . . $ qxl_surface_t# *qsrc = dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..srccxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#src.; |
| 657 | PicturePtrcxx . . $ PicturePtr# mask = dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..mask_picturecxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#mask_picture.; |
| 658 | qxl_surface_tcxx . . $ qxl_surface_t# *qmask = dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..maskcxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#mask.; |
| 659 | int op = dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..opcxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#op.; |
| 660 | struct QXLDrawablecxx . . $ QXLDrawable# *drawable; |
| 661 | struct qxl_bocxx . . $ qxl_bo# *drawable_bo; |
| 662 | QXLCompositecxx . . $ QXLComposite# *composite; |
| 663 | QXLRectcxx . . $ QXLRect# rect; |
| 664 | struct qxl_bocxx . . $ qxl_bo# *trans_bo, *img_bo; |
| 665 | int n_deps = 0; |
| 666 | int force_opaque; |
| 667 | struct qxl_bocxx . . $ qxl_bo# *derefs[4]; |
| 668 | int n_derefs = 0, i; |
| 669 | #if 0 |
| 670 | ErrorF ("QXL Composite: src: %x (%d %d) id: %d; \n" |
| 671 | " mask: id: %d\n" |
| 672 | " dest: %x %d %d %d %d (id: %d)\n", |
| 673 | dest->u.composite.src_picture->format, |
| 674 | dest->u.composite.src_picture->pDrawable->width, |
| 675 | dest->u.composite.src_picture->pDrawable->height, |
| 676 | dest->u.composite.src->id, |
| 677 | dest->u.composite.mask? dest->u.composite.mask->id : -1, |
| 678 | dest->u.composite.dest_picture->format, |
| 679 | dest_x, dest_y, width, height, |
| 680 | dest->id |
| 681 | ); |
| 682 | #endif |
| 683 | |
| 684 | rect.leftcxx . . $ QXLRect#left. = dest_x; |
| 685 | rect.rightcxx . . $ QXLRect#right. = dest_x + width; |
| 686 | rect.topcxx . . $ QXLRect#top. = dest_y; |
| 687 | rect.bottomcxx . . $ QXLRect#bottom. = dest_y + height; |
| 688 | |
| 689 | drawable_bo = make_drawablecxx . . $ make_drawable(aca879a4b267382a). (qxl, dest, QXL_DRAW_COMPOSITEcxx . . $ QXL_DRAW_COMPOSITE., &rect); |
| 690 | |
| 691 | drawable = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_mapcxx . . $ qxl_bo_funcs#bo_map.(drawable_bo); |
| 692 | |
| 693 | composite = &drawable->ucxx . . $ QXLDrawable#u..compositecxx . . $ QXLDrawable#$anonymous_type_16#composite.; |
| 694 | |
| 695 | composite->flagscxx . . $ QXLComposite#flags. = 0; |
| 696 | |
| 697 | if (dest->ucxx . . $ qxl_surface_t#u..compositecxx . . $ qxl_surface_t#$anonymous_type_0#composite..dest_picturecxx . . $ qxl_surface_t#$anonymous_type_0#$anonymous_type_1#dest_picture.->formatcxx . . $ _Picture#format. == PICT_x8r8g8b8cxx . . $ PICT_x8r8g8b8.) |
| 698 | composite->flagscxx . . $ QXLComposite#flags. |= SPICE_COMPOSITE_DEST_OPAQUEcxx . . $ SPICE_COMPOSITE_DEST_OPAQUE.; |
| 699 | |
| 700 | composite->flagscxx . . $ QXLComposite#flags. |= (op & 0xff); |
| 701 | |
| 702 | img_bo = image_from_picturecxx . . $ image_from_picture(7f221d7ade41cff6). (qxl, src, qsrc, &force_opaque); |
| 703 | if (force_opaque) |
| 704 | composite->flagscxx . . $ QXLComposite#flags. |= SPICE_COMPOSITE_SOURCE_OPAQUEcxx . . $ SPICE_COMPOSITE_SOURCE_OPAQUE.; |
| 705 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_bo_reloccxx . . $ qxl_bo_funcs#bo_output_bo_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(QXLDrawable, u.composite.src), |
| 706 | drawable_bo, img_bo); |
| 707 | derefs[n_derefs++] = img_bo; |
| 708 | |
| 709 | composite->flagscxx . . $ QXLComposite#flags. |= (src->filtercxx . . $ _Picture#filter. << 8); |
| 710 | composite->flagscxx . . $ QXLComposite#flags. |= (src->repeatcxx . . $ _Picture#repeat. << 14); |
| 711 | trans_bo = get_transformcxx . . $ get_transform(b1a4dc71f3788f4d). (qxl, src->transformcxx . . $ _Picture#transform.); |
| 712 | if (trans_bo) { |
| 713 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_bo_reloccxx . . $ qxl_bo_funcs#bo_output_bo_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(QXLDrawable, u.composite.src_transform), |
| 714 | drawable_bo, trans_bo); |
| 715 | derefs[n_derefs++] = trans_bo; |
| 716 | } else |
| 717 | composite->src_transformcxx . . $ QXLComposite#src_transform. = 0; |
| 718 | |
| 719 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_surf_reloccxx . . $ qxl_bo_funcs#bo_output_surf_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(struct QXLDrawable, surfaces_dest[n_deps]), drawable_bo, qsrc); |
| 720 | drawable->surfaces_rectscxx . . $ QXLDrawable#surfaces_rects.[n_deps] = full_rectcxx . . $ full_rect(5b65e928e4a576ab). (qsrc); |
| 721 | |
| 722 | n_deps++; |
| 723 | |
| 724 | if (mask) |
| 725 | { |
| 726 | img_bo = image_from_picturecxx . . $ image_from_picture(7f221d7ade41cff6). (qxl, mask, qmask, &force_opaque); |
| 727 | if (force_opaque) |
| 728 | composite->flagscxx . . $ QXLComposite#flags. |= SPICE_COMPOSITE_MASK_OPAQUEcxx . . $ SPICE_COMPOSITE_MASK_OPAQUE.; |
| 729 | |
| 730 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_bo_reloccxx . . $ qxl_bo_funcs#bo_output_bo_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(QXLDrawable, u.composite.mask), |
| 731 | drawable_bo, img_bo); |
| 732 | derefs[n_derefs++] = img_bo; |
| 733 | composite->flagscxx . . $ QXLComposite#flags. |= (mask->filtercxx . . $ _Picture#filter. << 11); |
| 734 | composite->flagscxx . . $ QXLComposite#flags. |= (mask->repeatcxx . . $ _Picture#repeat. << 16); |
| 735 | composite->flagscxx . . $ QXLComposite#flags. |= (mask->componentAlphacxx . . $ _Picture#componentAlpha. << 18); |
| 736 | |
| 737 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_surf_reloccxx . . $ qxl_bo_funcs#bo_output_surf_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(struct QXLDrawable, surfaces_dest[n_deps]), drawable_bo, qmask); |
| 738 | drawable->surfaces_rectscxx . . $ QXLDrawable#surfaces_rects.[n_deps] = full_rectcxx . . $ full_rect(5b65e928e4a576ab). (qmask); |
| 739 | n_deps++; |
| 740 | |
| 741 | trans_bo = get_transformcxx . . $ get_transform(b1a4dc71f3788f4d). (qxl, src->transformcxx . . $ _Picture#transform.); |
| 742 | if (trans_bo) { |
| 743 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_bo_reloccxx . . $ qxl_bo_funcs#bo_output_bo_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(QXLDrawable, u.composite.mask_transform), |
| 744 | drawable_bo, trans_bo); |
| 745 | derefs[n_derefs++] = trans_bo; |
| 746 | } |
| 747 | else |
| 748 | composite->mask_transformcxx . . $ QXLComposite#mask_transform. = 0; |
| 749 | } |
| 750 | else |
| 751 | { |
| 752 | composite->maskcxx . . $ QXLComposite#mask. = 0x00000000; |
| 753 | composite->mask_transformcxx . . $ QXLComposite#mask_transform. = 0x00000000; |
| 754 | } |
| 755 | |
| 756 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_surf_reloccxx . . $ qxl_bo_funcs#bo_output_surf_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(struct QXLDrawable, surfaces_dest[n_deps]), drawable_bo, dest); |
| 757 | drawable->surfaces_rectscxx . . $ QXLDrawable#surfaces_rects.[n_deps] = full_rectcxx . . $ full_rect(5b65e928e4a576ab). (dest); |
| 758 | |
| 759 | composite->src_origincxx . . $ QXLComposite#src_origin..xcxx . . $ QXLPoint16#x. = src_x; |
| 760 | composite->src_origincxx . . $ QXLComposite#src_origin..ycxx . . $ QXLPoint16#y. = src_y; |
| 761 | composite->mask_origincxx . . $ QXLComposite#mask_origin..xcxx . . $ QXLPoint16#x. = mask_x; |
| 762 | composite->mask_origincxx . . $ QXLComposite#mask_origin..ycxx . . $ QXLPoint16#y. = mask_y; |
| 763 | |
| 764 | drawable->effectcxx . . $ QXLDrawable#effect. = QXL_EFFECT_BLENDcxx . . $ QXL_EFFECT_BLEND.; |
| 765 | |
| 766 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_unmapcxx . . $ qxl_bo_funcs#bo_unmap.(drawable_bo); |
| 767 | push_drawablecxx . . $ push_drawable(cafdee6b4ac3c810). (qxl, drawable_bo); |
| 768 | |
| 769 | for (i = 0; i < n_derefs; i++) |
| 770 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_decrefcxx . . $ qxl_bo_funcs#bo_decref.(qxl, derefs[i]); |
| 771 | } |
| 772 | |
| 773 | Boolcxx . . $ Bool# |
| 774 | qxl_surface_put_imagecxx . . $ qxl_surface_put_image(f96b048c74b3d1ae). (qxl_surface_tcxx . . $ qxl_surface_t# *dest, |
| 775 | int x, int y, int width, int height, |
| 776 | const char *src, int src_pitch) |
| 777 | { |
| 778 | struct qxl_bocxx . . $ qxl_bo# *drawable_bo; |
| 779 | struct QXLDrawablecxx . . $ QXLDrawable# *drawable; |
| 780 | qxl_screen_tcxx . . $ qxl_screen_t# *qxl = dest->qxlcxx . . $ qxl_surface_t#qxl.; |
| 781 | struct QXLRectcxx . . $ QXLRect# rect; |
| 782 | struct qxl_bocxx . . $ qxl_bo# *image_bo; |
| 783 | |
| 784 | rect.leftcxx . . $ QXLRect#left. = x; |
| 785 | rect.rightcxx . . $ QXLRect#right. = x + width; |
| 786 | rect.topcxx . . $ QXLRect#top. = y; |
| 787 | rect.bottomcxx . . $ QXLRect#bottom. = y + height; |
| 788 | |
| 789 | drawable_bo = make_drawablecxx . . $ make_drawable(aca879a4b267382a). (qxl, dest, QXL_DRAW_COPYcxx . . $ QXL_DRAW_COPY., &rect); |
| 790 | |
| 791 | drawable = qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_mapcxx . . $ qxl_bo_funcs#bo_map.(drawable_bo); |
| 792 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area..topcxx . . $ QXLRect#top. = 0; |
| 793 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area..bottomcxx . . $ QXLRect#bottom. = height; |
| 794 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area..leftcxx . . $ QXLRect#left. = 0; |
| 795 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..src_areacxx . . $ QXLCopy#src_area..rightcxx . . $ QXLRect#right. = width; |
| 796 | |
| 797 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..rop_descriptorcxx . . $ QXLCopy#rop_descriptor. = ROPD_OP_PUTcxx . . $ ROPD_OP_PUT.; |
| 798 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..scale_modecxx . . $ QXLCopy#scale_mode. = 0; |
| 799 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..flagscxx . . $ QXLQMask#flags. = 0; |
| 800 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..poscxx . . $ QXLQMask#pos..xcxx . . $ QXLPoint#x. = 0; |
| 801 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..poscxx . . $ QXLQMask#pos..ycxx . . $ QXLPoint#y. = 0; |
| 802 | drawable->ucxx . . $ QXLDrawable#u..copycxx . . $ QXLDrawable#$anonymous_type_16#copy..maskcxx . . $ QXLCopy#mask..bitmapcxx . . $ QXLQMask#bitmap. = 0; |
| 803 | |
| 804 | image_bo = qxl_image_createcxx . . $ qxl_image_create(6d1611a996a53b34). ( |
| 805 | qxl, (const uint8_tcxx . . $ uint8_t# *)src, 0, 0, width, height, src_pitch, |
| 806 | dest->bppcxx . . $ qxl_surface_t#bpp. == 24 ? 4 : dest->bppcxx . . $ qxl_surface_t#bpp. / 8, FALSEcxx . . $ `<external>/6164077692963123767/macros.h:106:9`!); |
| 807 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_output_bo_reloccxx . . $ qxl_bo_funcs#bo_output_bo_reloc.(qxl, offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(QXLDrawable, u.copy.src_bitmap), |
| 808 | drawable_bo, image_bo); |
| 809 | |
| 810 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_unmapcxx . . $ qxl_bo_funcs#bo_unmap.(drawable_bo); |
| 811 | |
| 812 | push_drawablecxx . . $ push_drawable(cafdee6b4ac3c810). (qxl, drawable_bo); |
| 813 | qxl->bo_funcscxx . . $ _qxl_screen_t#bo_funcs.->bo_decrefcxx . . $ qxl_bo_funcs#bo_decref.(qxl, image_bo); |
| 814 | return TRUEcxx . . $ `<external>/6164077692963123767/macros.h:110:9`!; |
| 815 | } |
| 816 | |
| 817 | void |
| 818 | qxl_get_formatscxx . . $ qxl_get_formats(cf3ef8d1f477bac). (int bpp, SpiceSurfaceFmtcxx . . $ SpiceSurfaceFmt# *format, pixman_format_code_tcxx . . $ pixman_format_code_t# *pformat) |
| 819 | { |
| 820 | switch (bpp) |
| 821 | { |
| 822 | case 8: |
| 823 | *format = SPICE_SURFACE_FMT_8_Acxx . . $ SPICE_SURFACE_FMT_8_A.; |
| 824 | *pformat = PIXMAN_a8cxx . . $ PIXMAN_a8.; |
| 825 | break; |
| 826 | |
| 827 | case 16: |
| 828 | *format = SPICE_SURFACE_FMT_16_565cxx . . $ SPICE_SURFACE_FMT_16_565.; |
| 829 | *pformat = PIXMAN_r5g6b5cxx . . $ PIXMAN_r5g6b5.; |
| 830 | break; |
| 831 | |
| 832 | case 24: |
| 833 | *format = SPICE_SURFACE_FMT_32_xRGBcxx . . $ SPICE_SURFACE_FMT_32_xRGB.; |
| 834 | *pformat = PIXMAN_a8r8g8b8cxx . . $ PIXMAN_a8r8g8b8.; |
| 835 | break; |
| 836 | |
| 837 | case 32: |
| 838 | *format = SPICE_SURFACE_FMT_32_ARGBcxx . . $ SPICE_SURFACE_FMT_32_ARGB.; |
| 839 | *pformat = PIXMAN_a8r8g8b8cxx . . $ PIXMAN_a8r8g8b8.; |
| 840 | break; |
| 841 | |
| 842 | default: |
| 843 | *format = -1; |
| 844 | *pformat = -1; |
| 845 | break; |
| 846 | } |
| 847 | } |