Bug 564991. Part 41: When we clear our buffer, we need to redraw the entire visible region. r=cjones

This commit is contained in:
Robert O'Callahan 2010-07-16 09:08:11 +12:00
Родитель 6da468e0e8
Коммит f7ac43fd89
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -138,18 +138,22 @@ ThebesLayerBuffer::BeginPaint(ThebesLayer* aLayer,
{
PaintState result;
result.mRegionToDraw.Sub(aLayer->GetVisibleRegion(), aLayer->GetValidRegion());
gfxASurface::gfxContentType desiredContentType = gfxASurface::CONTENT_COLOR_ALPHA;
if (aReferenceSurface->AreSimilarSurfacesSensitiveToContentType()) {
if (aFlags & OPAQUE_CONTENT) {
desiredContentType = gfxASurface::CONTENT_COLOR;
}
if (mBuffer && desiredContentType != mBuffer->GetContentType()) {
// We're effectively clearing the valid region, so we need to draw
// the entire visible region now.
result.mRegionToDraw = aLayer->GetVisibleRegion();
result.mRegionToInvalidate = aLayer->GetValidRegion();
Clear();
}
}
result.mRegionToDraw.Sub(aLayer->GetVisibleRegion(), aLayer->GetValidRegion());
if (result.mRegionToDraw.IsEmpty())
return result;
nsIntRect drawBounds = result.mRegionToDraw.GetBounds();