зеркало из https://github.com/mozilla/pjs.git
Bug 740372 - Handle MOZ_GFX_OPTIMIZE_MOBILE in gfxASurface and gfx2DGlue format conversion functions. r=jrmuizel
This commit is contained in:
Родитель
94525f7594
Коммит
f2bf030c8b
|
@ -175,6 +175,7 @@ inline gfxMatrix ThebesMatrix(const Matrix &aMatrix)
|
|||
inline gfxASurface::gfxContentType ContentForFormat(const SurfaceFormat &aFormat)
|
||||
{
|
||||
switch (aFormat) {
|
||||
case FORMAT_R5G6B5:
|
||||
case FORMAT_B8G8R8X8:
|
||||
return gfxASurface::CONTENT_COLOR;
|
||||
case FORMAT_A8:
|
||||
|
@ -189,7 +190,11 @@ inline SurfaceFormat FormatForContent(gfxASurface::gfxContentType aContent)
|
|||
{
|
||||
switch (aContent) {
|
||||
case gfxASurface::CONTENT_COLOR:
|
||||
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
|
||||
return FORMAT_R5G6B5;
|
||||
#else
|
||||
return FORMAT_B8G8R8X8;
|
||||
#endif
|
||||
case gfxASurface::CONTENT_ALPHA:
|
||||
return FORMAT_A8;
|
||||
default:
|
||||
|
|
|
@ -460,7 +460,11 @@ gfxASurface::FormatFromContent(gfxASurface::gfxContentType type)
|
|||
return ImageFormatA8;
|
||||
case CONTENT_COLOR:
|
||||
default:
|
||||
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
|
||||
return ImageFormatRGB16_565;
|
||||
#else
|
||||
return ImageFormatRGB24;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче