Bug 1023882 - Part 6 - Move all SetRepeatTransaction calls into ClientTiledThebesLayer so it's easier to follow the flow. r=Cwiiis

This commit is contained in:
Kartikaya Gupta 2014-06-11 12:42:45 -04:00
Родитель b1722f4ca3
Коммит e9c83fc117
2 изменённых файлов: 18 добавлений и 8 удалений

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

@ -405,9 +405,16 @@ ClientTiledThebesLayer::RenderLayer()
ClientManager()->Hold(this);
mContentClient->UseTiledLayerBuffer(TiledContentClient::TILED_BUFFER);
if (!mPaintData.mPaintFinished) {
// There is still more high-res stuff to paint, so we're not
// done yet. A subsequent transaction will take care of this.
ClientManager()->SetRepeatTransaction();
return;
}
// If there are low precision updates, mark the paint as unfinished and
// request a repeat transaction.
if (!lowPrecisionInvalidRegion.IsEmpty() && mPaintData.mPaintFinished) {
if (!lowPrecisionInvalidRegion.IsEmpty()) {
ClientManager()->SetRepeatTransaction();
mPaintData.mLowPrecisionPaintCount = 1;
mPaintData.mPaintFinished = false;
@ -426,6 +433,12 @@ ClientTiledThebesLayer::RenderLayer()
if (updatedLowPrecision) {
ClientManager()->Hold(this);
mContentClient->UseTiledLayerBuffer(TiledContentClient::LOW_PRECISION_TILED_BUFFER);
if (!mPaintData.mPaintFinished) {
// There is still more low-res stuff to paint, so we're not
// done yet. A subsequent transaction will take care of this.
ClientManager()->SetRepeatTransaction();
}
}
EndPaint(false);

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

@ -1064,13 +1064,10 @@ ClientTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& aInval
// sure it happens in the same transaction by requesting this work be
// repeated immediately.
// If this is unnecessary, the remaining work will be done tile-by-tile in
// subsequent transactions.
if (!drawingLowPrecision && paintInSingleTransaction) {
return true;
}
mManager->SetRepeatTransaction();
return false;
// subsequent transactions. The caller code is responsible for scheduling
// the subsequent transactions as long as we don't set the mPaintFinished
// flag to true.
return (!drawingLowPrecision && paintInSingleTransaction);
}
// We're not repeating painting and we've not requested a repeat transaction,