Bug 1778232 - ImageFormat::s/CAIRO_SURFACE/MOZ2D_SURFACE/. r=jrmuizel

Also remove comment that says it can't be off-main-thread.

Differential Revision: https://phabricator.services.mozilla.com/D151087
This commit is contained in:
Kelsey Gilbert 2022-07-06 07:46:17 +00:00
Родитель 98e17790db
Коммит 4f87812c0f
4 изменённых файлов: 6 добавлений и 10 удалений

Просмотреть файл

@ -176,7 +176,7 @@ ImageUtils::ImageUtils(layers::Image* aImage) : mImpl(nullptr) {
case mozilla::ImageFormat::NV_IMAGE:
mImpl = new YUVImpl(aImage);
break;
case mozilla::ImageFormat::CAIRO_SURFACE:
case mozilla::ImageFormat::MOZ2D_SURFACE:
default:
mImpl = new Impl(aImage);
}

Просмотреть файл

@ -826,7 +826,7 @@ bool GLBlitHelper::BlitImageToFramebuffer(layers::Image* const srcImage,
#else
return false;
#endif
case ImageFormat::CAIRO_SURFACE:
case ImageFormat::MOZ2D_SURFACE:
case ImageFormat::NV_IMAGE:
case ImageFormat::OVERLAY_IMAGE:
case ImageFormat::SHARED_RGB:

Просмотреть файл

@ -895,13 +895,13 @@ UniquePtr<uint8_t[]> NVImage::AllocateBuffer(uint32_t aSize) {
SourceSurfaceImage::SourceSurfaceImage(const gfx::IntSize& aSize,
gfx::SourceSurface* aSourceSurface)
: Image(nullptr, ImageFormat::CAIRO_SURFACE),
: Image(nullptr, ImageFormat::MOZ2D_SURFACE),
mSize(aSize),
mSourceSurface(aSourceSurface),
mTextureFlags(TextureFlags::DEFAULT) {}
SourceSurfaceImage::SourceSurfaceImage(gfx::SourceSurface* aSourceSurface)
: Image(nullptr, ImageFormat::CAIRO_SURFACE),
: Image(nullptr, ImageFormat::MOZ2D_SURFACE),
mSize(aSourceSurface->GetSize()),
mSourceSurface(aSourceSurface),
mTextureFlags(TextureFlags::DEFAULT) {}

Просмотреть файл

@ -33,19 +33,15 @@ enum class ImageFormat {
SHARED_RGB,
/**
* The CAIRO_SURFACE format creates a SourceSurfaceImage. All backends should
* The MOZ2D_SURFACE format creates a SourceSurfaceImage. All backends should
* support this format, because video rendering sometimes requires it.
*
* This format is useful even though a PaintedLayer could be used.
* It makes it easy to render a cairo surface when another Image format
* could be used. It can also avoid copying the surface data in some
* cases.
*
* Images in CAIRO_SURFACE format should only be created and
* manipulated on the main thread, since the underlying cairo surface
* is main-thread-only.
*/
CAIRO_SURFACE,
MOZ2D_SURFACE,
/**
* A MacIOSurface object.