Bug 782372 - Fix clang build. r=nical

This commit is contained in:
Matt Woodrow 2012-08-20 14:39:10 +12:00
parent fd524685f9
commit 430eb94bb3
13 changed files with 33 additions and 33 deletions

View File

@ -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<PlanarYCbCrImage*>(v->mImage.get());

View File

@ -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<mozilla::layers::PlanarYCbCrImage*>(v->mImage.get());

View File

@ -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<layers::Image> image = mImageContainer->CreateImage(&format, 1);

View File

@ -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<layers::Image> image = mImageContainer->CreateImage(&format, 1);
layers::PlanarYCbCrImage* videoImage = static_cast<layers::PlanarYCbCrImage*>(image.get());

View File

@ -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<MacIOSurfaceImage*>(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<MacIOSurfaceImage*>(image);
oglImage->SetUpdateCallback(nullptr, nullptr);

View File

@ -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<MacIOSurfaceImage*>(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<CairoImage*>(image.get());
CairoImage::Data cairoData;
cairoData.mSurface = mFrontSurface;

View File

@ -47,18 +47,18 @@ ImageFactory::CreateImage(const ImageFormat *aFormats,
return nullptr;
}
nsRefPtr<Image> 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<gfxImageSurface> newSurf =
new gfxImageSurface(mRemoteData->mBitmap.mData, mRemoteData->mSize, mRemoteData->mBitmap.mStride,
mRemoteData->mFormat == RemoteImageData::BGRX32 ?

View File

@ -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<SharedTextureImage*>(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<PlanarYCbCrImage*>(image);
const PlanarYCbCrImage::Data *data = YCbCrImage->GetData();
NS_ASSERTION(data, "Must be able to retrieve yuv data from image!");

View File

@ -67,7 +67,7 @@ public:
}
nsRefPtr<Image> image;
if (aFormats[0] == ImageFormat::PLANAR_YCBCR) {
if (aFormats[0] == PLANAR_YCBCR) {
image = new BasicPlanarYCbCrImage(aScaleHint, gfxPlatform::GetPlatform()->GetOffscreenFormat(), aRecycleBin);
return image.forget();
}

View File

@ -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<PlanarYCbCrImage*>(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<PlanarYCbCrImage*>(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<GonkIOSurfaceImage*>(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;
}

View File

@ -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<PlanarYCbCrImage*>(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<CairoImage*>(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<MacIOSurfaceImage*>(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<GonkIOSurfaceImage*>(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;
}

View File

@ -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<layers::Image> image = mImageContainer->CreateImage(&cairoFormat, 1);
NS_ASSERTION(image, "Failed to create Image");

View File

@ -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> image = container->CreateImage(&format, 1);
NS_ASSERTION(image, "Could not create image container for mask layer.");
CairoImage::Data data;