-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve SamplingOptions, and adding test cases #240
Comments
@pavpanchekha the above snippet (duplicated from inline comments) will go into the m124 release note when it gets written. For now, this snipplet is the only "migration" guide. If you could contribute some test code (to go into the pytest "tests" directory), preferably using images from skia's resources/images directory (most of our current tests are written that way, using test files from skia/resources/), that would be useful. |
Just to clarify—the old |
What kind of tests would be useful? Actually checking that images have been resized with various quality levels? Or just checking that drawing an image with a given sampling quality is possible? |
Yes: For now I have only added those which had m87 equivalent, and check that the 6 are valid: Some actually non-trivial tests closer to how users might use them would be nice. |
Just a nit—in your migration instructions above you wrote |
Yes, I realised the extra sk afterwards - 7f6e2bb - the readme is copied from the tests/tests_samplingoptions.py and should work literally (after adding some "skia." prefix, or doing |
Cc @pavpanchekha
Pull #236 now includes the complete SamplingOptions code from pull #181, plus a little extra/update. The last of the emulation of the previous FilterQuality is:
So it turns out that the 4 filterquality settings is equivalent to 5 of the 2×3x2 =12 SamplingOptions combo (one extra, because one of them depending on whether it is rendering through CPU or GPU), and we might as well add the whole thing.
Please test the build artefact when it finishes building.
Still missing are some test code, and possibly docstring documentation too.
The text was updated successfully, but these errors were encountered: