Checkboard - best practice

I do use a checkerboard png for amoled devices to avoid burn ins in low power mode.

Current solution

Generate a fitting checkerboard png for each device resolution and simply draw it once over the watchface like following:

if (checkerboard != null) {
	 dc.drawBitmap(0, minutes % 3, checkerboard);
}

Problem

Whenever I add new device I need to check the resolution and may need to create a new fitting checkerboard png.

Question

Does anyone use a more flexible solution? In the past I surely was thinking a 2x2 pixel png would solve the issue as well and then loop over the screen size and draw the 100s of small pngs. I assume in the past I did decide to use the large png solution as it works more efficiently but now I want to reevalute that.

Is there a better and more flexibel way to integrate the checkerboard png overlay solution for amoled devices? Like using a 100x100 png and draw it a few times depending on the device resolution to get a good compromise? What solution do you use?

  • I just use the png with the highest resolution for all devices.
    If you don't use up the graphics memory with other complex images, it shouldn't make much difference.

    Loops, etc. only cause unnecessary computing effort, although this would be kept within limits with a 100x100 pattern or so.

    On the other hand, new devices with new resolutions don't appear very often, so the effort involved in creating a specific png for them is not that great.

  • This is something my new build tooling handles. You could make a single checkerboard image and each device will have it scaled to its native resolution.

    https://github.com/semolina-solutions/rules_ciq

    See samples/device_parametrics, where a background image is scaled to each device's resolution.

    EDIT: Forgot to mention it's currently macOS only.