mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-07 06:25:03 +00:00
Merge pull request #4498 from harfbuzz/PaintColrLayers
[COLRv1] Optimize PaintColrLayers instead of PaintComposite
This commit is contained in:
commit
6506bd7e82
54 changed files with 509 additions and 619 deletions
|
@ -1516,10 +1516,12 @@ struct PaintComposite
|
|||
void paint_glyph (hb_paint_context_t *c) const
|
||||
{
|
||||
TRACE_PAINT (this);
|
||||
c->funcs->push_group (c->data);
|
||||
c->recurse (this+backdrop);
|
||||
c->funcs->push_group (c->data);
|
||||
c->recurse (this+src);
|
||||
c->funcs->pop_group (c->data, (hb_paint_composite_mode_t) (int) mode);
|
||||
c->funcs->pop_group (c->data, HB_PAINT_COMPOSITE_MODE_SRC_OVER);
|
||||
}
|
||||
|
||||
HBUINT8 format; /* format = 32 */
|
||||
|
@ -2802,9 +2804,7 @@ void PaintColrLayers::paint_glyph (hb_paint_context_t *c) const
|
|||
return;
|
||||
|
||||
const Paint &paint = paint_offset_lists.get_paint (i);
|
||||
c->funcs->push_group (c->data);
|
||||
c->recurse (paint);
|
||||
c->funcs->pop_group (c->data, HB_PAINT_COMPOSITE_MODE_SRC_OVER);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -231,9 +231,7 @@ _hb_ft_paint (hb_ft_paint_context_t *c,
|
|||
if (unlikely (!node.visit ((uintptr_t) other_paint.p)))
|
||||
continue;
|
||||
|
||||
c->funcs->push_group (c->data);
|
||||
c->recurse (other_paint);
|
||||
c->funcs->pop_group (c->data, HB_PAINT_COMPOSITE_MODE_SRC_OVER);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -453,10 +451,12 @@ _hb_ft_paint (hb_ft_paint_context_t *c,
|
|||
break;
|
||||
case FT_COLR_PAINTFORMAT_COMPOSITE:
|
||||
{
|
||||
c->funcs->push_group (c->data);
|
||||
c->recurse (paint.u.composite.backdrop_paint);
|
||||
c->funcs->push_group (c->data);
|
||||
c->recurse (paint.u.composite.source_paint);
|
||||
c->funcs->pop_group (c->data, _hb_ft_paint_composite_mode (paint.u.composite.composite_mode));
|
||||
c->funcs->pop_group (c->data, HB_PAINT_COMPOSITE_MODE_SRC_OVER);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
7
test/api/data-paint/README
Normal file
7
test/api/data-paint/README
Normal file
|
@ -0,0 +1,7 @@
|
|||
Imported from https://roettsch.es/var_colrv1.html
|
||||
|
||||
To be tested with
|
||||
https://github.com/googlefonts/color-fonts/blob/main/fonts/noto-glyf_colr_1.ttf
|
||||
|
||||
See description of each glyph in:
|
||||
https://github.com/googlefonts/color-fonts/blob/main/glyph_descriptions.md
|
1
test/api/data-paint/clipbox.test
Normal file
1
test/api/data-paint/clipbox.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/api/data-paint/color_circles_palette.test
Normal file
1
test/api/data-paint/color_circles_palette.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/api/data-paint/composite_mode.test
Normal file
1
test/api/data-paint/composite_mode.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/api/data-paint/extend_mode.test
Normal file
1
test/api/data-paint/extend_mode.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/api/data-paint/foreground_color.test
Normal file
1
test/api/data-paint/foreground_color.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/api/data-paint/gradient_p2_skewed.test
Normal file
1
test/api/data-paint/gradient_p2_skewed.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/api/data-paint/paint_rotate.test
Normal file
1
test/api/data-paint/paint_rotate.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/api/data-paint/paint_scale.test
Normal file
1
test/api/data-paint/paint_scale.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/api/data-paint/paint_skew.test
Normal file
1
test/api/data-paint/paint_skew.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/api/data-paint/paint_transform.test
Normal file
1
test/api/data-paint/paint_transform.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/api/data-paint/paint_translate.test
Normal file
1
test/api/data-paint/paint_translate.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/api/data-paint/sweep_varsweep.test
Normal file
1
test/api/data-paint/sweep_varsweep.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/api/data-paint/variable_alpha.test
Normal file
1
test/api/data-paint/variable_alpha.test
Normal file
|
@ -0,0 +1 @@
|
|||
|
15
test/api/results-paint/bad-154
Normal file
15
test/api/results-paint/bad-154
Normal file
|
@ -0,0 +1,15 @@
|
|||
start clip rectangle 0 500 500 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 159
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 128 128 128 102
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
97
test/api/results-paint/hand-10
Normal file
97
test/api/results-paint/hand-10
Normal file
|
@ -0,0 +1,97 @@
|
|||
start clip rectangle 64 -224 1.22e+03 928
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 13
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 0 0.977 0 0
|
||||
radial gradient
|
||||
p0 280 440 radius 0
|
||||
p1 280 440 radius 467
|
||||
colors 0
|
||||
0 186 141 104 255
|
||||
0.449 183 138 103 255
|
||||
0.809 173 130 100 255
|
||||
1 164 123 98 255
|
||||
end transform
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 14
|
||||
start transform 1 0 0 1 0 0
|
||||
linear gradient
|
||||
p0 231 -27
|
||||
p1 1.02e+03 -27
|
||||
p2 231 -815
|
||||
colors 0
|
||||
0 164 123 98 255
|
||||
1 164 123 98 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 15
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 145 103 77 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 16
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 30 136 229 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 21
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 145 103 77 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 16
|
||||
start transform 1 0 0 1 0 0
|
||||
linear gradient
|
||||
p0 669 776
|
||||
p1 180 -106
|
||||
p2 -212 1.26e+03
|
||||
colors 0
|
||||
0 100 181 246 255
|
||||
1 33 150 243 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 18
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 66 66 66 51
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 19
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 0 0.969 0 0
|
||||
radial gradient
|
||||
p0 588 198 radius 0
|
||||
p1 588 198 radius 342
|
||||
colors 0
|
||||
0 186 141 104 255
|
||||
0.449 183 138 103 255
|
||||
0.809 173 130 100 255
|
||||
1 164 123 98 255
|
||||
end transform
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 20
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 145 103 77 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
end clip
|
97
test/api/results-paint/hand-10.2
Normal file
97
test/api/results-paint/hand-10.2
Normal file
|
@ -0,0 +1,97 @@
|
|||
start clip rectangle 19 -224 1.4e+03 928
|
||||
start transform 1 0 0.2 1 0 0
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 13
|
||||
start transform 1 0 0.2 1 0 0
|
||||
start transform 1 0 0 0.977 0 0
|
||||
radial gradient
|
||||
p0 280 440 radius 0
|
||||
p1 280 440 radius 467
|
||||
colors 0
|
||||
0 186 141 104 255
|
||||
0.449 183 138 103 255
|
||||
0.809 173 130 100 255
|
||||
1 164 123 98 255
|
||||
end transform
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 14
|
||||
start transform 1 0 0.2 1 0 0
|
||||
linear gradient
|
||||
p0 231 -27
|
||||
p1 1.02e+03 -27
|
||||
p2 231 -815
|
||||
colors 0
|
||||
0 164 123 98 255
|
||||
1 164 123 98 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 15
|
||||
start transform 1 0 0.2 1 0 0
|
||||
solid 145 103 77 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 16
|
||||
start transform 1 0 0.2 1 0 0
|
||||
solid 30 136 229 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 21
|
||||
start transform 1 0 0.2 1 0 0
|
||||
solid 145 103 77 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 16
|
||||
start transform 1 0 0.2 1 0 0
|
||||
linear gradient
|
||||
p0 669 776
|
||||
p1 180 -106
|
||||
p2 -212 1.26e+03
|
||||
colors 0
|
||||
0 100 181 246 255
|
||||
1 33 150 243 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 18
|
||||
start transform 1 0 0.2 1 0 0
|
||||
solid 66 66 66 51
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 19
|
||||
start transform 1 0 0.2 1 0 0
|
||||
start transform 1 0 0 0.969 0 0
|
||||
radial gradient
|
||||
p0 588 198 radius 0
|
||||
p1 588 198 radius 342
|
||||
colors 0
|
||||
0 186 141 104 255
|
||||
0.449 183 138 103 255
|
||||
0.809 173 130 100 255
|
||||
1 164 123 98 255
|
||||
end transform
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 20
|
||||
start transform 1 0 0.2 1 0 0
|
||||
solid 145 103 77 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
end clip
|
|
@ -1,7 +1,3 @@
|
|||
# random seed: R02Sbe08283e5db998c0ef8db485be24c9ce
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip glyph 8
|
||||
solid 81 61 50 255
|
||||
end clip
|
|
@ -1,7 +1,3 @@
|
|||
# random seed: R02S44e738ad8b5a9b0616dbb5ed381f9fd9
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip glyph 12
|
||||
solid 81 61 50 255
|
||||
end clip
|
|
@ -1,7 +1,3 @@
|
|||
# random seed: R02Sf5cb8d4e67af171b27fea99802b3c8e6
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip glyph 16
|
||||
solid 81 61 50 255
|
||||
end clip
|
9
test/api/results-paint/test-02
Normal file
9
test/api/results-paint/test-02
Normal file
|
@ -0,0 +1,9 @@
|
|||
TAP version 14
|
||||
# random seed: R02S9d61dc15f8b01010ba25e1b3a743218d
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
# End of ot tests
|
||||
# End of paint tests
|
||||
# End of hb tests
|
||||
1..0
|
|
@ -1,7 +1,3 @@
|
|||
# random seed: R02S730db577e65f80492e3e3eacc21152fa
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
28
test/api/results-paint/test-106
Normal file
28
test/api/results-paint/test-106
Normal file
|
@ -0,0 +1,28 @@
|
|||
start clip rectangle 118 -22.9 750 750
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 0 255 127
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
push group
|
||||
start transform 1 0 0 1 1e+03 1e+03
|
||||
start transform 1 0.364 0.176 1 0 0
|
||||
start transform 1 0 0 1 -1e+03 -1e+03
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 255 165 0 178
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
end transform
|
||||
end transform
|
||||
pop group mode 4
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
24
test/api/results-paint/test-116
Normal file
24
test/api/results-paint/test-116
Normal file
|
@ -0,0 +1,24 @@
|
|||
start clip rectangle 250 250 950 950
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 0 255 127
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
push group
|
||||
start transform 1 0 0 1 200 200
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 255 165 0 178
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
pop group mode 4
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
|
@ -1,18 +1,12 @@
|
|||
# random seed: R02Sa683270814db638bd7dc3f8fc211d03f
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 0 0 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 0 0 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
push group
|
||||
start transform 1 0 0 1 333 667
|
||||
start transform 0.5 0 0 0.5 0 0
|
38
test/api/results-paint/test-154
Normal file
38
test/api/results-paint/test-154
Normal file
|
@ -0,0 +1,38 @@
|
|||
start clip rectangle 0 500 500 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
paint color glyph 164; acting as failed
|
||||
end transform
|
||||
start clip rectangle 100 100 900 900
|
||||
start transform 1 0 -0 1 0 0
|
||||
paint color glyph 93; acting as failed
|
||||
end transform
|
||||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 2
|
||||
start transform 1 0 0 1 0 0
|
||||
radial gradient
|
||||
p0 166 768 radius 0
|
||||
p1 166 768 radius 256
|
||||
colors 2
|
||||
0 0 128 0 255
|
||||
0.5 255 255 255 255
|
||||
1 255 0 0 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end clip
|
||||
end clip
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 159
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 128 128 128 102
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
|
@ -1,7 +1,3 @@
|
|||
# random seed: R02Sd7e42dc5034eae428f9fdf486603e319
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 100 250 1.2e+03 950
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
28
test/api/results-paint/test-175
Normal file
28
test/api/results-paint/test-175
Normal file
|
@ -0,0 +1,28 @@
|
|||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 0 1 150 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 174
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 128 0 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
start transform 1 0 0 1 -150 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 174
|
||||
start transform 1 0 0 1 0 0
|
||||
linear gradient
|
||||
p0 500 250
|
||||
p1 500 950
|
||||
p2 600 250
|
||||
colors 1
|
||||
0 255 0 0 255
|
||||
1 0 0 255 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
end transform
|
||||
end clip
|
|
@ -1,7 +1,3 @@
|
|||
# random seed: R02S68886e711ff0007004bb488f8b8c3904
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 100 250 900 950
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
|
@ -1,7 +1,3 @@
|
|||
# random seed: R02Se8a9546dc34a7e4d4f5c5e997ddcf0d8
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
|
@ -1,7 +1,3 @@
|
|||
# random seed: R02S4cc6a292019f2eefbbaf24127cc6b053
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
28
test/api/results-paint/testvf-106
Normal file
28
test/api/results-paint/testvf-106
Normal file
|
@ -0,0 +1,28 @@
|
|||
start clip rectangle 118 -22.9 750 750
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 0 255 127
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
push group
|
||||
start transform 1 0 0 1 1e+03 1e+03
|
||||
start transform 1 0.364 0.176 1 0 0
|
||||
start transform 1 0 0 1 -1e+03 -1e+03
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 255 165 0 178
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
end transform
|
||||
end transform
|
||||
pop group mode 4
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
24
test/api/results-paint/testvf-116
Normal file
24
test/api/results-paint/testvf-116
Normal file
|
@ -0,0 +1,24 @@
|
|||
start clip rectangle 250 250 950 950
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 0 255 127
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
push group
|
||||
start transform 1 0 0 1 200 200
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 255 165 0 178
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
pop group mode 4
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
|
@ -1,18 +1,12 @@
|
|||
# random seed: R02S486e6425a6369f1d079b0c273210d642
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 0 0 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 0 0 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
push group
|
||||
start transform 1 0 0 1 333 667
|
||||
start transform 0.5 0 0 0.5 0 0
|
38
test/api/results-paint/testvf-154
Normal file
38
test/api/results-paint/testvf-154
Normal file
|
@ -0,0 +1,38 @@
|
|||
start clip rectangle 0 500 500 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
paint color glyph 164; acting as failed
|
||||
end transform
|
||||
start clip rectangle 100 100 900 900
|
||||
start transform 1 0 -0 1 0 0
|
||||
paint color glyph 93; acting as failed
|
||||
end transform
|
||||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 2
|
||||
start transform 1 0 0 1 0 0
|
||||
radial gradient
|
||||
p0 166 768 radius 0
|
||||
p1 166 768 radius 256
|
||||
colors 2
|
||||
0 0 128 0 255
|
||||
0.5 255 255 255 255
|
||||
1 255 0 0 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end clip
|
||||
end clip
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 159
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 128 128 128 102
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
|
@ -1,7 +1,3 @@
|
|||
# random seed: R02S4f2af10d205b3b3052f5a575490a2686
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 100 250 1.2e+03 950
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
28
test/api/results-paint/testvf-175
Normal file
28
test/api/results-paint/testvf-175
Normal file
|
@ -0,0 +1,28 @@
|
|||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 0 1 150 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 174
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 128 0 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
start transform 1 0 0 1 -150 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 174
|
||||
start transform 1 0 0 1 0 0
|
||||
linear gradient
|
||||
p0 500 250
|
||||
p1 500 950
|
||||
p2 600 250
|
||||
colors 1
|
||||
0 255 0 0 255
|
||||
1 0 0 255 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
end transform
|
||||
end clip
|
|
@ -1,7 +1,3 @@
|
|||
# random seed: R02Sc96e8c0cb2d824e493d9a1088730d188
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 100 250 900 950
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
|
@ -1,7 +1,3 @@
|
|||
# random seed: R02See3981a17ce77670e1392178e6b57952
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
9
test/api/results-paint/testvf02
Normal file
9
test/api/results-paint/testvf02
Normal file
|
@ -0,0 +1,9 @@
|
|||
TAP version 14
|
||||
# random seed: R02S9d8a1a6293f81feeb807d06ea3a93793
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
# End of ot tests
|
||||
# End of paint tests
|
||||
# End of hb tests
|
||||
1..0
|
|
@ -1,17 +0,0 @@
|
|||
# random seed: R02S13f44c97ec7b03f792b3b9650a81b62a
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 0 500 500 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 159
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 128 128 128 102
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
|
@ -1,121 +0,0 @@
|
|||
# random seed: R02Se2b1d61d9c4fd31724517ef138cff8f6
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 64 -224 1.22e+03 928
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 13
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 0 0.977 0 0
|
||||
radial gradient
|
||||
p0 280 440 radius 0
|
||||
p1 280 440 radius 467
|
||||
colors 0
|
||||
0 186 141 104 255
|
||||
0.449 183 138 103 255
|
||||
0.809 173 130 100 255
|
||||
1 164 123 98 255
|
||||
end transform
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 14
|
||||
start transform 1 0 0 1 0 0
|
||||
linear gradient
|
||||
p0 231 -27
|
||||
p1 1.02e+03 -27
|
||||
p2 231 -815
|
||||
colors 0
|
||||
0 164 123 98 255
|
||||
1 164 123 98 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 15
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 145 103 77 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 16
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 30 136 229 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 21
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 145 103 77 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 16
|
||||
start transform 1 0 0 1 0 0
|
||||
linear gradient
|
||||
p0 669 776
|
||||
p1 180 -106
|
||||
p2 -212 1.26e+03
|
||||
colors 0
|
||||
0 100 181 246 255
|
||||
1 33 150 243 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 18
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 66 66 66 51
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 19
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 0 0.969 0 0
|
||||
radial gradient
|
||||
p0 588 198 radius 0
|
||||
p1 588 198 radius 342
|
||||
colors 0
|
||||
0 186 141 104 255
|
||||
0.449 183 138 103 255
|
||||
0.809 173 130 100 255
|
||||
1 164 123 98 255
|
||||
end transform
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 20
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 145 103 77 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
|
@ -1,121 +0,0 @@
|
|||
# random seed: R02S962715a93cddae2d3121a44b0e86cc22
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 19 -224 1.4e+03 928
|
||||
start transform 1 0 0.2 1 0 0
|
||||
push group
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 13
|
||||
start transform 1 0 0.2 1 0 0
|
||||
start transform 1 0 0 0.977 0 0
|
||||
radial gradient
|
||||
p0 280 440 radius 0
|
||||
p1 280 440 radius 467
|
||||
colors 0
|
||||
0 186 141 104 255
|
||||
0.449 183 138 103 255
|
||||
0.809 173 130 100 255
|
||||
1 164 123 98 255
|
||||
end transform
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 14
|
||||
start transform 1 0 0.2 1 0 0
|
||||
linear gradient
|
||||
p0 231 -27
|
||||
p1 1.02e+03 -27
|
||||
p2 231 -815
|
||||
colors 0
|
||||
0 164 123 98 255
|
||||
1 164 123 98 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 15
|
||||
start transform 1 0 0.2 1 0 0
|
||||
solid 145 103 77 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 16
|
||||
start transform 1 0 0.2 1 0 0
|
||||
solid 30 136 229 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 21
|
||||
start transform 1 0 0.2 1 0 0
|
||||
solid 145 103 77 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
push group
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 16
|
||||
start transform 1 0 0.2 1 0 0
|
||||
linear gradient
|
||||
p0 669 776
|
||||
p1 180 -106
|
||||
p2 -212 1.26e+03
|
||||
colors 0
|
||||
0 100 181 246 255
|
||||
1 33 150 243 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 18
|
||||
start transform 1 0 0.2 1 0 0
|
||||
solid 66 66 66 51
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 19
|
||||
start transform 1 0 0.2 1 0 0
|
||||
start transform 1 0 0 0.969 0 0
|
||||
radial gradient
|
||||
p0 588 198 radius 0
|
||||
p1 588 198 radius 342
|
||||
colors 0
|
||||
0 186 141 104 255
|
||||
0.449 183 138 103 255
|
||||
0.809 173 130 100 255
|
||||
1 164 123 98 255
|
||||
end transform
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 -0.2 1 0 0
|
||||
start clip glyph 20
|
||||
start transform 1 0 0.2 1 0 0
|
||||
solid 145 103 77 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
|
@ -1,30 +0,0 @@
|
|||
# random seed: R02S33079790f9ab4f19e7151add3612840f
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 118 -22.9 750 750
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 0 255 127
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
push group
|
||||
start transform 1 0 0 1 1e+03 1e+03
|
||||
start transform 1 0.364 0.176 1 0 0
|
||||
start transform 1 0 0 1 -1e+03 -1e+03
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 255 165 0 178
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
end transform
|
||||
end transform
|
||||
pop group mode 4
|
||||
end transform
|
||||
end clip
|
|
@ -1,26 +0,0 @@
|
|||
# random seed: R02S7f8abf2d360ae53f6acb756fc1d06756
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 250 250 950 950
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 0 255 127
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
push group
|
||||
start transform 1 0 0 1 200 200
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 255 165 0 178
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
pop group mode 4
|
||||
end transform
|
||||
end clip
|
|
@ -1,40 +0,0 @@
|
|||
# random seed: R02S46170a7a8abc3ad07d2b70fd08efc176
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 0 500 500 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
paint color glyph 164; acting as failed
|
||||
end transform
|
||||
start clip rectangle 100 100 900 900
|
||||
start transform 1 0 -0 1 0 0
|
||||
paint color glyph 93; acting as failed
|
||||
end transform
|
||||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 2
|
||||
start transform 1 0 0 1 0 0
|
||||
radial gradient
|
||||
p0 166 768 radius 0
|
||||
p1 166 768 radius 256
|
||||
colors 2
|
||||
0 0 128 0 255
|
||||
0.5 255 255 255 255
|
||||
1 255 0 0 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end clip
|
||||
end clip
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 159
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 128 128 128 102
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
|
@ -1,36 +0,0 @@
|
|||
# random seed: R02Se9d7defb0878dc8a90f62d9f42a715f3
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
start transform 1 0 0 1 150 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 174
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 128 0 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 0 1 -150 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 174
|
||||
start transform 1 0 0 1 0 0
|
||||
linear gradient
|
||||
p0 500 250
|
||||
p1 500 950
|
||||
p2 600 250
|
||||
colors 1
|
||||
0 255 0 0 255
|
||||
1 0 0 255 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
|
@ -1,30 +0,0 @@
|
|||
# random seed: R02S2b4bb33484e694adbb383b09d19251a7
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 118 -22.9 750 750
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 0 255 127
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
push group
|
||||
start transform 1 0 0 1 1e+03 1e+03
|
||||
start transform 1 0.364 0.176 1 0 0
|
||||
start transform 1 0 0 1 -1e+03 -1e+03
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 255 165 0 178
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
end transform
|
||||
end transform
|
||||
pop group mode 4
|
||||
end transform
|
||||
end clip
|
|
@ -1,26 +0,0 @@
|
|||
# random seed: R02S5710187ea075c431f16412c38d1f7407
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 250 250 950 950
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 0 255 127
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
push group
|
||||
start transform 1 0 0 1 200 200
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 3
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 255 165 0 178
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
pop group mode 4
|
||||
end transform
|
||||
end clip
|
|
@ -1,40 +0,0 @@
|
|||
# random seed: R02Sd6c6e6b574cffce42448b4c7ec9ed3b1
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 0 500 500 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
paint color glyph 164; acting as failed
|
||||
end transform
|
||||
start clip rectangle 100 100 900 900
|
||||
start transform 1 0 -0 1 0 0
|
||||
paint color glyph 93; acting as failed
|
||||
end transform
|
||||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 2
|
||||
start transform 1 0 0 1 0 0
|
||||
radial gradient
|
||||
p0 166 768 radius 0
|
||||
p1 166 768 radius 256
|
||||
colors 2
|
||||
0 0 128 0 255
|
||||
0.5 255 255 255 255
|
||||
1 255 0 0 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end clip
|
||||
end clip
|
||||
push group
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 159
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 128 128 128 102
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
|
@ -1,36 +0,0 @@
|
|||
# random seed: R02S4c022e014005a52e2898416210be4ddf
|
||||
# Start of hb tests
|
||||
# Start of paint tests
|
||||
# Start of ot tests
|
||||
start clip rectangle 0 0 1e+03 1e+03
|
||||
start transform 1 0 0 1 0 0
|
||||
push group
|
||||
start transform 1 0 0 1 150 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 174
|
||||
start transform 1 0 0 1 0 0
|
||||
solid 0 128 0 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
pop group mode 3
|
||||
push group
|
||||
start transform 1 0 0 1 -150 0
|
||||
start transform 1 0 -0 1 0 0
|
||||
start clip glyph 174
|
||||
start transform 1 0 0 1 0 0
|
||||
linear gradient
|
||||
p0 500 250
|
||||
p1 500 950
|
||||
p2 600 250
|
||||
colors 1
|
||||
0 255 0 0 255
|
||||
1 0 0 255 255
|
||||
end transform
|
||||
end clip
|
||||
end transform
|
||||
end transform
|
||||
pop group mode 3
|
||||
end transform
|
||||
end clip
|
|
@ -334,7 +334,7 @@ typedef struct {
|
|||
|
||||
/* To verify the rendering visually, use
|
||||
*
|
||||
* hb-view --font-slant SLANT --font-palette PALETTE FONT --glyphs [gidGID=0+1000]
|
||||
* hb-view --font-slant SLANT --font-palette PALETTE FONT --glyphs gidGID
|
||||
*
|
||||
* where GID is the glyph value of the test.
|
||||
*/
|
||||
|
@ -404,17 +404,19 @@ test_hb_paint (gconstpointer d,
|
|||
|
||||
/* Run
|
||||
*
|
||||
* GENERATE_DATA=1 G_TEST_SRCDIR=./test/api ./build/test/api/test-paint -p TESTCASE > test/api/results/OUTPUT
|
||||
* GENERATE_DATA=1 G_TEST_SRCDIR=./test/api ./build/test/api/test-paint
|
||||
*
|
||||
* to produce the expected results file.
|
||||
* to regenerate the expected output for all tests.
|
||||
*/
|
||||
file = g_test_build_filename (G_TEST_DIST, "results-paint", test->output, NULL);
|
||||
if (getenv ("GENERATE_DATA"))
|
||||
{
|
||||
g_print ("%s", data.string->str);
|
||||
exit (0);
|
||||
if (!g_file_set_contents (file, data.string->str, data.string->len, NULL))
|
||||
g_error ("Failed to write %s.", file);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
file = g_test_build_filename (G_TEST_DIST, "results", test->output, NULL);
|
||||
if (!g_file_get_contents (file, &buffer, &len, &error))
|
||||
{
|
||||
g_test_message ("File %s not found.", file);
|
||||
|
@ -429,22 +431,6 @@ test_hb_paint (gconstpointer d,
|
|||
else
|
||||
expected = g_strsplit (buffer, "\n", 0);
|
||||
|
||||
/* Strip initial comments */
|
||||
int i;
|
||||
for (i = 0; expected[i]; i++)
|
||||
{
|
||||
if (expected[i][0] != '#')
|
||||
{
|
||||
if (i > 0)
|
||||
{
|
||||
char **tmp = g_strdupv (expected + i);
|
||||
g_strfreev (expected);
|
||||
expected = tmp;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_strv_length (lines) != g_strv_length (expected))
|
||||
{
|
||||
g_test_message ("Unexpected number of lines in output (%d instead of %d):\n%s", g_strv_length (lines), g_strv_length (expected), data.string->str);
|
||||
|
|
Loading…
Add table
Reference in a new issue