diff --git a/content/media/nsBuiltinDecoderReader.cpp b/content/media/nsBuiltinDecoderReader.cpp index 7fefd6962b6..1b6ef548058 100644 --- a/content/media/nsBuiltinDecoderReader.cpp +++ b/content/media/nsBuiltinDecoderReader.cpp @@ -148,12 +148,12 @@ VideoData* VideoData::Create(nsVideoInfo& aInfo, aInfo.mDisplay)); // Currently our decoder only knows how to output to PLANAR_YCBCR // format. - ImageFormat format = ImageFormat::PLANAR_YCBCR; + ImageFormat format = PLANAR_YCBCR; v->mImage = aContainer->CreateImage(&format, 1); if (!v->mImage) { return nullptr; } - NS_ASSERTION(v->mImage->GetFormat() == ImageFormat::PLANAR_YCBCR, + NS_ASSERTION(v->mImage->GetFormat() == PLANAR_YCBCR, "Wrong format?"); PlanarYCbCrImage* videoImage = static_cast(v->mImage.get()); diff --git a/content/media/nsBuiltinDecoderReader.h b/content/media/nsBuiltinDecoderReader.h index 988e2044ea3..70982cf06f2 100644 --- a/content/media/nsBuiltinDecoderReader.h +++ b/content/media/nsBuiltinDecoderReader.h @@ -462,7 +462,7 @@ public: if (!v->mImage) { return nullptr; } - NS_ASSERTION(v->mImage->GetFormat() == mozilla::ImageFormat::PLANAR_YCBCR, + NS_ASSERTION(v->mImage->GetFormat() == mozilla::PLANAR_YCBCR, "Wrong format?"); mozilla::layers::PlanarYCbCrImage* vi = static_cast(v->mImage.get()); diff --git a/content/media/webrtc/MediaEngineDefault.cpp b/content/media/webrtc/MediaEngineDefault.cpp index 58b50c39786..b6ec456bf05 100644 --- a/content/media/webrtc/MediaEngineDefault.cpp +++ b/content/media/webrtc/MediaEngineDefault.cpp @@ -95,7 +95,7 @@ MediaEngineDefaultVideoSource::Start(SourceMediaStream* aStream, TrackID aID) mSource = aStream; // Allocate a single blank Image - ImageFormat format = ImageFormat::PLANAR_YCBCR; + ImageFormat format = PLANAR_YCBCR; mImageContainer = layers::LayerManager::CreateImageContainer(); nsRefPtr image = mImageContainer->CreateImage(&format, 1); diff --git a/content/media/webrtc/MediaEngineWebRTCVideo.cpp b/content/media/webrtc/MediaEngineWebRTCVideo.cpp index 22d5bb28f47..177dad09833 100644 --- a/content/media/webrtc/MediaEngineWebRTCVideo.cpp +++ b/content/media/webrtc/MediaEngineWebRTCVideo.cpp @@ -48,7 +48,7 @@ MediaEngineWebRTCVideoSource::DeliverFrame( } // Create a video frame and append it to the track. - ImageFormat format = ImageFormat::PLANAR_YCBCR; + ImageFormat format = PLANAR_YCBCR; nsRefPtr image = mImageContainer->CreateImage(&format, 1); layers::PlanarYCbCrImage* videoImage = static_cast(image.get()); diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp index 9c8a96d0cf7..84b8f222738 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.cpp +++ b/dom/plugins/base/nsPluginInstanceOwner.cpp @@ -211,7 +211,7 @@ nsPluginInstanceOwner::GetImageContainer() #ifdef XP_MACOSX AutoLockImage autoLock(container); Image* image = autoLock.GetImage(); - if (image && image->GetFormat() == ImageFormat::MAC_IO_SURFACE && mObjectFrame) { + if (image && image->GetFormat() == MAC_IO_SURFACE && mObjectFrame) { MacIOSurfaceImage *oglImage = static_cast(image); NS_ADDREF_THIS(); oglImage->SetUpdateCallback(&DrawPlugin, this); @@ -3717,7 +3717,7 @@ void nsPluginInstanceOwner::SetFrame(nsObjectFrame *aFrame) #ifdef XP_MACOSX AutoLockImage autoLock(container); Image *image = autoLock.GetImage(); - if (image && (image->GetFormat() == ImageFormat::MAC_IO_SURFACE) && mObjectFrame) { + if (image && (image->GetFormat() == MAC_IO_SURFACE) && mObjectFrame) { // Undo what we did to the current image in SetCurrentImageInTransaction(). MacIOSurfaceImage *oglImage = static_cast(image); oglImage->SetUpdateCallback(nullptr, nullptr); diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp index 3ce1f58bf6d..02f700caf39 100644 --- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -731,10 +731,10 @@ PluginInstanceParent::GetImageContainer(ImageContainer** aContainer) #endif return NS_ERROR_NOT_AVAILABLE; - ImageFormat format = ImageFormat::CAIRO_SURFACE; + ImageFormat format = CAIRO_SURFACE; #ifdef XP_MACOSX if (ioSurface) { - format = ImageFormat::MAC_IO_SURFACE; + format = MAC_IO_SURFACE; } #endif @@ -758,7 +758,7 @@ PluginInstanceParent::GetImageContainer(ImageContainer** aContainer) #ifdef XP_MACOSX if (ioSurface) { - NS_ASSERTION(image->GetFormat() == ImageFormat::MAC_IO_SURFACE, "Wrong format?"); + NS_ASSERTION(image->GetFormat() == MAC_IO_SURFACE, "Wrong format?"); MacIOSurfaceImage* ioImage = static_cast(image.get()); MacIOSurfaceImage::Data ioData; ioData.mIOSurface = ioSurface; @@ -771,7 +771,7 @@ PluginInstanceParent::GetImageContainer(ImageContainer** aContainer) } #endif - NS_ASSERTION(image->GetFormat() == ImageFormat::CAIRO_SURFACE, "Wrong format?"); + NS_ASSERTION(image->GetFormat() == CAIRO_SURFACE, "Wrong format?"); CairoImage* pluginImage = static_cast(image.get()); CairoImage::Data cairoData; cairoData.mSurface = mFrontSurface; diff --git a/gfx/layers/ImageContainer.cpp b/gfx/layers/ImageContainer.cpp index 9e0178e75f5..d0bd689075f 100644 --- a/gfx/layers/ImageContainer.cpp +++ b/gfx/layers/ImageContainer.cpp @@ -47,18 +47,18 @@ ImageFactory::CreateImage(const ImageFormat *aFormats, return nullptr; } nsRefPtr img; - if (FormatInList(aFormats, aNumFormats, ImageFormat::PLANAR_YCBCR)) { + if (FormatInList(aFormats, aNumFormats, PLANAR_YCBCR)) { img = new PlanarYCbCrImage(aRecycleBin); - } else if (FormatInList(aFormats, aNumFormats, ImageFormat::CAIRO_SURFACE)) { + } else if (FormatInList(aFormats, aNumFormats, CAIRO_SURFACE)) { img = new CairoImage(); - } else if (FormatInList(aFormats, aNumFormats, ImageFormat::SHARED_TEXTURE)) { + } else if (FormatInList(aFormats, aNumFormats, SHARED_TEXTURE)) { img = new SharedTextureImage(); #ifdef XP_MACOSX - } else if (FormatInList(aFormats, aNumFormats, ImageFormat::MAC_IO_SURFACE)) { + } else if (FormatInList(aFormats, aNumFormats, MAC_IO_SURFACE)) { img = new MacIOSurfaceImage(); #endif #ifdef MOZ_WIDGET_GONK - } else if (FormatInList(aFormats, aNumFormats, ImageFormat::GONK_IO_SURFACE)) { + } else if (FormatInList(aFormats, aNumFormats, GONK_IO_SURFACE)) { img = new GonkIOSurfaceImage(); #endif } @@ -239,7 +239,7 @@ ImageContainer::LockCurrentAsSurface(gfxIntSize *aSize, Image** aCurrentImage) return nullptr; } - if (mActiveImage->GetFormat() == ImageFormat::REMOTE_IMAGE_BITMAP) { + if (mActiveImage->GetFormat() == REMOTE_IMAGE_BITMAP) { nsRefPtr newSurf = new gfxImageSurface(mRemoteData->mBitmap.mData, mRemoteData->mSize, mRemoteData->mBitmap.mStride, mRemoteData->mFormat == RemoteImageData::BGRX32 ? @@ -549,4 +549,4 @@ RemoteBitmapImage::GetAsSurface() } } // namespace -} // namespace \ No newline at end of file +} // namespace diff --git a/gfx/layers/basic/BasicImageLayer.cpp b/gfx/layers/basic/BasicImageLayer.cpp index cdf07ee658f..32ccc641380 100644 --- a/gfx/layers/basic/BasicImageLayer.cpp +++ b/gfx/layers/basic/BasicImageLayer.cpp @@ -281,7 +281,7 @@ BasicShadowableImageLayer::Paint(gfxContext* aContext, Layer* aMaskLayer) ->Paint(aContext, nullptr); } - if (image->GetFormat() == ImageFormat::SHARED_TEXTURE && + if (image->GetFormat() == SHARED_TEXTURE && BasicManager()->GetParentBackendType() == mozilla::layers::LAYERS_OPENGL) { SharedTextureImage *sharedImage = static_cast(image); const SharedTextureImage::Data *data = sharedImage->GetData(); @@ -292,7 +292,7 @@ BasicShadowableImageLayer::Paint(gfxContext* aContext, Layer* aMaskLayer) return; } - if (image->GetFormat() == ImageFormat::PLANAR_YCBCR && BasicManager()->IsCompositingCheap()) { + if (image->GetFormat() == PLANAR_YCBCR && BasicManager()->IsCompositingCheap()) { PlanarYCbCrImage *YCbCrImage = static_cast(image); const PlanarYCbCrImage::Data *data = YCbCrImage->GetData(); NS_ASSERTION(data, "Must be able to retrieve yuv data from image!"); diff --git a/gfx/layers/basic/BasicImages.cpp b/gfx/layers/basic/BasicImages.cpp index 7391389e10d..deb6b400165 100644 --- a/gfx/layers/basic/BasicImages.cpp +++ b/gfx/layers/basic/BasicImages.cpp @@ -67,7 +67,7 @@ public: } nsRefPtr image; - if (aFormats[0] == ImageFormat::PLANAR_YCBCR) { + if (aFormats[0] == PLANAR_YCBCR) { image = new BasicPlanarYCbCrImage(aScaleHint, gfxPlatform::GetPlatform()->GetOffscreenFormat(), aRecycleBin); return image.forget(); } diff --git a/gfx/layers/ipc/ImageContainerChild.cpp b/gfx/layers/ipc/ImageContainerChild.cpp index dc71551688c..23ca12a16e4 100644 --- a/gfx/layers/ipc/ImageContainerChild.cpp +++ b/gfx/layers/ipc/ImageContainerChild.cpp @@ -121,7 +121,7 @@ void ImageContainerChild::DestroySharedImage(const SharedImage& aImage) bool ImageContainerChild::CopyDataIntoSharedImage(Image* src, SharedImage* dest) { - if ((src->GetFormat() == ImageFormat::PLANAR_YCBCR) && + if ((src->GetFormat() == PLANAR_YCBCR) && (dest->type() == SharedImage::TYUVImage)) { PlanarYCbCrImage *YCbCrImage = static_cast(src); const PlanarYCbCrImage::Data *data = YCbCrImage->GetData(); @@ -161,7 +161,7 @@ SharedImage* ImageContainerChild::CreateSharedImageFromData(Image* image) ++mActiveImageCount; - if (image->GetFormat() == ImageFormat::PLANAR_YCBCR ) { + if (image->GetFormat() == PLANAR_YCBCR ) { PlanarYCbCrImage *YCbCrImage = static_cast(image); const PlanarYCbCrImage::Data *data = YCbCrImage->GetData(); NS_ASSERTION(data, "Must be able to retrieve yuv data from image!"); @@ -202,7 +202,7 @@ SharedImage* ImageContainerChild::CreateSharedImageFromData(Image* image) "SharedImage type not set correctly"); return result; #ifdef MOZ_WIDGET_GONK - } else if (image->GetFormat() == ImageFormat::GONK_IO_SURFACE) { + } else if (image->GetFormat() == GONK_IO_SURFACE) { GonkIOSurfaceImage* gonkImage = static_cast(image); SharedImage* result = new SharedImage(gonkImage->GetSurfaceDescriptor()); return result; @@ -236,7 +236,7 @@ SharedImageCompatibleWith(SharedImage* aSharedImage, Image* aImage) { // TODO accept more image formats switch (aImage->GetFormat()) { - case ImageFormat::PLANAR_YCBCR: { + case PLANAR_YCBCR: { if (aSharedImage->type() != SharedImage::TYUVImage) { return false; } diff --git a/gfx/layers/opengl/ImageLayerOGL.cpp b/gfx/layers/opengl/ImageLayerOGL.cpp index ebef7ba33cf..f177a9cb3d9 100644 --- a/gfx/layers/opengl/ImageLayerOGL.cpp +++ b/gfx/layers/opengl/ImageLayerOGL.cpp @@ -244,12 +244,12 @@ ImageLayerOGL::RenderLayer(int, return; } - NS_ASSERTION(image->GetFormat() != ImageFormat::REMOTE_IMAGE_BITMAP, + NS_ASSERTION(image->GetFormat() != REMOTE_IMAGE_BITMAP, "Remote images aren't handled yet in OGL layers!"); NS_ASSERTION(mScaleMode == SCALE_NONE, "Scale modes other than none not handled yet in OGL layers!"); - if (image->GetFormat() == ImageFormat::PLANAR_YCBCR) { + if (image->GetFormat() == PLANAR_YCBCR) { PlanarYCbCrImage *yuvImage = static_cast(image); @@ -309,7 +309,7 @@ ImageLayerOGL::RenderLayer(int, // We shouldn't need to do this, but do it anyway just in case // someone else forgets. gl()->fActiveTexture(LOCAL_GL_TEXTURE0); - } else if (image->GetFormat() == ImageFormat::CAIRO_SURFACE) { + } else if (image->GetFormat() == CAIRO_SURFACE) { CairoImage *cairoImage = static_cast(image); @@ -385,7 +385,7 @@ ImageLayerOGL::RenderLayer(int, } #endif #ifdef XP_MACOSX - } else if (image->GetFormat() == ImageFormat::MAC_IO_SURFACE) { + } else if (image->GetFormat() == MAC_IO_SURFACE) { MacIOSurfaceImage *ioImage = static_cast(image); @@ -441,7 +441,7 @@ ImageLayerOGL::RenderLayer(int, gl()->fBindTexture(LOCAL_GL_TEXTURE_RECTANGLE_ARB, 0); #endif #ifdef MOZ_WIDGET_GONK - } else if (image->GetFormat() == ImageFormat::GONK_IO_SURFACE) { + } else if (image->GetFormat() == GONK_IO_SURFACE) { GonkIOSurfaceImage *ioImage = static_cast(image); if (!ioImage) { @@ -636,7 +636,7 @@ ImageLayerOGL::LoadAsTexture(GLuint aTextureUnit, gfxIntSize* aSize) return false; } - if (image->GetFormat() != ImageFormat::CAIRO_SURFACE) { + if (image->GetFormat() != CAIRO_SURFACE) { return false; } diff --git a/image/src/RasterImage.cpp b/image/src/RasterImage.cpp index 247461c0521..a44a13a6cb6 100644 --- a/image/src/RasterImage.cpp +++ b/image/src/RasterImage.cpp @@ -883,7 +883,7 @@ RasterImage::GetImageContainer(ImageContainer **_retval) mImageContainer = LayerManager::CreateImageContainer(); // Now create a CairoImage to display the surface. - ImageFormat cairoFormat = ImageFormat::CAIRO_SURFACE; + ImageFormat cairoFormat = CAIRO_SURFACE; nsRefPtr image = mImageContainer->CreateImage(&cairoFormat, 1); NS_ASSERTION(image, "Failed to create Image"); diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 1789c891043..6c192d6124b 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -3188,7 +3188,7 @@ ContainerState::SetupMaskLayer(Layer *aLayer, const FrameLayerBuilder::Clip& aCl // build the image and container container = aLayer->Manager()->CreateImageContainer(); NS_ASSERTION(container, "Could not create image container for mask layer."); - static const ImageFormat format = ImageFormat::CAIRO_SURFACE; + static const ImageFormat format = CAIRO_SURFACE; nsRefPtr image = container->CreateImage(&format, 1); NS_ASSERTION(image, "Could not create image container for mask layer."); CairoImage::Data data;