diff --git a/.github/workflows/autotest.yml b/.github/workflows/autotest.yml index a0eded17..4e4c5836 100644 --- a/.github/workflows/autotest.yml +++ b/.github/workflows/autotest.yml @@ -8,7 +8,8 @@ on: jobs: mac: - runs-on: macos-latest + # the macos-latest may randomly give us macos-12.6.9 or macos-12.7.0 which may break the autotest. + runs-on: macos-13 steps: - name: Check Out Repo uses: actions/checkout@v3 diff --git a/test/baseline/version.json b/test/baseline/version.json index f04cb027..fb7605cf 100644 --- a/test/baseline/version.json +++ b/test/baseline/version.json @@ -53,7 +53,7 @@ "PixelMap_RGBA_to_RGBA_100_-100": "d010fb8", "PixelMap_RGBA_to_RGBA_100_100": "d010fb8", "PixelMap_RGBA_to_RGBA_1010102": "d010fb8", - "PixelMap_RGBA_to_RGBA_F16": "c433c89", + "PixelMap_RGBA_to_RGBA_F16": "926727c", "PixelMap_RGBA_to_bgr_A": "d010fb8", "PixelMap_RGBA_to_rgb_A": "d010fb8", "PixelMap_alpha_to_BGRA": "d010fb8", diff --git a/test/src/ReadPixelsTest.cpp b/test/src/ReadPixelsTest.cpp index 78664008..456ea2cd 100644 --- a/test/src/ReadPixelsTest.cpp +++ b/test/src/ReadPixelsTest.cpp @@ -41,7 +41,7 @@ TGFX_TEST(ReadPixelsTest, PixelMap) { auto RGBAInfo = ImageInfo::Make(width, height, ColorType::RGBA_8888, AlphaType::Unpremultiplied); auto byteSize = RGBAInfo.byteSize(); Buffer pixelsA(byteSize); - Buffer pixelsB(byteSize * 3); + Buffer pixelsB(byteSize * 2); auto result = codec->readPixels(RGBAInfo, pixelsA.data()); EXPECT_TRUE(result); @@ -65,10 +65,7 @@ TGFX_TEST(ReadPixelsTest, PixelMap) { CHECK_PIXELS(Gray8Info, pixelsB.data(), "PixelMap_RGBA_to_Gray8"); pixelsB.clear(); - // Set the rowByte != width * 8 to force the RGBA_F16 PixelMap converted to RGBA_8888 when doing - // baseline comparing. Otherwise, the RGBA_F16 data may have floating error when compared. - auto f16RowBytes = (width + 1) * 8; - auto RGBAF16Info = RGBAInfo.makeColorType(ColorType::RGBA_F16, f16RowBytes); + auto RGBAF16Info = RGBAInfo.makeColorType(ColorType::RGBA_F16); result = RGBAMap.readPixels(RGBAF16Info, pixelsB.data()); ASSERT_TRUE(result); CHECK_PIXELS(RGBAF16Info, pixelsB.data(), "PixelMap_RGBA_to_RGBA_F16");