Bug 969591 - Cleanup Thebes Layer if mRegionToDraw is Empty and we still have a buffer allocated. r=mattwoodrow

This commit is contained in:
Mason Chang 2014-02-10 08:56:31 -05:00
Родитель 0b2dbcded8
Коммит 61994d6323
1 изменённых файлов: 9 добавлений и 1 удалений

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

@ -503,8 +503,16 @@ RotatedContentBuffer::BeginPaint(ThebesLayer* aLayer,
// or call CreateBuffer before this call.
FinalizeFrame(result.mRegionToDraw);
if (result.mRegionToDraw.IsEmpty())
// Have some cases where the region to draw is empty,
// but the needed region is not empty, so we still need to allocate
// a clean buffer for those cases. If everything is empty, then clear out
// the buffers.
if (result.mRegionToDraw.IsEmpty() && canReuseBuffer) {
if (neededRegion.IsEmpty()) {
Clear();
}
return result;
}
nsIntRect drawBounds = result.mRegionToDraw.GetBounds();
RefPtr<DrawTarget> destDTBuffer;