Description
Now that both iOS and Android pass screenshot in-memory to native Bitmap, we could also do the mask rendering in native (at least for replay - error-screenshots would need to work as they do now).
In order to do that, we would store the output of WidgetFilter in the Screenshot class and and let the consumer decide whether they want to use the RawRGBAData+masks info (for replay native integrations) or compose the final PNG screenshot (for error screenshots.
This would also enable us to unit-test masks produced by WidgetFilter. If we wanted to, we could test the native mask rendering with "golden file approach", i.e. comparing the generated image to an expected one.
Description
Now that both iOS and Android pass screenshot in-memory to native Bitmap, we could also do the mask rendering in native (at least for replay - error-screenshots would need to work as they do now).
In order to do that, we would store the output of
WidgetFilterin theScreenshotclass and and let the consumer decide whether they want to use theRawRGBAData+masks info (for replay native integrations) or compose the final PNG screenshot (for error screenshots.This would also enable us to unit-test masks produced by
WidgetFilter. If we wanted to, we could test the native mask rendering with "golden file approach", i.e. comparing the generated image to an expected one.