Bug 989561 - Remove min size limitation since JB gonk r=gal

This commit is contained in:
Sotaro Ikeda 2014-03-30 22:23:52 -07:00
parent b7aa3baa96
commit 7d4ce23155

View File

@ -410,13 +410,16 @@ ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfx::IntSize& aSize,
SurfaceDescriptor* aBuffer)
{
// 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
// upload.
if (aSize.width < 64) {
if (aSize.width <= 0 || aSize.height <= 0) {
return false;
}
#if ANDROID_VERSION <= 15
// Adreno 200 fails to render gralloc textures with width < 64
// or with height < 32.
if (aSize.width < 64 || aSize.height < 32) {
return false;
}
#endif
PROFILER_LABEL("ShadowLayerForwarder", "PlatformAllocSurfaceDescriptor");
// Gralloc buffers are efficiently mappable as gfxImageSurface, so
// no need to check |aCaps & MAP_AS_IMAGE_SURFACE|.