mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1229237 (part 2) - Make nsIWidget::DrawWindowUnderlay() take a LayoutDeviceIntRect. r=botond.
This commit is contained in:
parent
5b298e5d07
commit
6215f643a1
@ -242,6 +242,14 @@ IntRectTyped<units> RoundedOut(const RectTyped<units>& aRect)
|
||||
int32_t(copy.height));
|
||||
}
|
||||
|
||||
template<class units>
|
||||
IntRectTyped<units> TruncatedToInt(const RectTyped<units>& aRect) {
|
||||
return IntRectTyped<units>(int32_t(aRect.x),
|
||||
int32_t(aRect.y),
|
||||
int32_t(aRect.width),
|
||||
int32_t(aRect.height));
|
||||
}
|
||||
|
||||
template<class units>
|
||||
RectTyped<units> IntRectToRect(const IntRectTyped<units>& aRect)
|
||||
{
|
||||
|
@ -859,10 +859,8 @@ LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion)
|
||||
}
|
||||
|
||||
// Allow widget to render a custom background.
|
||||
mCompositor->GetWidget()->DrawWindowUnderlay(this, IntRect(actualBounds.x,
|
||||
actualBounds.y,
|
||||
actualBounds.width,
|
||||
actualBounds.height));
|
||||
mCompositor->GetWidget()->DrawWindowUnderlay(
|
||||
this, LayoutDeviceIntRect::FromUnknownRect(TruncatedToInt(actualBounds)));
|
||||
|
||||
RefPtr<CompositingRenderTarget> previousTarget;
|
||||
if (haveLayerEffects) {
|
||||
@ -891,8 +889,7 @@ LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion)
|
||||
|
||||
// Allow widget to render a custom foreground.
|
||||
mCompositor->GetWidget()->DrawWindowOverlay(
|
||||
this, LayoutDeviceIntRect(actualBounds.x, actualBounds.y,
|
||||
actualBounds.width, actualBounds.height));
|
||||
this, LayoutDeviceIntRect::FromUnknownRect(TruncatedToInt(actualBounds)));
|
||||
|
||||
// Debugging
|
||||
RenderDebugOverlay(actualBounds);
|
||||
|
@ -2606,7 +2606,8 @@ nsWindow::GetIMEUpdatePreference()
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect)
|
||||
nsWindow::DrawWindowUnderlay(LayerManagerComposite* aManager,
|
||||
LayoutDeviceIntRect aRect)
|
||||
{
|
||||
GeckoLayerClient::LocalRef client = AndroidBridge::Bridge()->GetLayerClient();
|
||||
if (!client) {
|
||||
|
@ -151,7 +151,7 @@ public:
|
||||
NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent) override;
|
||||
|
||||
virtual bool NeedsPaint() override;
|
||||
virtual void DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect) override;
|
||||
virtual void DrawWindowUnderlay(LayerManagerComposite* aManager, LayoutDeviceIntRect aRect) override;
|
||||
virtual void DrawWindowOverlay(LayerManagerComposite* aManager, LayoutDeviceIntRect aRect) override;
|
||||
|
||||
virtual mozilla::layers::CompositorParent* NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight) override;
|
||||
|
@ -166,7 +166,7 @@ public:
|
||||
virtual void CleanupWindowEffects() override {}
|
||||
virtual bool PreRender(LayerManagerComposite* aManager) override { return true; }
|
||||
virtual void PostRender(LayerManagerComposite* aManager) override {}
|
||||
virtual void DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect) override {}
|
||||
virtual void DrawWindowUnderlay(LayerManagerComposite* aManager, LayoutDeviceIntRect aRect) override {}
|
||||
virtual void DrawWindowOverlay(LayerManagerComposite* aManager, LayoutDeviceIntRect aRect) override {}
|
||||
virtual already_AddRefed<mozilla::gfx::DrawTarget> StartRemoteDrawing() override;
|
||||
virtual void EndRemoteDrawing() override { };
|
||||
|
@ -1225,7 +1225,8 @@ class nsIWidget : public nsISupports {
|
||||
*
|
||||
* Always called from the compositing thread.
|
||||
*/
|
||||
virtual void DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect) = 0;
|
||||
virtual void DrawWindowUnderlay(LayerManagerComposite* aManager,
|
||||
LayoutDeviceIntRect aRect) = 0;
|
||||
|
||||
/**
|
||||
* Called after the LayerManager draws the layer tree
|
||||
|
Loading…
Reference in New Issue
Block a user