This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository legacy-imlib2.
View the commit online.
commit a22b9b88c0466a8ad7c953f4d2f625083ae67ff6
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Wed Aug 9 20:34:30 2023 +0200
test_scale: Exercise non-AA path too
---
test/test_scale.cpp | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/test/test_scale.cpp b/test/test_scale.cpp
index b7d7e02..ebd5663 100644
--- a/test/test_scale.cpp
+++ b/test/test_scale.cpp
@@ -110,8 +110,9 @@ test_scale_1(int alpha)
w = imlib_image_get_width();
h = imlib_image_get_height();
- pr_info("Alpha=%d: %dx%d -> %dx%d (%d,%d)", alpha,
- w, h, w + i, h + j, i, j);
+ pr_info("AA=%d Alpha=%d: %dx%d -> %dx%d (%d,%d)",
+ imlib_context_get_anti_alias(), alpha,
+ w, h, w + i, h + j, i, j);
imo = imlib_create_cropped_scaled_image(0, 0, w, h, w + i, h + j);
ASSERT_TRUE(imo);
@@ -143,12 +144,13 @@ test_scale_1(int alpha)
}
static void
-test_scale_2(int alpha, int w0, int h0, int w1, int h1, int w2, int h2)
+test_scale_2a(int alpha, int w0, int h0, int w1, int h1, int w2, int h2)
{
int w, h;
Imlib_Image imi, imo;
- pr_info("Alpha=%d: %dx%d -> %d:%dx%d:%d", alpha, w0, h0, w1, w2, h1, h2);
+ pr_info("AA=%d Alpha=%d: %dx%d -> %d:%dx%d:%d",
+ imlib_context_get_anti_alias(), alpha, w0, h0, w1, w2, h1, h2);
imi = imlib_create_image(w0, h0);
ASSERT_TRUE(imi);
@@ -185,6 +187,15 @@ test_scale_2(int alpha, int w0, int h0, int w1, int h1, int w2, int h2)
imlib_free_image_and_decache();
}
+static void
+test_scale_2(int alpha, int w0, int h0, int w1, int h1, int w2, int h2)
+{
+ imlib_context_set_anti_alias(0);
+ test_scale_2a(alpha, w0, h0, w1, h1, w2, h2);
+ imlib_context_set_anti_alias(1);
+ test_scale_2a(alpha, w0, h0, w1, h1, w2, h2);
+}
+
TEST(SCALE, scale_1_rgb)
{
test_scale_1(0);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.