Don't copy over regions that will be painted in this frame (bug 1399692 part 8, r=bas)
We do the same in FinalizeFrame, so we should do it here. MozReview-Commit-ID: JTKDj8yrtI2
This commit is contained in:
@@ -253,12 +253,16 @@ ContentClient::BeginPaint(PaintedLayer* aLayer,
|
|||||||
|
|
||||||
// If we have an existing front buffer, copy it into the new back buffer
|
// If we have an existing front buffer, copy it into the new back buffer
|
||||||
if (RefPtr<RotatedBuffer> frontBuffer = GetFrontBuffer()) {
|
if (RefPtr<RotatedBuffer> frontBuffer = GetFrontBuffer()) {
|
||||||
|
nsIntRegion updateRegion = newBuffer->BufferRect();
|
||||||
|
updateRegion.Sub(updateRegion, result.mRegionToDraw);
|
||||||
|
|
||||||
|
if (!updateRegion.IsEmpty()) {
|
||||||
RefPtr<CapturedBufferState> bufferState = new CapturedBufferState();
|
RefPtr<CapturedBufferState> bufferState = new CapturedBufferState();
|
||||||
|
|
||||||
bufferState->mBufferCopy = Some(CapturedBufferState::Copy {
|
bufferState->mBufferCopy = Some(CapturedBufferState::Copy {
|
||||||
frontBuffer->ShallowCopy(),
|
frontBuffer->ShallowCopy(),
|
||||||
newBuffer->ShallowCopy(),
|
newBuffer->ShallowCopy(),
|
||||||
newBuffer->BufferRect(),
|
updateRegion.GetBounds(),
|
||||||
});
|
});
|
||||||
|
|
||||||
// If we're async painting then return the buffer state to
|
// If we're async painting then return the buffer state to
|
||||||
@@ -272,6 +276,7 @@ ContentClient::BeginPaint(PaintedLayer* aLayer,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (dest.mMustRemoveFrontBuffer) {
|
if (dest.mMustRemoveFrontBuffer) {
|
||||||
Clear();
|
Clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user