зеркало из https://github.com/mozilla/pjs.git
Bug 635035, part 2: Ensure that the buffer rect only grows in the presence of scaling. r=roc
This commit is contained in:
Родитель
6412fcd6b3
Коммит
464cc015eb
|
@ -206,10 +206,12 @@ ThebesLayerBuffer::BeginPaint(ThebesLayer* aLayer, ContentType aContentType,
|
|||
if (mBufferRect.Contains(neededRegion.GetBounds())) {
|
||||
// We don't need to adjust mBufferRect.
|
||||
destBufferRect = mBufferRect;
|
||||
} else {
|
||||
} else if (neededRegion.GetBounds().Size() <= mBufferRect.Size()) {
|
||||
// The buffer's big enough but doesn't contain everything that's
|
||||
// going to be visible. We'll move it.
|
||||
destBufferRect = nsIntRect(neededRegion.GetBounds().TopLeft(), mBufferRect.Size());
|
||||
} else {
|
||||
destBufferRect = neededRegion.GetBounds();
|
||||
}
|
||||
} else {
|
||||
destBufferRect = neededRegion.GetBounds();
|
||||
|
@ -251,6 +253,9 @@ ThebesLayerBuffer::BeginPaint(ThebesLayer* aLayer, ContentType aContentType,
|
|||
break;
|
||||
}
|
||||
|
||||
NS_ASSERTION(destBufferRect.Contains(neededRegion.GetBounds()),
|
||||
"Destination rect doesn't contain what we need to paint");
|
||||
|
||||
result.mRegionToDraw.Sub(neededRegion, validRegion);
|
||||
if (result.mRegionToDraw.IsEmpty())
|
||||
return result;
|
||||
|
|
Загрузка…
Ссылка в новой задаче