Bug 946952 - Run a 'compressed' paint up to 1 second after skipping the ColorLayer optimization. r=roc
This commit is contained in:
@@ -1759,7 +1759,7 @@ ContainerState::PopThebesLayerData()
|
||||
nsRefPtr<ImageContainer> imageContainer = data->CanOptimizeImageLayer(mBuilder);
|
||||
|
||||
if ((data->mIsSolidColorInVisibleRegion || imageContainer) &&
|
||||
data->mLayer->GetValidRegion().IsEmpty()) {
|
||||
(data->mLayer->GetValidRegion().IsEmpty() || mLayerBuilder->CheckInLayerTreeCompressionMode())) {
|
||||
NS_ASSERTION(!(data->mIsSolidColorInVisibleRegion && imageContainer),
|
||||
"Can't be a solid color as well as an image!");
|
||||
if (imageContainer) {
|
||||
@@ -2817,6 +2817,20 @@ FrameLayerBuilder::SaveLastPaintOffset(ThebesLayer* aLayer)
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
FrameLayerBuilder::CheckInLayerTreeCompressionMode()
|
||||
{
|
||||
if (mInLayerTreeCompressionMode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If we wanted to be in layer tree compression mode, but weren't, then scheduled
|
||||
// a delayed repaint where we will be.
|
||||
mRootPresContext->PresShell()->GetRootFrame()->SchedulePaint(nsIFrame::PAINT_DELAYED_COMPRESS);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
ContainerState::CollectOldLayers()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user