mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 1362049 - Add R8G8 type in SurfaceFormat. r=bas.schouten
This R8G8 format will be used in NV12 image format. MozReview-Commit-ID: KNJFwOasVts
This commit is contained in:
parent
d39b6f432c
commit
3774d02876
@ -56,6 +56,8 @@ enum class SurfaceFormat : int8_t {
|
|||||||
// This one is a single-byte, so endianness isn't an issue.
|
// This one is a single-byte, so endianness isn't an issue.
|
||||||
A8,
|
A8,
|
||||||
|
|
||||||
|
R8G8,
|
||||||
|
|
||||||
// These ones are their own special cases.
|
// These ones are their own special cases.
|
||||||
YUV,
|
YUV,
|
||||||
NV12,
|
NV12,
|
||||||
|
@ -60,6 +60,8 @@ SurfaceFormatToWrImageFormat(gfx::SurfaceFormat aFormat) {
|
|||||||
return Some(WrImageFormat::RGB8);
|
return Some(WrImageFormat::RGB8);
|
||||||
case gfx::SurfaceFormat::A8:
|
case gfx::SurfaceFormat::A8:
|
||||||
return Some(WrImageFormat::A8);
|
return Some(WrImageFormat::A8);
|
||||||
|
case gfx::SurfaceFormat::R8G8:
|
||||||
|
return Some(WrImageFormat::RG8);
|
||||||
case gfx::SurfaceFormat::UNKNOWN:
|
case gfx::SurfaceFormat::UNKNOWN:
|
||||||
return Some(WrImageFormat::Invalid);
|
return Some(WrImageFormat::Invalid);
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user