mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 950050 - Allow Gralloc surfaces on the Nexus S. r=nical,lissyx
This commit is contained in:
parent
5009e4ea63
commit
b34af3c7e4
@ -248,29 +248,8 @@ DisableGralloc(SurfaceFormat aFormat)
|
||||
if (aFormat == gfx::SurfaceFormat::A8) {
|
||||
return true;
|
||||
}
|
||||
#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;
|
||||
}
|
||||
|
||||
checkedDevice = true;
|
||||
}
|
||||
|
||||
if (disableGralloc) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -423,29 +423,6 @@ ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfx::IntSize& aSize,
|
||||
SurfaceDescriptor* aBuffer)
|
||||
{
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
checkedDevice = true;
|
||||
}
|
||||
|
||||
if (disableGralloc) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Some GL implementations fail to render gralloc textures with
|
||||
// width < 64. There's not much point in gralloc'ing buffers that
|
||||
// small anyway, so fall back on shared memory plus a texture
|
||||
|
Loading…
Reference in New Issue
Block a user