forked from AuroraMiddleware/gtk
Add a cross-fade node ref test
The Vulkan renderer doesn't pass this one either, currently.
This commit is contained in:
parent
eacdeec29e
commit
87aaa5685b
BIN
testsuite/gsk/cross-fade.node
Normal file
BIN
testsuite/gsk/cross-fade.node
Normal file
Binary file not shown.
BIN
testsuite/gsk/cross-fade.png
Normal file
BIN
testsuite/gsk/cross-fade.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
@ -258,6 +258,31 @@ blendmode (void)
|
||||
return container;
|
||||
}
|
||||
|
||||
static GskRenderNode *
|
||||
cross_fade (void)
|
||||
{
|
||||
GskRenderNode *child1;
|
||||
GskRenderNode *child2;
|
||||
GskRenderNode *transform;
|
||||
GskRenderNode *container;
|
||||
graphene_matrix_t matrix;
|
||||
|
||||
child1 = cairo ();
|
||||
child2 = cairo2 ();
|
||||
|
||||
graphene_matrix_init_translate (&matrix, &(const graphene_point3d_t) { 50, 50, 0 });
|
||||
transform = gsk_transform_node_new (child2, &matrix);
|
||||
gsk_render_node_unref (child2);
|
||||
child2 = transform;
|
||||
|
||||
container = gsk_cross_fade_node_new (child1, child2, 0.5);
|
||||
|
||||
gsk_render_node_unref (child1);
|
||||
gsk_render_node_unref (child2);
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
static const struct {
|
||||
const char *name;
|
||||
GskRenderNode * (* func) (void);
|
||||
@ -266,6 +291,7 @@ static const struct {
|
||||
{ "cairo.node", cairo },
|
||||
{ "repeat.node", repeat },
|
||||
{ "blendmode.node", blendmode },
|
||||
{ "cross-fade.node", cross_fade },
|
||||
};
|
||||
|
||||
/*** test setup ***/
|
||||
|
Loading…
Reference in New Issue
Block a user