зеркало из https://github.com/mozilla/pjs.git
Bug 721627. Don't return nsRefPtr/nsCOMPtr from nsDisplayImage methods. nsDisplayImage::GetImage is unused anyway. r=mats
This commit is contained in:
Родитель
ca3b4151d6
Коммит
3605115590
|
@ -953,6 +953,7 @@ RasterImage::GetImageContainer(LayerManager* aManager,
|
|||
(!mImageContainer->Manager() &&
|
||||
(mImageContainer->GetBackendType() == aManager->GetBackendType())))) {
|
||||
*_retval = mImageContainer;
|
||||
NS_ADDREF(*_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -978,6 +979,7 @@ RasterImage::GetImageContainer(LayerManager* aManager,
|
|||
mImageContainer->SetCurrentImage(image);
|
||||
|
||||
*_retval = mImageContainer;
|
||||
NS_ADDREF(*_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ protected:
|
|||
* supports being optimized to an ImageLayer (TYPE_RASTER only) returns
|
||||
* an ImageContainer for the image.
|
||||
*/
|
||||
nsRefPtr<ImageContainer> CanOptimizeImageLayer(LayerManager* aManager);
|
||||
already_AddRefed<ImageContainer> CanOptimizeImageLayer(LayerManager* aManager);
|
||||
|
||||
/**
|
||||
* The region of visible content in the layer, relative to the
|
||||
|
@ -968,7 +968,7 @@ ContainerState::FindOpaqueBackgroundColorFor(PRInt32 aThebesLayerIndex)
|
|||
return NS_RGBA(0,0,0,0);
|
||||
}
|
||||
|
||||
nsRefPtr<ImageContainer>
|
||||
already_AddRefed<ImageContainer>
|
||||
ContainerState::ThebesLayerData::CanOptimizeImageLayer(LayerManager* aManager)
|
||||
{
|
||||
if (!mImage || !mImageClip.mRoundedClipRects.IsEmpty()) {
|
||||
|
|
|
@ -1210,19 +1210,13 @@ nsDisplayImage::Paint(nsDisplayListBuilder* aBuilder,
|
|||
: (PRUint32) imgIContainer::FLAG_NONE);
|
||||
}
|
||||
|
||||
nsCOMPtr<imgIContainer>
|
||||
nsDisplayImage::GetImage()
|
||||
{
|
||||
return mImage;
|
||||
}
|
||||
|
||||
nsRefPtr<ImageContainer>
|
||||
already_AddRefed<ImageContainer>
|
||||
nsDisplayImage::GetContainer(LayerManager* aManager)
|
||||
{
|
||||
ImageContainer* container;
|
||||
nsresult rv = mImage->GetImageContainer(aManager, &container);
|
||||
NS_ENSURE_SUCCESS(rv, NULL);
|
||||
return container;
|
||||
nsRefPtr<ImageContainer> container;
|
||||
nsresult rv = mImage->GetImageContainer(aManager, getter_AddRefs(container));
|
||||
NS_ENSURE_SUCCESS(rv, nsnull);
|
||||
return container.forget();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -386,13 +386,12 @@ public:
|
|||
}
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
nsRenderingContext* aCtx);
|
||||
nsCOMPtr<imgIContainer> GetImage();
|
||||
|
||||
/**
|
||||
* Returns an ImageContainer for this image if the image type
|
||||
* supports it (TYPE_RASTER only).
|
||||
*/
|
||||
nsRefPtr<ImageContainer> GetContainer(LayerManager* aManager);
|
||||
already_AddRefed<ImageContainer> GetContainer(LayerManager* aManager);
|
||||
|
||||
/**
|
||||
* Configure an ImageLayer for this display item.
|
||||
|
|
Загрузка…
Ссылка в новой задаче