Bug 1209812 (follow-up) - Android bustage fix on a CLOSED TREE. r=me.

This commit is contained in:
Nicholas Nethercote 2015-10-28 19:33:16 -07:00
parent 0c9a00ea4e
commit 7f2bf5e9cc
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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