gl renderer: Fix scale computation

We don't need to just look at the scale of the new modelview matrix, but
at the one we get when multiplying the new one with the current one.

Test case attached.
This commit is contained in:
Timm Bäder 2019-06-02 10:25:39 +02:00
parent f999572e8f
commit db548ee2a0
4 changed files with 41 additions and 1 deletions

View File

@ -450,7 +450,7 @@ ops_push_modelview (RenderOpBuilder *builder,
entry->metadata.dx_before = builder->dx;
entry->metadata.dy_before = builder->dy;
extract_matrix_metadata (transform, &entry->metadata);
extract_matrix_metadata (entry->transform, &entry->metadata);
builder->dx = 0;
builder->dy = 0;

View File

@ -0,0 +1,39 @@
transform{
transform: scale(0.5);
child: transform {
transform: scale(8);
child: clip {
clip: 0 0 50 50 / 20 0 0 0;
child: color {
color: teal;
}
}
}
}
debug {
message: "clipped-out area";
child: container {
color { color: black;
bounds: 0 50 10 30; }
color { color: black;
bounds: 5 40 10 10; }
color { color: black;
bounds: 10 35 10 10; }
color { color: black;
bounds: 12 30 10 10; }
color { color: black;
bounds: 17 23 10 10; }
color { color: black;
bounds: 23 16 10 10; }
color { color: black;
bounds: 30 11 10 10; }
color { color: black;
bounds: 38 4 10 10; }
color { color: black;
bounds: 47 2 10 10; }
color { color: black;
bounds: 54 0 50 10; }
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

View File

@ -56,6 +56,7 @@ compare_render_tests = [
'texture-url',
'color-matrix-identity',
'clip-nested1',
'scale-up-down'
]
renderers = [