mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1209812 (follow-up) - Android bustage fix on a CLOSED TREE. r=me.
This commit is contained in:
parent
0c9a00ea4e
commit
7f2bf5e9cc
@ -405,7 +405,7 @@ GetDataSourceSurfaceFrom(android::sp<android::GraphicBuffer>& aGraphicBuffer,
|
||||
MOZ_ASSERT(aGraphicBuffer.get());
|
||||
|
||||
RefPtr<gfx::DataSourceSurface> surface =
|
||||
gfx::Factory::CreateDataSourceSurface(aSize, gfx::SurfaceFormat::R5G6B5);
|
||||
gfx::Factory::CreateDataSourceSurface(aSize, gfx::SurfaceFormat::R5G6B5_UINT16);
|
||||
if (NS_WARN_IF(!surface)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ HalFormatToSurfaceFormat(int aHalFormat, TextureFlags aFlags)
|
||||
case android::PIXEL_FORMAT_RGBX_8888:
|
||||
return swapRB ? gfx::SurfaceFormat::B8G8R8X8 : gfx::SurfaceFormat::R8G8B8X8;
|
||||
case android::PIXEL_FORMAT_RGB_565:
|
||||
return gfx::SurfaceFormat::R5G6B5;
|
||||
return gfx::SurfaceFormat::R5G6B5_UINT16;
|
||||
case HAL_PIXEL_FORMAT_YCbCr_422_SP:
|
||||
case HAL_PIXEL_FORMAT_YCrCb_420_SP:
|
||||
case HAL_PIXEL_FORMAT_YCbCr_422_I:
|
||||
@ -37,12 +37,12 @@ HalFormatToSurfaceFormat(int aHalFormat, TextureFlags aFlags)
|
||||
case HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED:
|
||||
#endif
|
||||
// Needs convert to RGB565
|
||||
return gfx::SurfaceFormat::R5G6B5;
|
||||
return gfx::SurfaceFormat::R5G6B5_UINT16;
|
||||
default:
|
||||
if (aHalFormat >= 0x100 && aHalFormat <= 0x1FF) {
|
||||
// Reserved range for HAL specific formats.
|
||||
// Needs convert to RGB565
|
||||
return gfx::SurfaceFormat::R5G6B5;
|
||||
return gfx::SurfaceFormat::R5G6B5_UINT16;
|
||||
} else {
|
||||
MOZ_CRASH("Unhandled HAL pixel format");
|
||||
return SurfaceFormat::UNKNOWN; // not reached
|
||||
|
Loading…
Reference in New Issue
Block a user