Skip to content

Commit

Permalink
Merge mozilla-central to mozilla-inbound
Browse files Browse the repository at this point in the history
  • Loading branch information
BavarianTomcat committed Feb 18, 2015
2 parents 8740016 + 2f40255 commit ca7f4fa
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions gfx/layers/client/ClientTiledPaintedLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,20 +418,36 @@ ClientTiledPaintedLayer::RenderLayer()
ToClientLayer(GetMaskLayer())->RenderLayer();
}

// For more complex cases we need to calculate a bunch of metrics before we
// can do the paint.
BeginPaint();
if (mPaintData.mPaintFinished) {
return;
}

// In some cases we can take a fast path and just be done with it.
if (UseFastPath()) {
TILING_LOG("TILING %p: Taking fast-path\n", this);
mValidRegion = neededRegion;

// Make sure that tiles that fall outside of the visible region or outside of the
// critical displayport are discarded on the first update. Also make sure that we
// only draw stuff inside the critical displayport on the first update.
if (!mPaintData.mCriticalDisplayPort.IsEmpty()) {
mValidRegion.And(mValidRegion, LayerIntRect::ToUntyped(mPaintData.mCriticalDisplayPort));
invalidRegion.And(invalidRegion, LayerIntRect::ToUntyped(mPaintData.mCriticalDisplayPort));
}

if (invalidRegion.IsEmpty()) {
EndPaint();
return;
}

mContentClient->mTiledBuffer.SetFrameResolution(mPaintData.mResolution);
mContentClient->mTiledBuffer.PaintThebes(mValidRegion, invalidRegion, callback, data);
ClientManager()->Hold(this);
mContentClient->UseTiledLayerBuffer(TiledContentClient::TILED_BUFFER);
return;
}

// For more complex cases we need to calculate a bunch of metrics before we
// can do the paint.
BeginPaint();
if (mPaintData.mPaintFinished) {
EndPaint();
return;
}

Expand Down

0 comments on commit ca7f4fa

Please sign in to comment.