Bug 842389 - return the right thing from ProgressiveUpdate; r=BenWa,cwiiis

This commit is contained in:
Nicholas Cameron 2013-02-20 09:01:34 +13:00
Родитель f7d3d91a63
Коммит 4199a7f999
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -421,6 +421,7 @@ BasicTiledThebesLayer::ProgressiveUpdate(BasicTiledLayerBuffer& aTiledBuffer,
void* aCallbackData)
{
bool repeat = false;
bool isBufferChanged = false;
do {
// Compute the region that should be updated. Repeat as many times as
// is required.
@ -435,16 +436,13 @@ BasicTiledThebesLayer::ProgressiveUpdate(BasicTiledLayerBuffer& aTiledBuffer,
aResolution,
repeat);
// There's no further work to be done, return if nothing has been
// drawn, or give what has been drawn to the shadow layer to upload.
// There's no further work to be done.
if (regionToPaint.IsEmpty()) {
if (repeat) {
break;
} else {
return false;
}
break;
}
isBufferChanged = true;
// Keep track of what we're about to refresh.
aValidRegion.Or(aValidRegion, regionToPaint);
@ -459,7 +457,9 @@ BasicTiledThebesLayer::ProgressiveUpdate(BasicTiledLayerBuffer& aTiledBuffer,
aInvalidRegion.Sub(aInvalidRegion, regionToPaint);
} while (repeat);
return true;
// Return false if nothing has been drawn, or give what has been drawn
// to the shadow layer to upload.
return isBufferChanged;
}
void