Skip to content

Commit

Permalink
Bug 831438. Add pref for forcing 16bit on B2G. r=cjones
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jrmuizel committed Jan 17, 2013
1 parent 3334c5f commit 0530f23
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gfx/thebes/gfxAndroidPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "gfxAndroidPlatform.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/Preferences.h"

#include "gfxFT2FontList.h"
#include "gfxImageSurface.h"
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 0530f23

Please sign in to comment.