Bug 773462 - Rename calls to ImageContainer::SetCurrentImage into ImageContainer::SetCurrentImageInTransaction when the method is used within a layer transaction. r=roc

This commit is contained in:
Nicolas Silva 2012-07-26 14:11:22 -04:00
parent 8f81f3b4d1
commit e2ab39fb96
4 changed files with 9 additions and 9 deletions

View File

@ -192,7 +192,7 @@ nsPluginInstanceOwner::GetImageContainer()
SharedTextureImage* pluginImage = static_cast<SharedTextureImage*>(img.get());
pluginImage->SetData(data);
container->SetCurrentImage(img);
container->SetCurrentImageInTransaction(img);
float xResolution = mObjectFrame->PresContext()->GetRootPresContext()->PresShell()->GetXResolution();
float yResolution = mObjectFrame->PresContext()->GetRootPresContext()->PresShell()->GetYResolution();
@ -1813,7 +1813,7 @@ already_AddRefed<ImageContainer> nsPluginInstanceOwner::GetImageContainerForVide
SharedTextureImage* pluginImage = static_cast<SharedTextureImage*>(img.get());
pluginImage->SetData(data);
container->SetCurrentImage(img);
container->SetCurrentImageInTransaction(img);
return container.forget();
}
@ -3714,7 +3714,7 @@ void nsPluginInstanceOwner::SetFrame(nsObjectFrame *aFrame)
AutoLockImage autoLock(container);
Image *image = autoLock.GetImage();
if (image && (image->GetFormat() == Image::MAC_IO_SURFACE) && mObjectFrame) {
// Undo what we did to the current image in SetCurrentImage().
// Undo what we did to the current image in SetCurrentImageInTransaction().
MacIOSurfaceImage *oglImage = static_cast<MacIOSurfaceImage*>(image);
oglImage->SetUpdateCallback(nsnull, nsnull);
oglImage->SetDestroyCallback(nsnull);
@ -3723,11 +3723,11 @@ void nsPluginInstanceOwner::SetFrame(nsObjectFrame *aFrame)
// to do ourselves what OnDestroyImage() would have done.
NS_RELEASE_THIS();
}
// Important! Unlock here otherwise SetCurrentImage will deadlock with
// Important! Unlock here otherwise SetCurrentImageInTransaction will deadlock with
// our lock if we have a RemoteImage.
autoLock.Unlock();
#endif
container->SetCurrentImage(nsnull);
container->SetCurrentImageInTransaction(nsnull);
}
// Scroll position listening is only required for Carbon event model plugins on Mac OS X.

View File

@ -755,7 +755,7 @@ PluginInstanceParent::GetImageContainer(ImageContainer** aContainer)
MacIOSurfaceImage::Data ioData;
ioData.mIOSurface = ioSurface;
ioImage->SetData(ioData);
container->SetCurrentImage(ioImage);
container->SetCurrentImageInTransaction(ioImage);
NS_IF_ADDREF(container);
*aContainer = container;
@ -770,7 +770,7 @@ PluginInstanceParent::GetImageContainer(ImageContainer** aContainer)
cairoData.mSize = mFrontSurface->GetSize();
pluginImage->SetData(cairoData);
container->SetCurrentImage(pluginImage);
container->SetCurrentImageInTransaction(pluginImage);
NS_IF_ADDREF(container);
*aContainer = container;

View File

@ -928,7 +928,7 @@ RasterImage::GetImageContainer(ImageContainer **_retval)
NS_ASSERTION(image->GetFormat() == cairoFormat, "Wrong format");
static_cast<CairoImage*>(image.get())->SetData(cairoData);
mImageContainer->SetCurrentImage(image);
mImageContainer->SetCurrentImageInTransaction(image);
*_retval = mImageContainer;
NS_ADDREF(*_retval);

View File

@ -3132,7 +3132,7 @@ ContainerState::SetupMaskLayer(Layer *aLayer, const FrameLayerBuilder::Clip& aCl
data.mSurface = surface;
data.mSize = surfaceSize;
static_cast<CairoImage*>(image.get())->SetData(data);
container->SetCurrentImage(image);
container->SetCurrentImageInTransaction(image);
GetMaskLayerImageCache()->PutImage(key, container);
}