I have filed https://bugzilla.mozilla.org/show_bug.cgi?id=878029 w/
patch for this.

On Mon, May 27, 2013 at 5:53 PM, Tim Chien <[email protected]> wrote:
> Hi all,
>
> As :roc suggests this is a product issue, rather a technical issue, I
> would like to bring this topic to dev-b2g so that we could agree what
> to do about it.
>
> So, every screen of every device comes with it's density.
> GetDefaultScaleInternal() is responsible to translate the raw dpi
> value and determine the correct device-pixel-ratio; i.e. device pixels
> per CSS pixel.
>
> A month ago, :mwu landed a patch [1] (thanks!) that basically do this:
>
> < 239dpi       : 1x
> < 337dpi       : 1.5x
>>= 337dpi      : 2x
>
> I wasn't realize the math were off until recently; after checking with
> AOSP doc [2], I found that AOSP did not specify a hard dpi range for
> each ratio, but give mean values:
>
> ~120dpi (ldpi) : 0.75x
> ~160dpi (mdpi) : 1x
> ~240dpi (hdpi) : 1.5x
> ~320dpi (xhdpi): 2x
>
> The problem is quite obvious if you compare the tables: ignoring ldpi
> screens, our calculation puts half of the Android hdpi (1.5x) devices
> out there as ratio=1x, and most of the xhdpi (2x) devices as
> ratio=1.5x.
>
> I would imagine this could result a lot of surprises to our hardware
> partners; with the same BSP, we somehow downgrade or upgrade their
> devices and make the UI too small (or too big)[3].
>
> I propose we fix this by amend the calculations to:
>
> < 200dpi       : 1x
> < 280dpi       : 1.5x
>>= 280dpi      : 2x
>
> If this sounds alright, I will file a bug and submit a patch. Thanks.
>
>
> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=845182
> [2] See 
> https://developer.android.com/guide/practices/screens_support.html#NewQualifiers
> on definition and
> https://developer.android.com/guide/practices/screens_support.html#DesigningResources
> on pixel ratio
> [3] You might not know it because Gaia comes with it's own
> |responsive.css| fix to resize the UIs -- which is the wrong approach
> and is due to be removed.
>
> --
> Tim Guan-tin Chien, Engineering Manager and Front-end Lead, Firefox
> OS, Mozilla Corp. (Taiwan)
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g



-- 
Tim Guan-tin Chien, Engineering Manager and Front-end Lead, Firefox
OS, Mozilla Corp. (Taiwan)
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to