diff options
Diffstat (limited to 'gfx/2d')
-rw-r--r-- | gfx/2d/2D.h | 3 | ||||
-rw-r--r-- | gfx/2d/Types.h | 10 |
2 files changed, 3 insertions, 10 deletions
diff --git a/gfx/2d/2D.h b/gfx/2d/2D.h index c1fba3463..e2020dc9e 100644 --- a/gfx/2d/2D.h +++ b/gfx/2d/2D.h @@ -488,6 +488,9 @@ public: /** * Returns a DataSourceSurface with the same data as this one, but * guaranteed to have surface->GetType() == SurfaceType::DATA. + * + * The returning surface might be null, because of OOM or gfx device reset. + * The caller needs to do null-check before using it. */ virtual already_AddRefed<DataSourceSurface> GetDataSurface() override; diff --git a/gfx/2d/Types.h b/gfx/2d/Types.h index 7b1676ab2..3cdf077b1 100644 --- a/gfx/2d/Types.h +++ b/gfx/2d/Types.h @@ -65,18 +65,8 @@ enum class SurfaceFormat : int8_t { // This represents the unknown format. UNKNOWN, - // The following values are endian-independent synonyms. The _UINT32 suffix - // indicates that the name reflects the layout when viewed as a uint32_t - // value. -#if MOZ_LITTLE_ENDIAN A8R8G8B8_UINT32 = B8G8R8A8, // 0xAARRGGBB X8R8G8B8_UINT32 = B8G8R8X8 // 0x00RRGGBB -#elif MOZ_BIG_ENDIAN - A8R8G8B8_UINT32 = A8R8G8B8, // 0xAARRGGBB - X8R8G8B8_UINT32 = X8R8G8B8 // 0x00RRGGBB -#else -# error "bad endianness" -#endif }; inline bool IsOpaque(SurfaceFormat aFormat) |