mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 869696 - Disable gralloc surfaces on the Geeksphone Peak. r=jrmuizel
Geeksphone distribute a known bad driver that has issues when using gralloc-backed surfaces. Performance is much better just falling back to shared memory.
This commit is contained in:
parent
e2823f5290
commit
dbafdacc87
@ -346,13 +346,28 @@ ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize,
|
||||
SurfaceDescriptor* aBuffer)
|
||||
{
|
||||
|
||||
// Check for Nexus S to disable gralloc. We only check for this on ICS or
|
||||
// earlier, in hopes that JB will work.
|
||||
// Check for devices that have problems with gralloc. We only check for
|
||||
// this on ICS or earlier, in hopes that JB will work.
|
||||
#if ANDROID_VERSION <= 15
|
||||
static bool checkedDevice = false;
|
||||
static bool disableGralloc = false;
|
||||
|
||||
if (!checkedDevice) {
|
||||
char propValue[PROPERTY_VALUE_MAX];
|
||||
property_get("ro.product.device", propValue, "None");
|
||||
|
||||
if (strcmp("crespo",propValue) == 0) {
|
||||
NS_WARNING("Nexus S has issues with gralloc, falling back to shmem");
|
||||
disableGralloc = true;
|
||||
} else if (strcmp("peak", propValue) == 0) {
|
||||
NS_WARNING("Geeksphone Peak has issues with gralloc, falling back to shmem");
|
||||
disableGralloc = true;
|
||||
}
|
||||
|
||||
checkedDevice = true;
|
||||
}
|
||||
|
||||
if (disableGralloc) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user