Bug 1224482 (part 2) - Replace GetNaturalBoundsUntyped() with GetNaturalBounds(). r=kats.

This commit is contained in:
Nicholas Nethercote 2015-11-13 01:37:02 -08:00
parent fec16238b0
commit 2cacd3de07
4 changed files with 9 additions and 15 deletions

View File

@ -203,9 +203,10 @@ ClientLayerManager::BeginTransactionWithTarget(gfxContext* aTarget)
hal::GetCurrentScreenConfiguration(&currentConfig);
orientation = currentConfig.orientation();
}
IntRect targetBounds = mWidget->GetNaturalBoundsUntyped();
LayoutDeviceIntRect targetBounds = mWidget->GetNaturalBounds();
targetBounds.x = targetBounds.y = 0;
mForwarder->BeginTransaction(targetBounds, mTargetRotation, orientation);
mForwarder->BeginTransaction(targetBounds.ToUnknownRect(), mTargetRotation,
orientation);
// If we're drawing on behalf of a context with async pan/zoom
// enabled, then the entire buffer of painted layers might be

View File

@ -854,10 +854,10 @@ nsWindow::GetGLFrameBufferFormat()
return LOCAL_GL_NONE;
}
nsIntRect
nsWindow::GetNaturalBoundsUntyped()
LayoutDeviceIntRect
nsWindow::GetNaturalBounds()
{
return mScreen->GetNaturalBounds().ToUnknownRect();
return mScreen->GetNaturalBounds();
}
nsScreenGonk*

View File

@ -123,7 +123,7 @@ public:
virtual uint32_t GetGLFrameBufferFormat() override;
virtual nsIntRect GetNaturalBoundsUntyped() override;
virtual mozilla::LayoutDeviceIntRect GetNaturalBounds() override;
virtual bool NeedsPaint();
virtual Composer2D* GetComposer2D() override;

View File

@ -1961,17 +1961,10 @@ public:
* No code outside of the composition pipeline should know or care
* about this. If you're not an agent of the compositor, you
* probably shouldn't call this method.
*
* The untyped version exists temporarily to ease conversion to typed
* coordinates.
*/
virtual mozilla::LayoutDeviceIntRect GetNaturalBounds() {
nsIntRect tmp = GetNaturalBoundsUntyped();
return mozilla::LayoutDeviceIntRect::FromUnknownRect(tmp);
}
virtual nsIntRect GetNaturalBoundsUntyped() {
nsIntRect bounds;
GetBoundsUntyped(bounds);
mozilla::LayoutDeviceIntRect bounds;
GetBounds(bounds);
return bounds;
}