case GSK_CAIRO_NODE: case GSK_COLOR_NODE: case GSK_LINEAR_GRADIENT_NODE: case GSK_REPEATING_LINEAR_GRADIENT_NODE: case GSK_RADIAL_GRADIENT_NODE: case GSK_REPEATING_RADIAL_GRADIENT_NODE: case GSK_CONIC_GRADIENT_NODE: case GSK_BORDER_NODE: case GSK_TEXTURE_NODE: case GSK_INSET_SHADOW_NODE: case GSK_OUTSET_SHADOW_NODE: case GSK_COMPONENT_TRANSFER_NODE: case GSK_TEXT_NODE: case GSK_TEXTURE_SCALE_NODE: case GSK_OPACITY_NODE: case GSK_COLOR_MATRIX_NODE: case GSK_REPEAT_NODE: case GSK_SHADOW_NODE: case GSK_BLEND_NODE: case GSK_CROSS_FADE_NODE: case GSK_BLUR_NODE: case GSK_GL_SHADER_NODE: case GSK_MASK_NODE: case GSK_DEBUG_NODE: case GSK_CLIP_NODE: case GSK_ROUNDED_CLIP_NODE: case GSK_FILL_NODE: case GSK_STROKE_NODE: case GSK_SUBSURFACE_NODE: case GSK_COPY_NODE: case GSK_PASTE_NODE: case GSK_COMPOSITE_NODE: case GSK_ISOLATION_NODE: case GSK_DISPLACEMENT_NODE: case GSK_ARITHMETIC_NODE: case GSK_TURBULENCE_NODE: /* These all don't record anything, so we never
* encounter them */ case GSK_NOT_A_RENDER_NODE: default:
g_assert_not_reached ();
}
}
if (node && transform)
{
transform = gsk_transform_invert (transform); if (transform)
{
GskRenderNode *tmp;
switch (gsk_render_node_get_node_type (node))
{ case GSK_CAIRO_NODE: case GSK_COLOR_NODE: case GSK_LINEAR_GRADIENT_NODE: case GSK_REPEATING_LINEAR_GRADIENT_NODE: case GSK_RADIAL_GRADIENT_NODE: case GSK_REPEATING_RADIAL_GRADIENT_NODE: case GSK_CONIC_GRADIENT_NODE: case GSK_BORDER_NODE: case GSK_TEXTURE_NODE: case GSK_INSET_SHADOW_NODE: case GSK_OUTSET_SHADOW_NODE: case GSK_COMPONENT_TRANSFER_NODE: case GSK_CLIP_NODE: case GSK_ROUNDED_CLIP_NODE: case GSK_FILL_NODE: case GSK_STROKE_NODE: case GSK_TEXT_NODE: case GSK_DEBUG_NODE: case GSK_TEXTURE_SCALE_NODE: case GSK_SUBSURFACE_NODE: case GSK_TURBULENCE_NODE: /* keep recording */
result = gsk_render_replay_default (replay, node); break;
case GSK_OPACITY_NODE: case GSK_COLOR_MATRIX_NODE: case GSK_REPEAT_NODE: case GSK_SHADOW_NODE: case GSK_BLEND_NODE: case GSK_CROSS_FADE_NODE: case GSK_BLUR_NODE: case GSK_GL_SHADER_NODE: case GSK_MASK_NODE: case GSK_COMPOSITE_NODE: case GSK_DISPLACEMENT_NODE: case GSK_ARITHMETIC_NODE: /* record a new background for each child */
{ const PartialNode *saved = recording->nodes;
recording->nodes = NULL;
result = gsk_render_replay_default (replay, node);
recording->nodes = saved;
} break;
case GSK_ISOLATION_NODE: /* Do either of the 2 above, depending on flags */
{
GskIsolation isolations = gsk_isolation_node_get_isolations (node);
Recording saved = *recording; if (isolations & GSK_ISOLATION_BACKGROUND)
recording->nodes = NULL; if (isolations & GSK_ISOLATION_COPY_PASTE)
recording->copies = NULL;
result = gsk_render_replay_default (replay, node);
*recording = saved;
} break;
case GSK_TRANSFORM_NODE: /* store the transform so we can play it back later */
{
PartialNode partial = {
.node_type = GSK_TRANSFORM_NODE,
.transform = gsk_transform_node_get_transform (node),
.next = recording->nodes,
};
recording->nodes = &partial;
result = gsk_render_replay_default (replay, node);
recording->nodes = partial.next;
} break;
case GSK_CONTAINER_NODE: /* replay things node by node to allow copy nodes inside */
{
PartialNode partial = {
.node_type = GSK_CONTAINER_NODE,
.container = g_ptr_array_new_with_free_func ((GDestroyNotify) gsk_render_node_unref),
.next = recording->nodes,
};
gboolean changed;
guint i;
recording->nodes = &partial;
changed = FALSE;
for (i = 0;
i < gsk_container_node_get_n_children (node);
i++)
{
GskRenderNode *child = gsk_container_node_get_child (node, i);
GskRenderNode *replayed = gsk_render_replay_filter_node (replay, child);
if (replayed != child)
changed = TRUE;
if (replayed != NULL)
g_ptr_array_add (partial.container, replayed);
}
if (!changed)
result = gsk_render_node_ref (node); else
result = gsk_container_node_new ((GskRenderNode **) partial.container->pdata,
partial.container->len);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.