mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
8f81f3b4d1
commit
e2ab39fb96
@ -192,7 +192,7 @@ nsPluginInstanceOwner::GetImageContainer()
|
|||||||
SharedTextureImage* pluginImage = static_cast<SharedTextureImage*>(img.get());
|
SharedTextureImage* pluginImage = static_cast<SharedTextureImage*>(img.get());
|
||||||
pluginImage->SetData(data);
|
pluginImage->SetData(data);
|
||||||
|
|
||||||
container->SetCurrentImage(img);
|
container->SetCurrentImageInTransaction(img);
|
||||||
|
|
||||||
float xResolution = mObjectFrame->PresContext()->GetRootPresContext()->PresShell()->GetXResolution();
|
float xResolution = mObjectFrame->PresContext()->GetRootPresContext()->PresShell()->GetXResolution();
|
||||||
float yResolution = mObjectFrame->PresContext()->GetRootPresContext()->PresShell()->GetYResolution();
|
float yResolution = mObjectFrame->PresContext()->GetRootPresContext()->PresShell()->GetYResolution();
|
||||||
@ -1813,7 +1813,7 @@ already_AddRefed<ImageContainer> nsPluginInstanceOwner::GetImageContainerForVide
|
|||||||
|
|
||||||
SharedTextureImage* pluginImage = static_cast<SharedTextureImage*>(img.get());
|
SharedTextureImage* pluginImage = static_cast<SharedTextureImage*>(img.get());
|
||||||
pluginImage->SetData(data);
|
pluginImage->SetData(data);
|
||||||
container->SetCurrentImage(img);
|
container->SetCurrentImageInTransaction(img);
|
||||||
|
|
||||||
return container.forget();
|
return container.forget();
|
||||||
}
|
}
|
||||||
@ -3714,7 +3714,7 @@ void nsPluginInstanceOwner::SetFrame(nsObjectFrame *aFrame)
|
|||||||
AutoLockImage autoLock(container);
|
AutoLockImage autoLock(container);
|
||||||
Image *image = autoLock.GetImage();
|
Image *image = autoLock.GetImage();
|
||||||
if (image && (image->GetFormat() == Image::MAC_IO_SURFACE) && mObjectFrame) {
|
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);
|
MacIOSurfaceImage *oglImage = static_cast<MacIOSurfaceImage*>(image);
|
||||||
oglImage->SetUpdateCallback(nsnull, nsnull);
|
oglImage->SetUpdateCallback(nsnull, nsnull);
|
||||||
oglImage->SetDestroyCallback(nsnull);
|
oglImage->SetDestroyCallback(nsnull);
|
||||||
@ -3723,11 +3723,11 @@ void nsPluginInstanceOwner::SetFrame(nsObjectFrame *aFrame)
|
|||||||
// to do ourselves what OnDestroyImage() would have done.
|
// to do ourselves what OnDestroyImage() would have done.
|
||||||
NS_RELEASE_THIS();
|
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.
|
// our lock if we have a RemoteImage.
|
||||||
autoLock.Unlock();
|
autoLock.Unlock();
|
||||||
#endif
|
#endif
|
||||||
container->SetCurrentImage(nsnull);
|
container->SetCurrentImageInTransaction(nsnull);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scroll position listening is only required for Carbon event model plugins on Mac OS X.
|
// Scroll position listening is only required for Carbon event model plugins on Mac OS X.
|
||||||
|
@ -755,7 +755,7 @@ PluginInstanceParent::GetImageContainer(ImageContainer** aContainer)
|
|||||||
MacIOSurfaceImage::Data ioData;
|
MacIOSurfaceImage::Data ioData;
|
||||||
ioData.mIOSurface = ioSurface;
|
ioData.mIOSurface = ioSurface;
|
||||||
ioImage->SetData(ioData);
|
ioImage->SetData(ioData);
|
||||||
container->SetCurrentImage(ioImage);
|
container->SetCurrentImageInTransaction(ioImage);
|
||||||
|
|
||||||
NS_IF_ADDREF(container);
|
NS_IF_ADDREF(container);
|
||||||
*aContainer = container;
|
*aContainer = container;
|
||||||
@ -770,7 +770,7 @@ PluginInstanceParent::GetImageContainer(ImageContainer** aContainer)
|
|||||||
cairoData.mSize = mFrontSurface->GetSize();
|
cairoData.mSize = mFrontSurface->GetSize();
|
||||||
pluginImage->SetData(cairoData);
|
pluginImage->SetData(cairoData);
|
||||||
|
|
||||||
container->SetCurrentImage(pluginImage);
|
container->SetCurrentImageInTransaction(pluginImage);
|
||||||
|
|
||||||
NS_IF_ADDREF(container);
|
NS_IF_ADDREF(container);
|
||||||
*aContainer = container;
|
*aContainer = container;
|
||||||
|
@ -928,7 +928,7 @@ RasterImage::GetImageContainer(ImageContainer **_retval)
|
|||||||
|
|
||||||
NS_ASSERTION(image->GetFormat() == cairoFormat, "Wrong format");
|
NS_ASSERTION(image->GetFormat() == cairoFormat, "Wrong format");
|
||||||
static_cast<CairoImage*>(image.get())->SetData(cairoData);
|
static_cast<CairoImage*>(image.get())->SetData(cairoData);
|
||||||
mImageContainer->SetCurrentImage(image);
|
mImageContainer->SetCurrentImageInTransaction(image);
|
||||||
|
|
||||||
*_retval = mImageContainer;
|
*_retval = mImageContainer;
|
||||||
NS_ADDREF(*_retval);
|
NS_ADDREF(*_retval);
|
||||||
|
@ -3132,7 +3132,7 @@ ContainerState::SetupMaskLayer(Layer *aLayer, const FrameLayerBuilder::Clip& aCl
|
|||||||
data.mSurface = surface;
|
data.mSurface = surface;
|
||||||
data.mSize = surfaceSize;
|
data.mSize = surfaceSize;
|
||||||
static_cast<CairoImage*>(image.get())->SetData(data);
|
static_cast<CairoImage*>(image.get())->SetData(data);
|
||||||
container->SetCurrentImage(image);
|
container->SetCurrentImageInTransaction(image);
|
||||||
|
|
||||||
GetMaskLayerImageCache()->PutImage(key, container);
|
GetMaskLayerImageCache()->PutImage(key, container);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user