[core] change std::array<uint16_t, 2> to mbgl::Size
This commit is contained in:
@@ -104,7 +104,7 @@ PremultipliedImage render(Map& map, OffscreenView& view) {
|
||||
result = view.readStillImage();
|
||||
});
|
||||
|
||||
while (!result.size()) {
|
||||
while (!result.valid()) {
|
||||
util::RunLoop::Get()->runOnce();
|
||||
}
|
||||
|
||||
@@ -132,24 +132,23 @@ void checkImage(const std::string& base,
|
||||
}
|
||||
|
||||
PremultipliedImage expected = decodeImage(expected_image);
|
||||
PremultipliedImage diff { expected.width, expected.height };
|
||||
PremultipliedImage diff { expected.size };
|
||||
|
||||
|
||||
#if !TEST_READ_ONLY
|
||||
util::write_file(base + "/actual.png", encodePNG(actual));
|
||||
#endif
|
||||
|
||||
ASSERT_EQ(expected.width, actual.width);
|
||||
ASSERT_EQ(expected.height, actual.height);
|
||||
ASSERT_EQ(expected.size, actual.size);
|
||||
|
||||
double pixels = mapbox::pixelmatch(actual.data.get(),
|
||||
expected.data.get(),
|
||||
expected.width,
|
||||
expected.height,
|
||||
expected.size.width,
|
||||
expected.size.height,
|
||||
diff.data.get(),
|
||||
pixelThreshold);
|
||||
|
||||
EXPECT_LE(pixels / (expected.width * expected.height), imageThreshold);
|
||||
EXPECT_LE(pixels / (expected.size.width * expected.size.height), imageThreshold);
|
||||
|
||||
#if !TEST_READ_ONLY
|
||||
util::write_file(base + "/diff.png", encodePNG(diff));
|
||||
|
||||
Reference in New Issue
Block a user