[webkit-dev] Possible device scale factor emulation approaches?

Maciej Stachowiak mjs at apple.com
Fri Dec 7 09:01:18 PST 2012


On Dec 7, 2012, at 7:30 AM, Rick Byers <rbyers at chromium.org> wrote:

> > My goal is to have them visually remain the same size (because 1 CSS pixel
> > should still correspond to 1 device pixel, as DPR==1 for low-density
> > screens) along with the @media rules and -webkit-image-set elements (and
> > perhaps some other things) appropriate for DPR==2 taking effect (downscaling
> > larger 2x DPR images where applicable, so that they will look as if they
> > were rendered on a high-density screen.) Do you think this can be emulated
> > through the page settings, same was as the touch emulation
> > (WebCore::Settings::setTouchEventEmulationEnabled()) instead?
> 
> That's a super strange rendering mode.
> 
> Well, it turned out to work well for me, since all layout was done using the correct DPR (corresponding to the device), but still, the resources and media queries chose the right resources/styles, so the page looked as if it were displayed on a retina.
> 
> Are you sure this is what people want for testing purposes?  When we were testing all our high-dpi chrome work before we had retina hardware, we wanted everything to be 2x bigger so we could spot low resolution images (which was the most common issue).  If you use a 30" screen at twice the normal viewing distance, its basically the same as a real retina display.  If you're scaling things back down again then many issues will not be visible.

That's also what we did when adapting Safari for HiDPI support before we had Retina hardware. We used a mode that rendered everything at 2x scale on normal density displays, which resulted in magnification. We never even considered a downscaled 2x backing store, because it would not have been an accurate indicator of whether things look right at 2x. I do not think it would be a useful testing mode for web developers either.

Regards,
Maciej



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20121207/c562762e/attachment.html>


More information about the webkit-dev mailing list