зеркало из https://github.com/mozilla/gecko-dev.git
Use a rect instead of a region for UpdateDestinationFrom (bug 1409871 part 15, r=nical)
UpdateDestinationFrom actually only uses a rect, so it's best to not be misleading and force the clients of it to do the conversion. MozReview-Commit-ID: EsUv3apqnku --HG-- extra : rebase_source : 02fdd8f7ede0e1c4712a721e14a4ad809b6dff14
This commit is contained in:
Родитель
9a100d70b9
Коммит
ab4e62caa0
|
@ -240,11 +240,11 @@ RotatedBuffer::DrawTo(PaintedLayer* aLayer,
|
|||
|
||||
void
|
||||
RotatedBuffer::UpdateDestinationFrom(const RotatedBuffer& aSource,
|
||||
const nsIntRegion& aUpdateRegion)
|
||||
const gfx::IntRect& aUpdateRect)
|
||||
{
|
||||
DrawIterator iter;
|
||||
while (DrawTarget* destDT =
|
||||
BorrowDrawTargetForQuadrantUpdate(aUpdateRegion.GetBounds(), BUFFER_BLACK, &iter)) {
|
||||
BorrowDrawTargetForQuadrantUpdate(aUpdateRect, BUFFER_BLACK, &iter)) {
|
||||
bool isClippingCheap = IsClippingCheap(destDT, iter.mDrawRegion);
|
||||
if (isClippingCheap) {
|
||||
gfxUtils::ClipToRegion(destDT, iter.mDrawRegion);
|
||||
|
@ -262,7 +262,7 @@ RotatedBuffer::UpdateDestinationFrom(const RotatedBuffer& aSource,
|
|||
if (aSource.HaveBufferOnWhite() && HaveBufferOnWhite()) {
|
||||
DrawIterator whiteIter;
|
||||
while (DrawTarget* destDT =
|
||||
BorrowDrawTargetForQuadrantUpdate(aUpdateRegion.GetBounds(), BUFFER_WHITE, &whiteIter)) {
|
||||
BorrowDrawTargetForQuadrantUpdate(aUpdateRect, BUFFER_WHITE, &whiteIter)) {
|
||||
bool isClippingCheap = IsClippingCheap(destDT, whiteIter.mDrawRegion);
|
||||
if (isClippingCheap) {
|
||||
gfxUtils::ClipToRegion(destDT, whiteIter.mDrawRegion);
|
||||
|
|
|
@ -118,7 +118,7 @@ public:
|
|||
* of a source rotated buffer.
|
||||
*/
|
||||
void UpdateDestinationFrom(const RotatedBuffer& aSource,
|
||||
const nsIntRegion& aUpdateRegion);
|
||||
const gfx::IntRect& aUpdateRect);
|
||||
|
||||
/**
|
||||
* A draw iterator is used to keep track of which quadrant of a rotated
|
||||
|
|
|
@ -215,7 +215,7 @@ ContentClient::BeginPaintBuffer(PaintedLayer* aLayer,
|
|||
// If needed, copy the old buffer over to the new one
|
||||
if (newBuffer) {
|
||||
if (mBuffer) {
|
||||
newBuffer->UpdateDestinationFrom(*mBuffer, nsIntRegion(newBuffer->BufferRect()));
|
||||
newBuffer->UpdateDestinationFrom(*mBuffer, newBuffer->BufferRect());
|
||||
}
|
||||
|
||||
// Ensure our reference to the front buffer is released
|
||||
|
@ -931,7 +931,7 @@ ContentClientDoubleBuffered::FinalizeFrame(const nsIntRegion& aRegionToDraw)
|
|||
}
|
||||
|
||||
if (mFrontBuffer->Lock(OpenMode::OPEN_READ_ONLY)) {
|
||||
mBuffer->UpdateDestinationFrom(*mFrontBuffer, updateRegion);
|
||||
mBuffer->UpdateDestinationFrom(*mFrontBuffer, updateRegion.GetBounds());
|
||||
mFrontBuffer->Unlock();
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче