forked from AuroraMiddleware/gtk
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:
parent
f999572e8f
commit
db548ee2a0
@ -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;
|
||||
|
39
testsuite/gsk/compare/scale-up-down.node
Normal file
39
testsuite/gsk/compare/scale-up-down.node
Normal 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; }
|
||||
}
|
||||
|
||||
}
|
BIN
testsuite/gsk/compare/scale-up-down.png
Normal file
BIN
testsuite/gsk/compare/scale-up-down.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 708 B |
@ -56,6 +56,7 @@ compare_render_tests = [
|
||||
'texture-url',
|
||||
'color-matrix-identity',
|
||||
'clip-nested1',
|
||||
'scale-up-down'
|
||||
]
|
||||
|
||||
renderers = [
|
||||
|
Loading…
Reference in New Issue
Block a user