mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-24 13:52:37 +00:00
Bug 695763. Part 7. Invalidate img's if they are not decoded and we are asked to do a sync decode. r=matt.woodrow
This commit is contained in:
parent
eda35e04e0
commit
f67d99ca0e
@ -1215,6 +1215,19 @@ nsDisplayImage::Paint(nsDisplayListBuilder* aBuilder,
|
||||
PaintImage(*aCtx, ToReferenceFrame(), mVisibleRect, mImage, flags);
|
||||
}
|
||||
|
||||
void
|
||||
nsDisplayImage::ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
|
||||
const nsDisplayItemGeometry* aGeometry,
|
||||
nsRegion* aInvalidRegion)
|
||||
{
|
||||
if (aBuilder->ShouldSyncDecodeImages() && mImage && !mImage->IsDecoded()) {
|
||||
bool snap;
|
||||
aInvalidRegion->Or(*aInvalidRegion, GetBounds(aBuilder, &snap));
|
||||
}
|
||||
|
||||
nsDisplayImageContainer::ComputeInvalidationRegion(aBuilder, aGeometry, aInvalidRegion);
|
||||
}
|
||||
|
||||
already_AddRefed<ImageContainer>
|
||||
nsDisplayImage::GetContainer(LayerManager* aManager,
|
||||
nsDisplayListBuilder* aBuilder)
|
||||
|
@ -364,6 +364,9 @@ public:
|
||||
virtual ~nsDisplayImage() {
|
||||
MOZ_COUNT_DTOR(nsDisplayImage);
|
||||
}
|
||||
virtual void ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
|
||||
const nsDisplayItemGeometry* aGeometry,
|
||||
nsRegion* aInvalidRegion) MOZ_OVERRIDE;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
nsRenderingContext* aCtx) MOZ_OVERRIDE;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user