-
Notifications
You must be signed in to change notification settings - Fork 808
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
Fix CT drawing tests on ARM #1780
Conversation
@@ -21,7 +21,23 @@ | |||
|
|||
enum class ImageComparisonResult : unsigned int { Unknown = 0, Incomparable, Different, Same }; | |||
|
|||
enum struct ComparisonMode { Exact, Mask }; | |||
struct rgbaPixel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rgbaPixel [](start = 7, length = 9)
is there really literally no way to not move this into the header :P
@@ -470,7 +470,7 @@ TEXT_DRAW_TEST_F(CTLine, BasicDrawingTest, WhiteBackgroundTest<PixelByPixelImage | |||
CTRunDraw(run, context, {}); | |||
} | |||
|
|||
class Fonts : public WhiteBackgroundTest<PixelByPixelImageComparator<ComparisonMode::Mask>>, | |||
class Fonts : public WhiteBackgroundTest<PixelByPixelImageComparator<PixelComparisonModeMask<2300>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2300 [](start = 93, length = 4)
document why 2300, that's a heck of a lot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Given our reference images are 512x256, this is ~1.5%. The bigger concern is that we are not accounting for cases such as lines being completely at a different offset, etc. We need a more "fuzzy" proximity comparison than a pixel count. But that is an exercise for a different time.
In reply to: 97449301 [](ancestors = 97449301)
Changes more tests to be more lenient, and changes the templates for the image comparison to work with the Gtest macros
Fixes #1772
This change is