From da33f3925951b89e2661d0d7bbdd457c7b440146 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 19 Feb 2023 22:57:36 +0900 Subject: [PATCH] Revert "ebiten: improve anti-alias test" This reverts commit ebb687562f6651072bc1574d51a7a83c67a0436e. Reason: test failures: https://github.com/hajimehoshi/ebiten/actions/runs/4216421788/jobs/7318236488x --- image_test.go | 39 +++------------------------------------ 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/image_test.go b/image_test.go index 0405aa59b..0d5afab4a 100644 --- a/image_test.go +++ b/image_test.go @@ -3885,43 +3885,10 @@ func TestImageAntiAlias(t *testing.T) { ebiten.BlendXor, ebiten.BlendLighter, } { - rnd := rand.New(rand.NewSource(0)) - max := func(x, y, z byte) byte { - if x >= y && x >= z { - return x - } - if y >= x && y >= z { - return y - } - return z - } - - dstPix := make([]byte, 4*w*h) - for i := 0; i < w*h; i++ { - n := rnd.Int() - r, g, b := byte(n), byte(n>>8), byte(n>>16) - a := max(r, g, b) - dstPix[4*i] = r - dstPix[4*i+1] = g - dstPix[4*i+2] = b - dstPix[4*i+3] = a - } - dst0.WritePixels(dstPix) - dst1.WritePixels(dstPix) - + dst0.Fill(color.RGBA{R: 0x24, G: 0x3f, B: 0x6a, A: 0x88}) + dst1.Fill(color.RGBA{R: 0x24, G: 0x3f, B: 0x6a, A: 0x88}) tmp.Clear() - - srcPix := make([]byte, 4*w*h) - for i := 0; i < w*h; i++ { - n := rnd.Int() - r, g, b := byte(n), byte(n>>8), byte(n>>16) - a := max(r, g, b) - srcPix[4*i] = r - srcPix[4*i+1] = g - srcPix[4*i+2] = b - srcPix[4*i+3] = a - } - src.WritePixels(srcPix) + src.Fill(color.RGBA{R: 0x85, G: 0xa3, B: 0x08, A: 0xd3}) // Create an actual result. op := &ebiten.DrawTrianglesOptions{}