Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Render in fixed resolution (dpi / context scale) #232

Open
werediver opened this issue Jun 27, 2017 · 1 comment
Open

Render in fixed resolution (dpi / context scale) #232

werediver opened this issue Jun 27, 2017 · 1 comment

Comments

@werediver
Copy link

At the moment the framework renders test images in the device-specific resolution (dpi / context scale).

// the scale factor is set to the scale factor of the device’s main screen
UIGraphicsBeginImageContextWithOptions(bounds.size, NO, 0);

To allow snapshot-tests to run on both 2x and 3x devices we record and store snapshots for both 2x and 3x devices. This takes time and loads the repository with snapshots identical up to dpi.

I wonder whether the framework will work correctly with a fixed context scale (e.g. 2x)? Are there any pitfalls and/or performance issues?

I appreciate any comments regarding the question.

@werediver
Copy link
Author

The pull-request #166 enables context scale manipulation, thus also allowing device-independent snapshot tests.

Still the question is whether it's practical to do fixed-scale / device-independent snapshot tests?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant