Bug 803299 - Respect gfx.android.rgb16.force pref. r=blassey

This commit is contained in:
Chris Lord
2013-05-28 18:50:16 +01:00
parent b43c75dc8a
commit 971abf679f
3 changed files with 22 additions and 1 deletions

View File

@@ -1385,7 +1385,7 @@ public class GeckoAppShell
* Returns the colour depth of the default screen. This will either be
* 24 or 16.
*/
public static int getScreenDepth() {
public static synchronized int getScreenDepth() {
if (sScreenDepth == 0 && getGeckoInterface() != null) {
switch (getGeckoInterface().getActivity().getWindowManager().getDefaultDisplay().getPixelFormat()) {
case PixelFormat.RGBA_8888 :
@@ -1402,6 +1402,15 @@ public class GeckoAppShell
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) {
if (getGeckoInterface() != null)
getGeckoInterface().setFullScreen(fullscreen);