mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 620665 - Part 4: Also recreate container when types don't match. r=roc a=blocking-beta9
This commit is contained in:
parent
0deeee99d4
commit
9a09c4d4a8
@ -1722,7 +1722,11 @@ nsObjectFrame::GetImageContainer()
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
if (mImageContainer && mImageContainer->Manager() == manager) {
|
||||
// XXX - in the future image containers will be manager independent and
|
||||
// we can remove the manager equals check and only check the backend type.
|
||||
if (mImageContainer &&
|
||||
(!mImageContainer->Manager() || mImageContainer->Manager() == manager) &&
|
||||
mImageContainer->GetBackendType() == manager->GetBackendType()) {
|
||||
return mImageContainer;
|
||||
}
|
||||
|
||||
|
@ -193,11 +193,15 @@ nsVideoFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
container->SetLayerManager(aManager);
|
||||
}
|
||||
|
||||
// If we have a container with the right layer manager already, we don't
|
||||
// need to do anything here. Otherwise we need to set up a temporary
|
||||
// If we have a container of the correct type already, we don't need
|
||||
// to do anything here. Otherwise we need to set up a temporary
|
||||
// ImageContainer, capture the video data and store it in the temp
|
||||
// container.
|
||||
if (!container || container->Manager() != aManager) {
|
||||
// container. For now we also check if the manager is equal since not all
|
||||
// image containers are manager independent yet.
|
||||
if (!container ||
|
||||
(container->Manager() && container->Manager() != aManager) ||
|
||||
container->GetBackendType() != aManager->GetBackendType())
|
||||
{
|
||||
nsRefPtr<ImageContainer> tmpContainer = aManager->CreateImageContainer();
|
||||
if (!tmpContainer)
|
||||
return nsnull;
|
||||
|
Loading…
Reference in New Issue
Block a user