| 1 | /* GSK - The GTK Scene Kit |
| 2 | * |
| 3 | * Copyright 2025 Benjamin Otte |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Lesser General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Lesser General Public |
| 16 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #include "config.h"cxx . . $ `<file>/build/config.h`/ |
| 20 | |
| 21 | #include "gskcopypasteutilsprivate.h"cxx . . $ `<file>/gsk/gskcopypasteutilsprivate.h`/ |
| 22 | |
| 23 | #include "gskclipnode.h"cxx . . $ `<file>/gsk/gskclipnode.h`/ |
| 24 | #include "gskcolornode.h"cxx . . $ `<file>/gsk/gskcolornode.h`/ |
| 25 | #include "gskcontainernode.h"cxx . . $ `<file>/gsk/gskcontainernode.h`/ |
| 26 | #include "gskcopynode.h"cxx . . $ `<file>/gsk/gskcopynode.h`/ |
| 27 | #include "gskisolationnode.h"cxx . . $ `<file>/gsk/gskisolationnode.h`/ |
| 28 | #include "gskopacitynode.h"cxx . . $ `<file>/gsk/gskopacitynode.h`/ |
| 29 | #include "gskpastenode.h"cxx . . $ `<file>/gsk/gskpastenode.h`/ |
| 30 | #include "gskrenderreplay.h"cxx . . $ `<file>/gsk/gskrenderreplay.h`/ |
| 31 | #include "gsktransform.h"cxx . . $ `<file>/gsk/gsktransform.h`/ |
| 32 | #include "gsktransformnode.h"cxx . . $ `<file>/gsk/gsktransformnode.h`/ |
| 33 | |
| 34 | #ifdef GTK_COMPILATIONcxx . . $ `<built-in>:420:9`! |
| 35 | #include "gskrendernodeprivate.h"cxx . . $ `<file>/gsk/gskrendernodeprivate.h`/ |
| 36 | #endif |
| 37 | |
| 38 | typedef struct _PartialNodecxx . . $ _PartialNode# PartialNodecxx . . $ PartialNode#; |
| 39 | struct _PartialNodecxx . . $ _PartialNode# |
| 40 | { |
| 41 | GskRenderNodeTypecxx . . $ GskRenderNodeType# node_typecxx . . $ _PartialNode#node_type.; |
| 42 | unioncxx . . $ _PartialNode#$anonymous_type_0# { |
| 43 | GPtrArraycxx . . $ GPtrArray# *containercxx . . $ _PartialNode#$anonymous_type_0#container.; |
| 44 | GskTransformcxx . . $ GskTransform# *transformcxx . . $ _PartialNode#$anonymous_type_0#transform.; |
| 45 | }; |
| 46 | const PartialNodecxx . . $ PartialNode# *nextcxx . . $ _PartialNode#next.; |
| 47 | }; |
| 48 | |
| 49 | typedef struct _Copycxx . . $ _Copy# Copycxx . . $ Copy#; |
| 50 | struct _Copycxx . . $ _Copy# { |
| 51 | const PartialNodecxx . . $ PartialNode# *nodes_copiedcxx . . $ _Copy#nodes_copied.; |
| 52 | const Copycxx . . $ Copy# *next_copycxx . . $ _Copy#next_copy.; |
| 53 | }; |
| 54 | |
| 55 | typedef structcxx . . $ $anonymous_type_7409a6daf72a7718_1# { |
| 56 | const PartialNodecxx . . $ PartialNode# *nodescxx . . $ $anonymous_type_7409a6daf72a7718_1#nodes.; |
| 57 | const Copycxx . . $ Copy# *copiescxx . . $ $anonymous_type_7409a6daf72a7718_1#copies.; |
| 58 | } Recordingcxx . . $ Recording#; |
| 59 | |
| 60 | static GskRenderNodecxx . . $ GskRenderNode# * |
| 61 | replay_partial_nodecxx . . $ replay_partial_node(b9c9a31a32694d73). (const PartialNodecxx . . $ PartialNode# *replay) |
| 62 | { |
| 63 | GskRenderNodecxx . . $ GskRenderNode# *node = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 64 | GskTransformcxx . . $ GskTransform# *transform = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 65 | |
| 66 | for (; replay != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; replay = replay->nextcxx . . $ _PartialNode#next.) |
| 67 | { |
| 68 | switch (replay->node_typecxx . . $ _PartialNode#node_type.) |
| 69 | { |
| 70 | case GSK_TRANSFORM_NODEcxx . . $ GSK_TRANSFORM_NODE.: |
| 71 | { |
| 72 | GskTransformcxx . . $ GskTransform# *tmp; |
| 73 | GskRenderNodecxx . . $ GskRenderNode# *tmp_node; |
| 74 | if (node) |
| 75 | { |
| 76 | tmp_node = gsk_transform_node_newcxx . . $ gsk_transform_node_new(c1486167c8ed2500). (node, replay->transformcxx . . $ _PartialNode#$anonymous_type_0#transform.); |
| 77 | gsk_render_node_unrefcxx . . $ `gsk/gskrendernodeprivate.h:147:9`! (node); |
| 78 | node = tmp_node; |
| 79 | } |
| 80 | tmp = gsk_transform_transformcxx . . $ gsk_transform_transform(f70971864fbd6bc7). (gsk_transform_refcxx . . $ gsk_transform_ref(4f105202a92d0adf). (replay->transformcxx . . $ _PartialNode#$anonymous_type_0#transform.), transform); |
| 81 | gsk_transform_unrefcxx . . $ gsk_transform_unref(eb2f2791d5121f44). (transform); |
| 82 | transform = tmp; |
| 83 | } |
| 84 | break; |
| 85 | |
| 86 | case GSK_CONTAINER_NODEcxx . . $ GSK_CONTAINER_NODE.: |
| 87 | if (node) |
| 88 | { |
| 89 | g_ptr_array_addcxx . . $ g_ptr_array_add(3cd73f70a4ada9). (replay->containercxx . . $ _PartialNode#$anonymous_type_0#container., node); |
| 90 | node = gsk_container_node_newcxx . . $ gsk_container_node_new(c31473e88e25a1ce). ((GskRenderNodecxx . . $ GskRenderNode# **) replay->containercxx . . $ _PartialNode#$anonymous_type_0#container.->pdatacxx . . $ _GPtrArray#pdata., replay->containercxx . . $ _PartialNode#$anonymous_type_0#container.->lencxx . . $ _GPtrArray#len.); |
| 91 | g_ptr_array_set_sizecxx . . $ g_ptr_array_set_size(a9bf79c3455f9f51). (replay->containercxx . . $ _PartialNode#$anonymous_type_0#container., replay->containercxx . . $ _PartialNode#$anonymous_type_0#container.->lencxx . . $ _GPtrArray#len. - 1); |
| 92 | } |
| 93 | else |
| 94 | { |
| 95 | node = gsk_container_node_newcxx . . $ gsk_container_node_new(c31473e88e25a1ce). ((GskRenderNodecxx . . $ GskRenderNode# **) replay->containercxx . . $ _PartialNode#$anonymous_type_0#container.->pdatacxx . . $ _GPtrArray#pdata., replay->containercxx . . $ _PartialNode#$anonymous_type_0#container.->lencxx . . $ _GPtrArray#len.); |
| 96 | } |
| 97 | break; |
| 98 | |
| 99 | case GSK_CAIRO_NODEcxx . . $ GSK_CAIRO_NODE.: |
| 100 | case GSK_COLOR_NODEcxx . . $ GSK_COLOR_NODE.: |
| 101 | case GSK_LINEAR_GRADIENT_NODEcxx . . $ GSK_LINEAR_GRADIENT_NODE.: |
| 102 | case GSK_REPEATING_LINEAR_GRADIENT_NODEcxx . . $ GSK_REPEATING_LINEAR_GRADIENT_NODE.: |
| 103 | case GSK_RADIAL_GRADIENT_NODEcxx . . $ GSK_RADIAL_GRADIENT_NODE.: |
| 104 | case GSK_REPEATING_RADIAL_GRADIENT_NODEcxx . . $ GSK_REPEATING_RADIAL_GRADIENT_NODE.: |
| 105 | case GSK_CONIC_GRADIENT_NODEcxx . . $ GSK_CONIC_GRADIENT_NODE.: |
| 106 | case GSK_BORDER_NODEcxx . . $ GSK_BORDER_NODE.: |
| 107 | case GSK_TEXTURE_NODEcxx . . $ GSK_TEXTURE_NODE.: |
| 108 | case GSK_INSET_SHADOW_NODEcxx . . $ GSK_INSET_SHADOW_NODE.: |
| 109 | case GSK_OUTSET_SHADOW_NODEcxx . . $ GSK_OUTSET_SHADOW_NODE.: |
| 110 | case GSK_COMPONENT_TRANSFER_NODEcxx . . $ GSK_COMPONENT_TRANSFER_NODE.: |
| 111 | case GSK_TEXT_NODEcxx . . $ GSK_TEXT_NODE.: |
| 112 | case GSK_TEXTURE_SCALE_NODEcxx . . $ GSK_TEXTURE_SCALE_NODE.: |
| 113 | case GSK_OPACITY_NODEcxx . . $ GSK_OPACITY_NODE.: |
| 114 | case GSK_COLOR_MATRIX_NODEcxx . . $ GSK_COLOR_MATRIX_NODE.: |
| 115 | case GSK_REPEAT_NODEcxx . . $ GSK_REPEAT_NODE.: |
| 116 | case GSK_SHADOW_NODEcxx . . $ GSK_SHADOW_NODE.: |
| 117 | case GSK_BLEND_NODEcxx . . $ GSK_BLEND_NODE.: |
| 118 | case GSK_CROSS_FADE_NODEcxx . . $ GSK_CROSS_FADE_NODE.: |
| 119 | case GSK_BLUR_NODEcxx . . $ GSK_BLUR_NODE.: |
| 120 | case GSK_GL_SHADER_NODEcxx . . $ GSK_GL_SHADER_NODE.: |
| 121 | case GSK_MASK_NODEcxx . . $ GSK_MASK_NODE.: |
| 122 | case GSK_DEBUG_NODEcxx . . $ GSK_DEBUG_NODE.: |
| 123 | case GSK_CLIP_NODEcxx . . $ GSK_CLIP_NODE.: |
| 124 | case GSK_ROUNDED_CLIP_NODEcxx . . $ GSK_ROUNDED_CLIP_NODE.: |
| 125 | case GSK_FILL_NODEcxx . . $ GSK_FILL_NODE.: |
| 126 | case GSK_STROKE_NODEcxx . . $ GSK_STROKE_NODE.: |
| 127 | case GSK_SUBSURFACE_NODEcxx . . $ GSK_SUBSURFACE_NODE.: |
| 128 | case GSK_COPY_NODEcxx . . $ GSK_COPY_NODE.: |
| 129 | case GSK_PASTE_NODEcxx . . $ GSK_PASTE_NODE.: |
| 130 | case GSK_COMPOSITE_NODEcxx . . $ GSK_COMPOSITE_NODE.: |
| 131 | case GSK_ISOLATION_NODEcxx . . $ GSK_ISOLATION_NODE.: |
| 132 | case GSK_DISPLACEMENT_NODEcxx . . $ GSK_DISPLACEMENT_NODE.: |
| 133 | case GSK_ARITHMETIC_NODEcxx . . $ GSK_ARITHMETIC_NODE.: |
| 134 | /* These all don't record anything, so we never |
| 135 | * encounter them */ |
| 136 | case GSK_NOT_A_RENDER_NODEcxx . . $ GSK_NOT_A_RENDER_NODE.: |
| 137 | default: |
| 138 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`! (); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | if (node && transform) |
| 143 | { |
| 144 | transform = gsk_transform_invertcxx . . $ gsk_transform_invert(4f105202a92d0adf). (transform); |
| 145 | if (transform) |
| 146 | { |
| 147 | GskRenderNodecxx . . $ GskRenderNode# *tmp; |
| 148 | |
| 149 | if (node) |
| 150 | { |
| 151 | tmp = gsk_transform_node_newcxx . . $ gsk_transform_node_new(c1486167c8ed2500). (node, transform); |
| 152 | gsk_render_node_unrefcxx . . $ `gsk/gskrendernodeprivate.h:147:9`! (node); |
| 153 | node = tmp; |
| 154 | } |
| 155 | } |
| 156 | else |
| 157 | { |
| 158 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("Trying to paste non-invertible transform, ignoring."); |
| 159 | } |
| 160 | } |
| 161 | g_clear_pointercxx . . $ gpointer# (&transform, gsk_transform_unref); |
| 162 | if (node) |
| 163 | { |
| 164 | GskRenderNodecxx . . $ GskRenderNode# *tmp = gsk_isolation_node_newcxx . . $ gsk_isolation_node_new(8fcc69a6f5ddc1cc). (node, GSK_ISOLATION_ALLcxx . . $ GSK_ISOLATION_ALL.); |
| 165 | gsk_render_node_unrefcxx . . $ `gsk/gskrendernodeprivate.h:147:9`! (node); |
| 166 | node = tmp; |
| 167 | } |
| 168 | |
| 169 | return node; |
| 170 | } |
| 171 | |
| 172 | static GskRenderNodecxx . . $ GskRenderNode# * |
| 173 | replace_copy_paste_node_recordcxx . . $ replace_copy_paste_node_record(1000508e3bddf05a). (GskRenderReplaycxx . . $ GskRenderReplay# *replay, |
| 174 | GskRenderNodecxx . . $ GskRenderNode# *node, |
| 175 | gpointercxx . . $ gpointer# user_data) |
| 176 | { |
| 177 | Recordingcxx . . $ Recording# *recording = user_data; |
| 178 | GskRenderNodecxx . . $ GskRenderNode# *result; |
| 179 | |
| 180 | switch (gsk_render_node_get_node_typecxx . . $ _gsk_render_node_get_node_type(cc7e02951e736c62). (node)) |
| 181 | { |
| 182 | case GSK_CAIRO_NODEcxx . . $ GSK_CAIRO_NODE.: |
| 183 | case GSK_COLOR_NODEcxx . . $ GSK_COLOR_NODE.: |
| 184 | case GSK_LINEAR_GRADIENT_NODEcxx . . $ GSK_LINEAR_GRADIENT_NODE.: |
| 185 | case GSK_REPEATING_LINEAR_GRADIENT_NODEcxx . . $ GSK_REPEATING_LINEAR_GRADIENT_NODE.: |
| 186 | case GSK_RADIAL_GRADIENT_NODEcxx . . $ GSK_RADIAL_GRADIENT_NODE.: |
| 187 | case GSK_REPEATING_RADIAL_GRADIENT_NODEcxx . . $ GSK_REPEATING_RADIAL_GRADIENT_NODE.: |
| 188 | case GSK_CONIC_GRADIENT_NODEcxx . . $ GSK_CONIC_GRADIENT_NODE.: |
| 189 | case GSK_BORDER_NODEcxx . . $ GSK_BORDER_NODE.: |
| 190 | case GSK_TEXTURE_NODEcxx . . $ GSK_TEXTURE_NODE.: |
| 191 | case GSK_INSET_SHADOW_NODEcxx . . $ GSK_INSET_SHADOW_NODE.: |
| 192 | case GSK_OUTSET_SHADOW_NODEcxx . . $ GSK_OUTSET_SHADOW_NODE.: |
| 193 | case GSK_COMPONENT_TRANSFER_NODEcxx . . $ GSK_COMPONENT_TRANSFER_NODE.: |
| 194 | case GSK_CLIP_NODEcxx . . $ GSK_CLIP_NODE.: |
| 195 | case GSK_ROUNDED_CLIP_NODEcxx . . $ GSK_ROUNDED_CLIP_NODE.: |
| 196 | case GSK_FILL_NODEcxx . . $ GSK_FILL_NODE.: |
| 197 | case GSK_STROKE_NODEcxx . . $ GSK_STROKE_NODE.: |
| 198 | case GSK_TEXT_NODEcxx . . $ GSK_TEXT_NODE.: |
| 199 | case GSK_DEBUG_NODEcxx . . $ GSK_DEBUG_NODE.: |
| 200 | case GSK_TEXTURE_SCALE_NODEcxx . . $ GSK_TEXTURE_SCALE_NODE.: |
| 201 | case GSK_SUBSURFACE_NODEcxx . . $ GSK_SUBSURFACE_NODE.: |
| 202 | /* keep recording */ |
| 203 | result = gsk_render_replay_defaultcxx . . $ gsk_render_replay_default(cfb462e0e94c2da9). (replay, node); |
| 204 | break; |
| 205 | |
| 206 | case GSK_OPACITY_NODEcxx . . $ GSK_OPACITY_NODE.: |
| 207 | case GSK_COLOR_MATRIX_NODEcxx . . $ GSK_COLOR_MATRIX_NODE.: |
| 208 | case GSK_REPEAT_NODEcxx . . $ GSK_REPEAT_NODE.: |
| 209 | case GSK_SHADOW_NODEcxx . . $ GSK_SHADOW_NODE.: |
| 210 | case GSK_BLEND_NODEcxx . . $ GSK_BLEND_NODE.: |
| 211 | case GSK_CROSS_FADE_NODEcxx . . $ GSK_CROSS_FADE_NODE.: |
| 212 | case GSK_BLUR_NODEcxx . . $ GSK_BLUR_NODE.: |
| 213 | case GSK_GL_SHADER_NODEcxx . . $ GSK_GL_SHADER_NODE.: |
| 214 | case GSK_MASK_NODEcxx . . $ GSK_MASK_NODE.: |
| 215 | case GSK_COMPOSITE_NODEcxx . . $ GSK_COMPOSITE_NODE.: |
| 216 | case GSK_DISPLACEMENT_NODEcxx . . $ GSK_DISPLACEMENT_NODE.: |
| 217 | case GSK_ARITHMETIC_NODEcxx . . $ GSK_ARITHMETIC_NODE.: |
| 218 | /* record a new background for each child */ |
| 219 | { |
| 220 | const PartialNodecxx . . $ PartialNode# *saved = recording->nodescxx . . $ $anonymous_type_7409a6daf72a7718_1#nodes.; |
| 221 | recording->nodescxx . . $ $anonymous_type_7409a6daf72a7718_1#nodes. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 222 | result = gsk_render_replay_defaultcxx . . $ gsk_render_replay_default(cfb462e0e94c2da9). (replay, node); |
| 223 | recording->nodescxx . . $ $anonymous_type_7409a6daf72a7718_1#nodes. = saved; |
| 224 | } |
| 225 | break; |
| 226 | |
| 227 | case GSK_ISOLATION_NODEcxx . . $ GSK_ISOLATION_NODE.: |
| 228 | /* Do either of the 2 above, depending on flags */ |
| 229 | { |
| 230 | GskIsolationcxx . . $ GskIsolation# isolations = gsk_isolation_node_get_isolationscxx . . $ gsk_isolation_node_get_isolations(eddc29bd35361392). (node); |
| 231 | Recordingcxx . . $ Recording# saved = *recording; |
| 232 | if (isolations & GSK_ISOLATION_BACKGROUNDcxx . . $ GSK_ISOLATION_BACKGROUND.) |
| 233 | recording->nodescxx . . $ $anonymous_type_7409a6daf72a7718_1#nodes. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 234 | if (isolations & GSK_ISOLATION_COPY_PASTEcxx . . $ GSK_ISOLATION_COPY_PASTE.) |
| 235 | recording->copiescxx . . $ $anonymous_type_7409a6daf72a7718_1#copies. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 236 | result = gsk_render_replay_defaultcxx . . $ gsk_render_replay_default(cfb462e0e94c2da9). (replay, node); |
| 237 | *recording = saved; |
| 238 | } |
| 239 | break; |
| 240 | |
| 241 | case GSK_TRANSFORM_NODEcxx . . $ GSK_TRANSFORM_NODE.: |
| 242 | /* store the transform so we can play it back later */ |
| 243 | { |
| 244 | PartialNodecxx . . $ PartialNode# partial = { |
| 245 | .node_type = GSK_TRANSFORM_NODEcxx . . $ GSK_TRANSFORM_NODE., |
| 246 | .transform = gsk_transform_node_get_transformcxx . . $ gsk_transform_node_get_transform(8351df3da1f5e81b). (node), |
| 247 | .next = recording->nodescxx . . $ $anonymous_type_7409a6daf72a7718_1#nodes., |
| 248 | }; |
| 249 | recording->nodescxx . . $ $anonymous_type_7409a6daf72a7718_1#nodes. = &partial; |
| 250 | result = gsk_render_replay_defaultcxx . . $ gsk_render_replay_default(cfb462e0e94c2da9). (replay, node); |
| 251 | recording->nodescxx . . $ $anonymous_type_7409a6daf72a7718_1#nodes. = partial.nextcxx . . $ _PartialNode#next.; |
| 252 | } |
| 253 | break; |
| 254 | |
| 255 | case GSK_CONTAINER_NODEcxx . . $ GSK_CONTAINER_NODE.: |
| 256 | /* replay things node by node to allow copy nodes inside */ |
| 257 | { |
| 258 | PartialNodecxx . . $ PartialNode# partial = { |
| 259 | .node_type = GSK_CONTAINER_NODEcxx . . $ GSK_CONTAINER_NODE., |
| 260 | .container = g_ptr_array_new_with_free_funccxx . . $ g_ptr_array_new_with_free_func(e90788d6907589f2). ((GDestroyNotifycxx . . $ GDestroyNotify#) gsk_render_node_unrefcxx . . $ gsk_render_node_unref(8a7ac56c05ee882).), |
| 261 | .next = recording->nodescxx . . $ $anonymous_type_7409a6daf72a7718_1#nodes., |
| 262 | }; |
| 263 | gbooleancxx . . $ gboolean# changed; |
| 264 | guintcxx . . $ guint# i; |
| 265 | |
| 266 | recording->nodescxx . . $ $anonymous_type_7409a6daf72a7718_1#nodes. = &partial; |
| 267 | changed = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 268 | |
| 269 | for (i = 0; |
| 270 | i < gsk_container_node_get_n_childrencxx . . $ gsk_container_node_get_n_children(db414090f92336e). (node); |
| 271 | i++) |
| 272 | { |
| 273 | GskRenderNodecxx . . $ GskRenderNode# *child = gsk_container_node_get_childcxx . . $ gsk_container_node_get_child(c191154a0caa96fe). (node, i); |
| 274 | GskRenderNodecxx . . $ GskRenderNode# *replayed = gsk_render_replay_filter_nodecxx . . $ gsk_render_replay_filter_node(cfb462e0e94c2da9). (replay, child); |
| 275 | |
| 276 | if (replayed != child) |
| 277 | changed = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 278 | |
| 279 | if (replayed != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 280 | g_ptr_array_addcxx . . $ g_ptr_array_add(3cd73f70a4ada9). (partial.containercxx . . $ _PartialNode#$anonymous_type_0#container., replayed); |
| 281 | } |
| 282 | |
| 283 | if (!changed) |
| 284 | result = gsk_render_node_refcxx . . $ `gsk/gskrendernodeprivate.h:146:9`! (node); |
| 285 | else |
| 286 | result = gsk_container_node_newcxx . . $ gsk_container_node_new(c31473e88e25a1ce). ((GskRenderNodecxx . . $ GskRenderNode# **) partial.containercxx . . $ _PartialNode#$anonymous_type_0#container.->pdatacxx . . $ _GPtrArray#pdata., |
| 287 | partial.containercxx . . $ _PartialNode#$anonymous_type_0#container.->lencxx . . $ _GPtrArray#len.); |
| 288 | |
| 289 | g_ptr_array_unrefcxx . . $ g_ptr_array_unref(ebd7774315fc8cef). (partial.containercxx . . $ _PartialNode#$anonymous_type_0#container.); |
| 290 | recording->nodescxx . . $ $anonymous_type_7409a6daf72a7718_1#nodes. = partial.nextcxx . . $ _PartialNode#next.; |
| 291 | } |
| 292 | break; |
| 293 | |
| 294 | case GSK_COPY_NODEcxx . . $ GSK_COPY_NODE.: |
| 295 | /* keep recording on the current background, but also snapshot the |
| 296 | * current state for replay */ |
| 297 | { |
| 298 | Copycxx . . $ Copy# copy = { |
| 299 | .nodes_copied = recording->nodescxx . . $ $anonymous_type_7409a6daf72a7718_1#nodes., |
| 300 | .next_copy = recording->copiescxx . . $ $anonymous_type_7409a6daf72a7718_1#copies., |
| 301 | }; |
| 302 | /* skip this node */ |
| 303 | recording->copiescxx . . $ $anonymous_type_7409a6daf72a7718_1#copies. = © |
| 304 | result = gsk_render_replay_filter_nodecxx . . $ gsk_render_replay_filter_node(cfb462e0e94c2da9). (replay, gsk_copy_node_get_childcxx . . $ gsk_copy_node_get_child(7291b61cd45a2442). (node)); |
| 305 | recording->copiescxx . . $ $anonymous_type_7409a6daf72a7718_1#copies. = copy.next_copycxx . . $ _Copy#next_copy.; |
| 306 | } |
| 307 | break; |
| 308 | |
| 309 | case GSK_PASTE_NODEcxx . . $ GSK_PASTE_NODE.: |
| 310 | { |
| 311 | const Copycxx . . $ Copy# *paste = recording->copiescxx . . $ $anonymous_type_7409a6daf72a7718_1#copies.; |
| 312 | gsizecxx . . $ gsize# i; |
| 313 | |
| 314 | for (i = 0; i < gsk_paste_node_get_depthcxx . . $ gsk_paste_node_get_depth(e1e5afc9de513528). (node); i++) |
| 315 | { |
| 316 | if (paste == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 317 | break; |
| 318 | |
| 319 | paste = paste->next_copycxx . . $ _Copy#next_copy.; |
| 320 | } |
| 321 | |
| 322 | if (paste) |
| 323 | { |
| 324 | GskRenderNodecxx . . $ GskRenderNode# *child = replay_partial_nodecxx . . $ replay_partial_node(b9c9a31a32694d73). (paste->nodes_copiedcxx . . $ _Copy#nodes_copied.); |
| 325 | if (child) |
| 326 | { |
| 327 | graphene_rect_tcxx . . $ graphene_rect_t# bounds; |
| 328 | gsk_render_node_get_boundscxx . . $ gsk_render_node_get_bounds(155021e2f0384482). (node, &bounds); |
| 329 | result = gsk_clip_node_newcxx . . $ gsk_clip_node_new(9acb8d2d847b894f). (child, &bounds); |
| 330 | gsk_render_node_unrefcxx . . $ `gsk/gskrendernodeprivate.h:147:9`! (child); |
| 331 | } |
| 332 | else |
| 333 | result = gsk_container_node_newcxx . . $ gsk_container_node_new(c31473e88e25a1ce). (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 0); |
| 334 | } |
| 335 | else |
| 336 | result = gsk_container_node_newcxx . . $ gsk_container_node_new(c31473e88e25a1ce). (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 0); |
| 337 | } |
| 338 | break; |
| 339 | |
| 340 | case GSK_NOT_A_RENDER_NODEcxx . . $ GSK_NOT_A_RENDER_NODE.: |
| 341 | default: |
| 342 | g_assert_not_reachedcxx . . $ gchar# (); |
| 343 | } |
| 344 | |
| 345 | return result; |
| 346 | } |
| 347 | |
| 348 | GskRenderNodecxx . . $ GskRenderNode# * |
| 349 | gsk_render_node_replace_copy_pastecxx . . $ gsk_render_node_replace_copy_paste(265e97a70c649899). (GskRenderNodecxx . . $ GskRenderNode# *node) |
| 350 | { |
| 351 | Recordingcxx . . $ Recording# recording = { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }; |
| 352 | GskRenderReplaycxx . . $ GskRenderReplay# *replay; |
| 353 | GskRenderNodecxx . . $ GskRenderNode# *result; |
| 354 | |
| 355 | replay = gsk_render_replay_newcxx . . $ gsk_render_replay_new(ae818739bbfea2ec). (); |
| 356 | gsk_render_replay_set_node_filtercxx . . $ gsk_render_replay_set_node_filter(e4f46ebb41e3b8f4). (replay, |
| 357 | replace_copy_paste_node_recordcxx . . $ replace_copy_paste_node_record(1000508e3bddf05a)., |
| 358 | &recording, |
| 359 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 360 | result = gsk_render_replay_filter_nodecxx . . $ gsk_render_replay_filter_node(cfb462e0e94c2da9). (replay, node); |
| 361 | gsk_render_replay_freecxx . . $ gsk_render_replay_free(33995fb752715aac). (replay); |
| 362 | |
| 363 | if (result == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 364 | { |
| 365 | graphene_rect_tcxx . . $ graphene_rect_t# bounds; |
| 366 | gsk_render_node_get_boundscxx . . $ gsk_render_node_get_bounds(155021e2f0384482). (node, &bounds); |
| 367 | result = gsk_color_node_newcxx . . $ gsk_color_node_new(d3ed4ff81afe9e3). (&(GdkRGBAcxx . . $ GdkRGBA#) { 0, 0, 0, 0 }, &bounds); |
| 368 | } |
| 369 | |
| 370 | gsk_render_node_unrefcxx . . $ `gsk/gskrendernodeprivate.h:147:9`! (node); |
| 371 | |
| 372 | return result; |
| 373 | } |
| 374 |