mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 792966: Don't try to gralloc small buffers. r=kanru
This commit is contained in:
parent
ae2267c2fc
commit
739aae6070
@ -1822,7 +1822,7 @@ public:
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
if (gUseBackingSurface) {
|
||||
if (gUseBackingSurface && aSize.width >= 64) {
|
||||
mGLContext->MakeCurrent(true);
|
||||
PixelFormat format = PixelFormatForImage(mUpdateFormat);
|
||||
uint32_t usage = GraphicBuffer::USAGE_HW_TEXTURE |
|
||||
|
@ -294,6 +294,13 @@ ShadowLayerForwarder::PlatformAllocBuffer(const gfxIntSize& aSize,
|
||||
uint32_t aCaps,
|
||||
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) {
|
||||
return false;
|
||||
}
|
||||
SAMPLE_LABEL("ShadowLayerForwarder", "PlatformAllocBuffer");
|
||||
// Gralloc buffers are efficiently mappable as gfxImageSurface, so
|
||||
// no need to check |aCaps & MAP_AS_IMAGE_SURFACE|.
|
||||
|
Loading…
Reference in New Issue
Block a user