| 1 | /* |
| 2 | * Copyright © 2000 SuSE, Inc. |
| 3 | * Copyright © 2007 Red Hat, Inc. |
| 4 | * Copyright © 2012 Intel Corporation |
| 5 | * |
| 6 | * Permission to use, copy, modify, distribute, and sell this software and its |
| 7 | * documentation for any purpose is hereby granted without fee, provided that |
| 8 | * the above copyright notice appear in all copies and that both that |
| 9 | * copyright notice and this permission notice appear in supporting |
| 10 | * documentation, and that the name of SuSE not be used in advertising or |
| 11 | * publicity pertaining to distribution of the software without specific, |
| 12 | * written prior permission. SuSE makes no representations about the |
| 13 | * suitability of this software for any purpose. It is provided "as is" |
| 14 | * without express or implied warranty. |
| 15 | * |
| 16 | * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL |
| 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE |
| 18 | * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 19 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION |
| 20 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
| 21 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 22 | * |
| 23 | * Author: Keith Packard, SuSE, Inc. |
| 24 | */ |
| 25 | |
| 26 | #include <string.h> |
| 27 | |
| 28 | #include "fb.h"cxx . . $ `<file>/src/sna/fb/fb.h`/ |
| 29 | #include "fbpict.h"cxx . . $ `<file>/src/sna/fb/fbpict.h`/ |
| 30 | |
| 31 | static void |
| 32 | SourceValidateOnePicturecxx . . $ SourceValidateOnePicture(bc938522fd951fa8).(PicturePtrcxx . . $ PicturePtr# picture) |
| 33 | { |
| 34 | DrawablePtrcxx . . $ DrawablePtr# drawable = picture->pDrawablecxx . . $ _Picture#pDrawable.; |
| 35 | |
| 36 | if (!drawable) |
| 37 | return; |
| 38 | |
| 39 | SourceValidatecxx . . $ `src/compat-api.h:205:9`!(drawable, |
| 40 | 0, 0, drawable->width, drawable->height, |
| 41 | picture->subWindowMode); |
| 42 | } |
| 43 | |
| 44 | static void |
| 45 | fbCompositeSourceValidatecxx . . $ fbCompositeSourceValidate(bc938522fd951fa8).(PicturePtrcxx . . $ PicturePtr# picture) |
| 46 | { |
| 47 | SourceValidateOnePicturecxx . . $ SourceValidateOnePicture(bc938522fd951fa8).(picture); |
| 48 | if (picture->alphaMapcxx . . $ _Picture#alphaMap.) |
| 49 | SourceValidateOnePicturecxx . . $ SourceValidateOnePicture(bc938522fd951fa8).(picture->alphaMapcxx . . $ _Picture#alphaMap.); |
| 50 | } |
| 51 | |
| 52 | void |
| 53 | fbCompositecxx . . $ `./sfb.h:38:9`!(CARD8cxx . . $ CARD8# op, |
| 54 | PicturePtrcxx . . $ PicturePtr# pSrc, |
| 55 | PicturePtrcxx . . $ PicturePtr# pMask, |
| 56 | PicturePtrcxx . . $ PicturePtr# pDst, |
| 57 | INT16cxx . . $ INT16# xSrc, |
| 58 | INT16cxx . . $ INT16# ySrc, |
| 59 | INT16cxx . . $ INT16# xMask, |
| 60 | INT16cxx . . $ INT16# yMask, INT16cxx . . $ INT16# xDst, INT16cxx . . $ INT16# yDst, CARD16cxx . . $ CARD16# width, CARD16cxx . . $ CARD16# height) |
| 61 | { |
| 62 | pixman_image_tcxx . . $ pixman_image_t# *src, *mask, *dest; |
| 63 | int src_xoff, src_yoff; |
| 64 | int msk_xoff, msk_yoff; |
| 65 | int dst_xoff, dst_yoff; |
| 66 | |
| 67 | fbCompositeSourceValidatecxx . . $ fbCompositeSourceValidate(bc938522fd951fa8).(pSrc); |
| 68 | if (pMask) |
| 69 | fbCompositeSourceValidatecxx . . $ fbCompositeSourceValidate(bc938522fd951fa8).(pMask); |
| 70 | |
| 71 | src = image_from_pictcxx . . $ `./sfb.h:39:9`!(pSrc, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!, &src_xoff, &src_yoff); |
| 72 | mask = image_from_pictcxx . . $ `./sfb.h:39:9`!(pMask, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!, &msk_xoff, &msk_yoff); |
| 73 | dest = image_from_pictcxx . . $ `./sfb.h:39:9`!(pDst, TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!, &dst_xoff, &dst_yoff); |
| 74 | |
| 75 | if (src && dest && !(pMask && !mask)) { |
| 76 | pixman_image_compositecxx . . $ pixman_image_composite(191c842ee49e5cd7).(op, src, mask, dest, |
| 77 | xSrc + src_xoff, ySrc + src_yoff, |
| 78 | xMask + msk_xoff, yMask + msk_yoff, |
| 79 | xDst + dst_xoff, yDst + dst_yoff, width, height); |
| 80 | } |
| 81 | |
| 82 | free_pixman_pictcxx . . $ free_pixman_pict(59481076768b36a0).(pSrc, src); |
| 83 | free_pixman_pictcxx . . $ free_pixman_pict(59481076768b36a0).(pMask, mask); |
| 84 | free_pixman_pictcxx . . $ free_pixman_pict(59481076768b36a0).(pDst, dest); |
| 85 | } |
| 86 | |
| 87 | static pixman_image_tcxx . . $ pixman_image_t# * |
| 88 | create_solid_fill_imagecxx . . $ create_solid_fill_image(a32df81c1470c4dc).(PicturePtrcxx . . $ PicturePtr# pict) |
| 89 | { |
| 90 | PictSolidFillcxx . . $ PictSolidFill# *solid = &pict->pSourcePictcxx . . $ _Picture#pSourcePict.->solidFillcxx . . $ _SourcePict#solidFill.; |
| 91 | pixman_color_tcxx . . $ pixman_color_t# color; |
| 92 | CARD32cxx . . $ CARD32# a, r, g, b; |
| 93 | |
| 94 | a = (solid->colorcxx . . $ _PictSolidFill#color. & 0xff000000) >> 24; |
| 95 | r = (solid->colorcxx . . $ _PictSolidFill#color. & 0x00ff0000) >> 16; |
| 96 | g = (solid->colorcxx . . $ _PictSolidFill#color. & 0x0000ff00) >> 8; |
| 97 | b = (solid->colorcxx . . $ _PictSolidFill#color. & 0x000000ff) >> 0; |
| 98 | |
| 99 | color.alphacxx . . $ pixman_color#alpha. = (a << 8) | a; |
| 100 | color.redcxx . . $ pixman_color#red. = (r << 8) | r; |
| 101 | color.greencxx . . $ pixman_color#green. = (g << 8) | g; |
| 102 | color.bluecxx . . $ pixman_color#blue. = (b << 8) | b; |
| 103 | |
| 104 | return pixman_image_create_solid_fillcxx . . $ pixman_image_create_solid_fill(53560300cc212de7).(&color); |
| 105 | } |
| 106 | |
| 107 | static pixman_image_tcxx . . $ pixman_image_t# * |
| 108 | create_linear_gradient_imagecxx . . $ create_linear_gradient_image(cc544089da9dcdb5).(PictGradientcxx . . $ PictGradient# * gradient) |
| 109 | { |
| 110 | PictLinearGradientcxx . . $ PictLinearGradient# *linear = (PictLinearGradientcxx . . $ PictLinearGradient# *) gradient; |
| 111 | pixman_point_fixed_tcxx . . $ pixman_point_fixed_t# p1; |
| 112 | pixman_point_fixed_tcxx . . $ pixman_point_fixed_t# p2; |
| 113 | |
| 114 | p1.xcxx . . $ pixman_point_fixed#x. = linear->p1cxx . . $ _PictLinearGradient#p1..xcxx . . $ $anonymous_type_d4be3316d06f2656_7#x.; |
| 115 | p1.ycxx . . $ pixman_point_fixed#y. = linear->p1cxx . . $ _PictLinearGradient#p1..ycxx . . $ $anonymous_type_d4be3316d06f2656_7#y.; |
| 116 | p2.xcxx . . $ pixman_point_fixed#x. = linear->p2cxx . . $ _PictLinearGradient#p2..xcxx . . $ $anonymous_type_d4be3316d06f2656_7#x.; |
| 117 | p2.ycxx . . $ pixman_point_fixed#y. = linear->p2cxx . . $ _PictLinearGradient#p2..ycxx . . $ $anonymous_type_d4be3316d06f2656_7#y.; |
| 118 | |
| 119 | return pixman_image_create_linear_gradientcxx . . $ pixman_image_create_linear_gradient(28387993a092f71c).(&p1, &p2, |
| 120 | (pixman_gradient_stop_tcxx . . $ pixman_gradient_stop_t# *) |
| 121 | gradient->stopscxx . . $ _PictGradient#stops., |
| 122 | gradient->nstopscxx . . $ _PictGradient#nstops.); |
| 123 | } |
| 124 | |
| 125 | static pixman_image_tcxx . . $ pixman_image_t# * |
| 126 | create_radial_gradient_imagecxx . . $ create_radial_gradient_image(cc544089da9dcdb5).(PictGradientcxx . . $ PictGradient# * gradient) |
| 127 | { |
| 128 | PictRadialGradientcxx . . $ PictRadialGradient# *radial = (PictRadialGradientcxx . . $ PictRadialGradient# *) gradient; |
| 129 | pixman_point_fixed_tcxx . . $ pixman_point_fixed_t# c1; |
| 130 | pixman_point_fixed_tcxx . . $ pixman_point_fixed_t# c2; |
| 131 | |
| 132 | c1.xcxx . . $ pixman_point_fixed#x. = radial->c1cxx . . $ _PictRadialGradient#c1..xcxx . . $ _PictCircle#x.; |
| 133 | c1.ycxx . . $ pixman_point_fixed#y. = radial->c1cxx . . $ _PictRadialGradient#c1..ycxx . . $ _PictCircle#y.; |
| 134 | c2.xcxx . . $ pixman_point_fixed#x. = radial->c2cxx . . $ _PictRadialGradient#c2..xcxx . . $ _PictCircle#x.; |
| 135 | c2.ycxx . . $ pixman_point_fixed#y. = radial->c2cxx . . $ _PictRadialGradient#c2..ycxx . . $ _PictCircle#y.; |
| 136 | |
| 137 | return pixman_image_create_radial_gradientcxx . . $ pixman_image_create_radial_gradient(6fedb4cf43366218).(&c1, &c2, radial->c1cxx . . $ _PictRadialGradient#c1..radiuscxx . . $ _PictCircle#radius., |
| 138 | radial->c2cxx . . $ _PictRadialGradient#c2..radiuscxx . . $ _PictCircle#radius., |
| 139 | (pixman_gradient_stop_tcxx . . $ pixman_gradient_stop_t# *) |
| 140 | gradient->stopscxx . . $ _PictGradient#stops., |
| 141 | gradient->nstopscxx . . $ _PictGradient#nstops.); |
| 142 | } |
| 143 | |
| 144 | static pixman_image_tcxx . . $ pixman_image_t# * |
| 145 | create_conical_gradient_imagecxx . . $ create_conical_gradient_image(cc544089da9dcdb5).(PictGradientcxx . . $ PictGradient# * gradient) |
| 146 | { |
| 147 | PictConicalGradientcxx . . $ PictConicalGradient# *conical = (PictConicalGradientcxx . . $ PictConicalGradient# *) gradient; |
| 148 | pixman_point_fixed_tcxx . . $ pixman_point_fixed_t# center; |
| 149 | |
| 150 | center.xcxx . . $ pixman_point_fixed#x. = conical->centercxx . . $ _PictConicalGradient#center..xcxx . . $ $anonymous_type_d4be3316d06f2656_7#x.; |
| 151 | center.ycxx . . $ pixman_point_fixed#y. = conical->centercxx . . $ _PictConicalGradient#center..ycxx . . $ $anonymous_type_d4be3316d06f2656_7#y.; |
| 152 | |
| 153 | return pixman_image_create_conical_gradientcxx . . $ pixman_image_create_conical_gradient(45aab51a0d29cbd6).(¢er, conical->anglecxx . . $ _PictConicalGradient#angle., |
| 154 | (pixman_gradient_stop_tcxx . . $ pixman_gradient_stop_t# *) |
| 155 | gradient->stopscxx . . $ _PictGradient#stops., |
| 156 | gradient->nstopscxx . . $ _PictGradient#nstops.); |
| 157 | } |
| 158 | |
| 159 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! |
| 160 | picture_has_clipcxx . . $ picture_has_clip(5a85b3426b538a74).(PicturePtrcxx . . $ PicturePtr# p) |
| 161 | { |
| 162 | #if XORG_VERSION_CURRENTcxx . . $ `<external>/9559255664802066005/xorg-server.h:139:9`! >= XORG_VERSION_NUMERICcxx . . $ `<external>/11621034742119289027/xorgVersion.h:36:9`!(1,16,99,1,0) |
| 163 | return p->clientClipcxx . . $ _Picture#clientClip.; |
| 164 | #else |
| 165 | return p->clientClipType != CT_NONE; |
| 166 | #endif |
| 167 | } |
| 168 | |
| 169 | static pixman_image_tcxx . . $ pixman_image_t# * |
| 170 | create_bits_picturecxx . . $ create_bits_picture(1c39e58c9445bfd).(PicturePtrcxx . . $ PicturePtr# pict, Boolcxx . . $ Bool# has_clip, int *xoff, int *yoff) |
| 171 | { |
| 172 | PixmapPtrcxx . . $ PixmapPtr# pixmap; |
| 173 | FbBitscxx . . $ FbBits# *bits; |
| 174 | FbStridecxx . . $ FbStride# stride; |
| 175 | int bpp; |
| 176 | pixman_image_tcxx . . $ pixman_image_t# *image; |
| 177 | |
| 178 | fbGetDrawablePixmapcxx . . $ `src/sna/fb/fb.h:319:9`!(pict->pDrawable, pixmap, *xoff, *yoff); |
| 179 | fbGetPixmapBitsDatacxx . . $ `src/sna/fb/fb.h:331:9`!(pixmap, bits, stride, bpp); |
| 180 | |
| 181 | image = pixman_image_create_bitscxx . . $ pixman_image_create_bits(7aecbb5f67bee13).((pixman_format_code_tcxx . . $ pixman_format_code_t#) pict->formatcxx . . $ _Picture#format., |
| 182 | pixmap->drawablecxx . . $ _Pixmap#drawable..widthcxx . . $ _Drawable#width., |
| 183 | pixmap->drawablecxx . . $ _Pixmap#drawable..heightcxx . . $ _Drawable#height., (uint32_tcxx . . $ uint32_t# *) bits, |
| 184 | stride * sizeof(FbStridecxx . . $ FbStride#)); |
| 185 | |
| 186 | if (!image) |
| 187 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 188 | |
| 189 | /* pCompositeClip is undefined for source pictures, so |
| 190 | * only set the clip region for pictures with drawables |
| 191 | */ |
| 192 | if (has_clip) { |
| 193 | if (picture_has_clipcxx . . $ picture_has_clip(5a85b3426b538a74).(pict)) |
| 194 | pixman_image_set_has_client_clipcxx . . $ pixman_image_set_has_client_clip(ceec8f0a42591f2b).(image, TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!); |
| 195 | |
| 196 | if (*xoff || *yoff) |
| 197 | pixman_region_translatecxx . . $ pixman_region_translate(3d137d1414c3c76d).(pict->pCompositeClipcxx . . $ _Picture#pCompositeClip., *xoff, *yoff); |
| 198 | |
| 199 | pixman_image_set_clip_regioncxx . . $ pixman_image_set_clip_region(187bd5c41aadad8b).(image, pict->pCompositeClipcxx . . $ _Picture#pCompositeClip.); |
| 200 | |
| 201 | if (*xoff || *yoff) |
| 202 | pixman_region_translatecxx . . $ pixman_region_translate(3d137d1414c3c76d).(pict->pCompositeClipcxx . . $ _Picture#pCompositeClip., -*xoff, -*yoff); |
| 203 | } |
| 204 | |
| 205 | /* Indexed table */ |
| 206 | if (pict->pFormatcxx . . $ _Picture#pFormat.->indexcxx . . $ _PictFormat#index..devPrivatecxx . . $ _IndexFormat#devPrivate.) |
| 207 | pixman_image_set_indexedcxx . . $ pixman_image_set_indexed(d1f480d595cf2063).(image, pict->pFormatcxx . . $ _Picture#pFormat.->indexcxx . . $ _PictFormat#index..devPrivatecxx . . $ _IndexFormat#devPrivate.); |
| 208 | |
| 209 | /* Add in drawable origin to position within the image */ |
| 210 | *xoff += pict->pDrawablecxx . . $ _Picture#pDrawable.->xcxx . . $ _Drawable#x.; |
| 211 | *yoff += pict->pDrawablecxx . . $ _Picture#pDrawable.->ycxx . . $ _Drawable#y.; |
| 212 | |
| 213 | return image; |
| 214 | } |
| 215 | |
| 216 | static pixman_image_tcxx . . $ pixman_image_t# *image_from_pict_internalcxx . . $ image_from_pict_internal(e7147fdeb64e84fd).(PicturePtrcxx . . $ PicturePtr# pict, Boolcxx . . $ Bool# has_clip, |
| 217 | int *xoff, int *yoff, |
| 218 | Boolcxx . . $ Bool# is_alpha_map); |
| 219 | |
| 220 | static void |
| 221 | set_image_propertiescxx . . $ set_image_properties(efb7b5caa409e60).(pixman_image_tcxx . . $ pixman_image_t# * image, PicturePtrcxx . . $ PicturePtr# pict, Boolcxx . . $ Bool# has_clip, |
| 222 | int *xoff, int *yoff, Boolcxx . . $ Bool# is_alpha_map) |
| 223 | { |
| 224 | pixman_repeat_tcxx . . $ pixman_repeat_t# repeat; |
| 225 | pixman_filter_tcxx . . $ pixman_filter_t# filter; |
| 226 | |
| 227 | if (pict->transformcxx . . $ _Picture#transform.) { |
| 228 | /* For source images, adjust the transform to account |
| 229 | * for the drawable offset within the pixman image, |
| 230 | * then set the offset to 0 as it will be used |
| 231 | * to compute positions within the transformed image. |
| 232 | */ |
| 233 | if (!has_clip) { |
| 234 | struct pixman_transformcxx . . $ pixman_transform# adjusted; |
| 235 | |
| 236 | adjusted = *pict->transformcxx . . $ _Picture#transform.; |
| 237 | pixman_transform_translatecxx . . $ pixman_transform_translate(8615ddcda7c2a0f).(&adjusted, |
| 238 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 239 | pixman_int_to_fixedcxx . . $ `<external>/17639638556090915931/pixman.h:130:9`!(*xoff), |
| 240 | pixman_int_to_fixedcxx . . $ `<external>/17639638556090915931/pixman.h:130:9`!(*yoff)); |
| 241 | pixman_image_set_transformcxx . . $ pixman_image_set_transform(45fea27f3f31a656).(image, &adjusted); |
| 242 | *xoff = 0; |
| 243 | *yoff = 0; |
| 244 | } |
| 245 | else |
| 246 | pixman_image_set_transformcxx . . $ pixman_image_set_transform(45fea27f3f31a656).(image, pict->transformcxx . . $ _Picture#transform.); |
| 247 | } |
| 248 | |
| 249 | switch (pict->repeatTypecxx . . $ _Picture#repeatType.) { |
| 250 | default: |
| 251 | case RepeatNonecxx . . $ `<external>/2369207440537731940/render.h:205:9`!: |
| 252 | repeat = PIXMAN_REPEAT_NONEcxx . . $ PIXMAN_REPEAT_NONE.; |
| 253 | break; |
| 254 | |
| 255 | case RepeatPadcxx . . $ `<external>/2369207440537731940/render.h:207:9`!: |
| 256 | repeat = PIXMAN_REPEAT_PADcxx . . $ PIXMAN_REPEAT_PAD.; |
| 257 | break; |
| 258 | |
| 259 | case RepeatNormalcxx . . $ `<external>/2369207440537731940/render.h:206:9`!: |
| 260 | repeat = PIXMAN_REPEAT_NORMALcxx . . $ PIXMAN_REPEAT_NORMAL.; |
| 261 | break; |
| 262 | |
| 263 | case RepeatReflectcxx . . $ `<external>/2369207440537731940/render.h:208:9`!: |
| 264 | repeat = PIXMAN_REPEAT_REFLECTcxx . . $ PIXMAN_REPEAT_REFLECT.; |
| 265 | break; |
| 266 | } |
| 267 | |
| 268 | pixman_image_set_repeatcxx . . $ pixman_image_set_repeat(b29c61f019586b32).(image, repeat); |
| 269 | |
| 270 | /* Fetch alpha map unless 'pict' is being used |
| 271 | * as the alpha map for this operation |
| 272 | */ |
| 273 | if (pict->alphaMapcxx . . $ _Picture#alphaMap. && !is_alpha_map) { |
| 274 | int alpha_xoff, alpha_yoff; |
| 275 | pixman_image_tcxx . . $ pixman_image_t# *alpha_map = |
| 276 | image_from_pict_internalcxx . . $ image_from_pict_internal(e7147fdeb64e84fd).(pict->alphaMapcxx . . $ _Picture#alphaMap., FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!, &alpha_xoff, |
| 277 | &alpha_yoff, TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!); |
| 278 | |
| 279 | pixman_image_set_alpha_mapcxx . . $ pixman_image_set_alpha_map(dbb495a5cf9f6581).(image, alpha_map, pict->alphaOrigincxx . . $ _Picture#alphaOrigin..xcxx . . $ _xPoint#x., |
| 280 | pict->alphaOrigincxx . . $ _Picture#alphaOrigin..ycxx . . $ _xPoint#y.); |
| 281 | |
| 282 | free_pixman_pictcxx . . $ free_pixman_pict(59481076768b36a0).(pict->alphaMapcxx . . $ _Picture#alphaMap., alpha_map); |
| 283 | } |
| 284 | |
| 285 | pixman_image_set_component_alphacxx . . $ pixman_image_set_component_alpha(ceec8f0a42591f2b).(image, pict->componentAlphacxx . . $ _Picture#componentAlpha.); |
| 286 | |
| 287 | switch (pict->filtercxx . . $ _Picture#filter.) { |
| 288 | default: |
| 289 | case PictFilterNearestcxx . . $ `<external>/920586193036082439/picturestr.h:173:9`!: |
| 290 | case PictFilterFastcxx . . $ `<external>/920586193036082439/picturestr.h:176:9`!: |
| 291 | filter = PIXMAN_FILTER_NEARESTcxx . . $ PIXMAN_FILTER_NEAREST.; |
| 292 | break; |
| 293 | |
| 294 | case PictFilterBilinearcxx . . $ `<external>/920586193036082439/picturestr.h:174:9`!: |
| 295 | case PictFilterGoodcxx . . $ `<external>/920586193036082439/picturestr.h:177:9`!: |
| 296 | filter = PIXMAN_FILTER_BILINEARcxx . . $ PIXMAN_FILTER_BILINEAR.; |
| 297 | break; |
| 298 | |
| 299 | case PictFilterConvolutioncxx . . $ `<external>/920586193036082439/picturestr.h:180:9`!: |
| 300 | filter = PIXMAN_FILTER_CONVOLUTIONcxx . . $ PIXMAN_FILTER_CONVOLUTION.; |
| 301 | break; |
| 302 | } |
| 303 | |
| 304 | pixman_image_set_filtercxx . . $ pixman_image_set_filter(82764714217ad7af).(image, filter, |
| 305 | (pixman_fixed_tcxx . . $ pixman_fixed_t# *) pict->filter_paramscxx . . $ _Picture#filter_params., |
| 306 | pict->filter_nparamscxx . . $ _Picture#filter_nparams.); |
| 307 | pixman_image_set_source_clippingcxx . . $ pixman_image_set_source_clipping(ceec8f0a42591f2b).(image, TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!); |
| 308 | } |
| 309 | |
| 310 | static pixman_image_tcxx . . $ pixman_image_t# * |
| 311 | image_from_pict_internalcxx . . $ image_from_pict_internal(e7147fdeb64e84fd).(PicturePtrcxx . . $ PicturePtr# pict, Boolcxx . . $ Bool# has_clip, int *xoff, int *yoff, |
| 312 | Boolcxx . . $ Bool# is_alpha_map) |
| 313 | { |
| 314 | pixman_image_tcxx . . $ pixman_image_t# *image = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 315 | |
| 316 | if (!pict) { |
| 317 | *xoff = *yoff = 0; |
| 318 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 319 | } |
| 320 | |
| 321 | if (pict->pDrawablecxx . . $ _Picture#pDrawable.) { |
| 322 | image = create_bits_picturecxx . . $ create_bits_picture(1c39e58c9445bfd).(pict, has_clip, xoff, yoff); |
| 323 | } |
| 324 | else if (pict->pSourcePictcxx . . $ _Picture#pSourcePict.) { |
| 325 | SourcePictcxx . . $ SourcePict# *sp = pict->pSourcePictcxx . . $ _Picture#pSourcePict.; |
| 326 | |
| 327 | if (sp->typecxx . . $ _SourcePict#type. == SourcePictTypeSolidFillcxx . . $ `<external>/920586193036082439/picturestr.h:63:9`!) { |
| 328 | image = create_solid_fill_imagecxx . . $ create_solid_fill_image(a32df81c1470c4dc).(pict); |
| 329 | } |
| 330 | else { |
| 331 | PictGradientcxx . . $ PictGradient# *gradient = &pict->pSourcePictcxx . . $ _Picture#pSourcePict.->gradientcxx . . $ _SourcePict#gradient.; |
| 332 | |
| 333 | if (sp->typecxx . . $ _SourcePict#type. == SourcePictTypeLinearcxx . . $ `<external>/920586193036082439/picturestr.h:64:9`!) |
| 334 | image = create_linear_gradient_imagecxx . . $ create_linear_gradient_image(cc544089da9dcdb5).(gradient); |
| 335 | else if (sp->typecxx . . $ _SourcePict#type. == SourcePictTypeRadialcxx . . $ `<external>/920586193036082439/picturestr.h:65:9`!) |
| 336 | image = create_radial_gradient_imagecxx . . $ create_radial_gradient_image(cc544089da9dcdb5).(gradient); |
| 337 | else if (sp->typecxx . . $ _SourcePict#type. == SourcePictTypeConicalcxx . . $ `<external>/920586193036082439/picturestr.h:66:9`!) |
| 338 | image = create_conical_gradient_imagecxx . . $ create_conical_gradient_image(cc544089da9dcdb5).(gradient); |
| 339 | } |
| 340 | *xoff = *yoff = 0; |
| 341 | } else { |
| 342 | *xoff = *yoff = 0; |
| 343 | } |
| 344 | |
| 345 | if (image) |
| 346 | set_image_propertiescxx . . $ set_image_properties(efb7b5caa409e60).(image, pict, has_clip, xoff, yoff, is_alpha_map); |
| 347 | |
| 348 | return image; |
| 349 | } |
| 350 | |
| 351 | pixman_image_tcxx . . $ pixman_image_t# * |
| 352 | image_from_pictcxx . . $ `./sfb.h:39:9`!(PicturePtrcxx . . $ PicturePtr# pict, Boolcxx . . $ Bool# has_clip, int *xoff, int *yoff) |
| 353 | { |
| 354 | return image_from_pict_internalcxx . . $ image_from_pict_internal(e7147fdeb64e84fd).(pict, has_clip, xoff, yoff, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!); |
| 355 | } |
| 356 | |
| 357 | void |
| 358 | free_pixman_pictcxx . . $ free_pixman_pict(59481076768b36a0).(PicturePtrcxx . . $ PicturePtr# pict, pixman_image_tcxx . . $ pixman_image_t# * image) |
| 359 | { |
| 360 | if (image) |
| 361 | pixman_image_unrefcxx . . $ pixman_image_unref(1233b5bf7ad32299).(image); |
| 362 | } |