зеркало из https://github.com/mozilla/gecko-dev.git
Bug 742091 - Texture format detection broken by 740372. r=gwright
This commit is contained in:
Родитель
95c63ec702
Коммит
4a7033ba37
|
@ -851,20 +851,16 @@ public:
|
||||||
mUpdateFormat = gfxASurface::FormatFromContent(GetContentType());
|
mUpdateFormat = gfxASurface::FormatFromContent(GetContentType());
|
||||||
|
|
||||||
if (gUseBackingSurface) {
|
if (gUseBackingSurface) {
|
||||||
if (mUpdateFormat == gfxASurface::ImageFormatRGB24) {
|
if (mUpdateFormat != gfxASurface::ImageFormatARGB32) {
|
||||||
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
|
|
||||||
mUpdateFormat = gfxASurface::ImageFormatRGB16_565;
|
|
||||||
mShaderType = RGBXLayerProgramType;
|
mShaderType = RGBXLayerProgramType;
|
||||||
#else
|
|
||||||
mUpdateFormat = gfxASurface::ImageFormatARGB32;
|
|
||||||
mShaderType = RGBALayerProgramType;
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
mShaderType = RGBALayerProgramType;
|
mShaderType = RGBALayerProgramType;
|
||||||
}
|
}
|
||||||
Resize(aSize);
|
Resize(aSize);
|
||||||
} else {
|
} else {
|
||||||
if (mUpdateFormat == gfxASurface::ImageFormatRGB24) {
|
if (mUpdateFormat == gfxASurface::ImageFormatRGB16_565) {
|
||||||
|
mShaderType = RGBXLayerProgramType;
|
||||||
|
} else if (mUpdateFormat == gfxASurface::ImageFormatRGB24) {
|
||||||
// RGB24 means really RGBX for Thebes, which means we have to
|
// RGB24 means really RGBX for Thebes, which means we have to
|
||||||
// use the right shader and ignore the uninitialized alpha
|
// use the right shader and ignore the uninitialized alpha
|
||||||
// value.
|
// value.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче