зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1495025 - P4. Add COLOR_16 type r=nical
Depends on D7296 Differential Revision: https://phabricator.services.mozilla.com/D7316
This commit is contained in:
Родитель
96df06d643
Коммит
3903fac067
|
@ -118,6 +118,7 @@ SurfaceFormatForColorDepth(ColorDepth aColorDepth)
|
|||
break;
|
||||
case ColorDepth::COLOR_10:
|
||||
case ColorDepth::COLOR_12:
|
||||
case ColorDepth::COLOR_16:
|
||||
format = SurfaceFormat::A16;
|
||||
break;
|
||||
case ColorDepth::UNKNOWN:
|
||||
|
@ -139,6 +140,9 @@ BitDepthForColorDepth(ColorDepth aColorDepth)
|
|||
case ColorDepth::COLOR_12:
|
||||
depth = 12;
|
||||
break;
|
||||
case ColorDepth::COLOR_16:
|
||||
depth = 16;
|
||||
break;
|
||||
case ColorDepth::UNKNOWN:
|
||||
MOZ_ASSERT_UNREACHABLE("invalid color depth value");
|
||||
}
|
||||
|
@ -158,6 +162,9 @@ ColorDepthForBitDepth(uint8_t aBitDepth)
|
|||
case 12:
|
||||
depth = ColorDepth::COLOR_12;
|
||||
break;
|
||||
case 16:
|
||||
depth = ColorDepth::COLOR_16;
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSERT_UNREACHABLE("invalid color depth value");
|
||||
}
|
||||
|
@ -179,6 +186,8 @@ RescalingFactorForColorDepth(ColorDepth aColorDepth)
|
|||
case ColorDepth::COLOR_12:
|
||||
factor = 16;
|
||||
break;
|
||||
case ColorDepth::COLOR_16:
|
||||
break;
|
||||
case ColorDepth::UNKNOWN:
|
||||
MOZ_ASSERT_UNREACHABLE("invalid color depth value");
|
||||
}
|
||||
|
|
|
@ -106,6 +106,7 @@ enum class ColorDepth : uint8_t {
|
|||
COLOR_8,
|
||||
COLOR_10,
|
||||
COLOR_12,
|
||||
COLOR_16,
|
||||
UNKNOWN
|
||||
};
|
||||
|
||||
|
|
|
@ -864,6 +864,8 @@ static inline wr::WrColorDepth ToWrColorDepth(gfx::ColorDepth aColorDepth) {
|
|||
return wr::WrColorDepth::Color10;
|
||||
case gfx::ColorDepth::COLOR_12:
|
||||
return wr::WrColorDepth::Color12;
|
||||
case gfx::ColorDepth::COLOR_16:
|
||||
return wr::WrColorDepth::Color16;
|
||||
default:
|
||||
MOZ_ASSERT_UNREACHABLE("Tried to convert invalid color depth value.");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче