mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 845182 - Implement GetDefaultScaleInternal() on Gonk, r=roc
This commit is contained in:
parent
8def247b2a
commit
e8a2e1a574
@ -541,6 +541,17 @@ nsWindow::GetDPI()
|
||||
return NativeWindow()->xdpi;
|
||||
}
|
||||
|
||||
double
|
||||
nsWindow::GetDefaultScaleInternal()
|
||||
{
|
||||
double rawscale = GetDPI() / 192.0;
|
||||
if (rawscale < 1.25)
|
||||
return 1;
|
||||
else if (rawscale < 1.75)
|
||||
return 1.5;
|
||||
return 2;
|
||||
}
|
||||
|
||||
LayerManager *
|
||||
nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
||||
LayersBackend aBackendHint,
|
||||
|
@ -93,6 +93,7 @@ public:
|
||||
NS_IMETHOD MakeFullScreen(bool aFullScreen) /*MOZ_OVERRIDE*/;
|
||||
|
||||
virtual float GetDPI();
|
||||
virtual double GetDefaultScaleInternal();
|
||||
virtual mozilla::layers::LayerManager*
|
||||
GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
|
||||
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
||||
|
Loading…
Reference in New Issue
Block a user