зеркало из https://github.com/mozilla/gecko-dev.git
Bug 831438 - Add pref for forcing 16bit on B2G. r=cjones, a=tef+
B2G currently tries to detect the depth of the screen and uses that as the offscreen format. This lets us override that for testing the 16bit path on 24bit devices.
This commit is contained in:
Родитель
473f59b284
Коммит
13c024d17e
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "gfxAndroidPlatform.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
#include "gfxFT2FontList.h"
|
||||
#include "gfxImageSurface.h"
|
||||
|
@ -102,6 +103,11 @@ gfxAndroidPlatform::gfxAndroidPlatform()
|
|||
mOffscreenFormat = mScreenDepth == 16
|
||||
? gfxASurface::ImageFormatRGB16_565
|
||||
: gfxASurface::ImageFormatRGB24;
|
||||
|
||||
if (Preferences::GetBool("gfx.android.rgb16.force", false)) {
|
||||
mOffscreenFormat = gfxASurface::ImageFormatRGB16_565;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
gfxAndroidPlatform::~gfxAndroidPlatform()
|
||||
|
|
Загрузка…
Ссылка в новой задаче