зеркало из https://github.com/mozilla/gecko-dev.git
Bug 803299 - Respect gfx.android.rgb16.force pref. r=blassey
--HG-- extra : rebase_source : 98b5a8a1f719ad427034586798c71acd95e9e580
This commit is contained in:
Родитель
be07b8c1ba
Коммит
54ca4f9da5
|
@ -360,6 +360,9 @@ pref("gfx.displayport.strategy_vb.danger_y_incr", -1); // additional danger zone
|
||||||
// prediction bias strategy options
|
// prediction bias strategy options
|
||||||
pref("gfx.displayport.strategy_pb.threshold", -1); // velocity threshold in inches/frame
|
pref("gfx.displayport.strategy_pb.threshold", -1); // velocity threshold in inches/frame
|
||||||
|
|
||||||
|
// Allow 24-bit colour when the hardware supports it
|
||||||
|
pref("gfx.android.rgb16.force", false);
|
||||||
|
|
||||||
// don't allow JS to move and resize existing windows
|
// don't allow JS to move and resize existing windows
|
||||||
pref("dom.disable_window_move_resize", true);
|
pref("dom.disable_window_move_resize", true);
|
||||||
|
|
||||||
|
|
|
@ -2191,6 +2191,15 @@ abstract public class GeckoApp
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void connectGeckoLayerClient() {
|
protected void connectGeckoLayerClient() {
|
||||||
|
// See if we want to force 16-bit colour before doing anything
|
||||||
|
PrefsHelper.getPref("gfx.android.rgb16.force", new PrefsHelper.PrefHandlerBase() {
|
||||||
|
@Override public void prefValue(String pref, boolean force16bit) {
|
||||||
|
if (force16bit) {
|
||||||
|
GeckoAppShell.setScreenDepthOverride(16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
mLayerView.getLayerClient().notifyGeckoReady();
|
mLayerView.getLayerClient().notifyGeckoReady();
|
||||||
|
|
||||||
mLayerView.addTouchInterceptor(this);
|
mLayerView.addTouchInterceptor(this);
|
||||||
|
|
|
@ -1392,7 +1392,7 @@ public class GeckoAppShell
|
||||||
* Returns the colour depth of the default screen. This will either be
|
* Returns the colour depth of the default screen. This will either be
|
||||||
* 24 or 16.
|
* 24 or 16.
|
||||||
*/
|
*/
|
||||||
public static int getScreenDepth() {
|
public static synchronized int getScreenDepth() {
|
||||||
if (sScreenDepth == 0 && getGeckoInterface() != null) {
|
if (sScreenDepth == 0 && getGeckoInterface() != null) {
|
||||||
switch (getGeckoInterface().getActivity().getWindowManager().getDefaultDisplay().getPixelFormat()) {
|
switch (getGeckoInterface().getActivity().getWindowManager().getDefaultDisplay().getPixelFormat()) {
|
||||||
case PixelFormat.RGBA_8888 :
|
case PixelFormat.RGBA_8888 :
|
||||||
|
@ -1409,6 +1409,15 @@ public class GeckoAppShell
|
||||||
return sScreenDepth;
|
return sScreenDepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static synchronized void setScreenDepthOverride(int aScreenDepth) {
|
||||||
|
if (sScreenDepth != 0) {
|
||||||
|
Log.e(LOGTAG, "Tried to override screen depth after it's already been set");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sScreenDepth = aScreenDepth;
|
||||||
|
}
|
||||||
|
|
||||||
public static void setFullScreen(boolean fullscreen) {
|
public static void setFullScreen(boolean fullscreen) {
|
||||||
if (getGeckoInterface() != null)
|
if (getGeckoInterface() != null)
|
||||||
getGeckoInterface().setFullScreen(fullscreen);
|
getGeckoInterface().setFullScreen(fullscreen);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче