mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
Remove nsBaseWidget::NewCompositorBridgeParent. (bug 1272472 part 1, r=kats)
This commit is contained in:
parent
e34cf523cf
commit
bb2cbc24f4
@ -3569,19 +3569,6 @@ nsWindow::NeedsPaint()
|
||||
return nsIWidget::NeedsPaint();
|
||||
}
|
||||
|
||||
CompositorBridgeParent*
|
||||
nsWindow::NewCompositorBridgeParent(int aSurfaceWidth, int aSurfaceHeight)
|
||||
{
|
||||
if (!mCompositorWidgetProxy) {
|
||||
mCompositorWidgetProxy = NewCompositorWidgetProxy();
|
||||
}
|
||||
return new CompositorBridgeParent(mCompositorWidgetProxy,
|
||||
GetDefaultScale(),
|
||||
UseAPZ(),
|
||||
true,
|
||||
aSurfaceWidth, aSurfaceHeight);
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::ConfigureAPZControllerThread()
|
||||
{
|
||||
|
@ -177,9 +177,6 @@ public:
|
||||
virtual void DrawWindowUnderlay(LayerManagerComposite* aManager, LayoutDeviceIntRect aRect) override;
|
||||
virtual void DrawWindowOverlay(LayerManagerComposite* aManager, LayoutDeviceIntRect aRect) override;
|
||||
|
||||
virtual mozilla::layers::CompositorBridgeParent* NewCompositorBridgeParent(
|
||||
int aSurfaceWidth, int aSurfaceHeight) override;
|
||||
|
||||
static bool IsCompositionPaused();
|
||||
static void InvalidateAndScheduleComposite();
|
||||
static void SchedulePauseComposition();
|
||||
@ -239,6 +236,10 @@ protected:
|
||||
virtual nsresult NotifyIMEInternal(
|
||||
const IMENotification& aIMENotification) override;
|
||||
|
||||
bool UseExternalCompositingSurface() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
static void DumpWindows();
|
||||
static void DumpWindows(const nsTArray<nsWindow*>& wins, int indent = 0);
|
||||
static void LogWindow(nsWindow *win, int index, int indent);
|
||||
|
@ -720,18 +720,6 @@ nsWindow::DestroyCompositor()
|
||||
nsBaseWidget::DestroyCompositor();
|
||||
}
|
||||
|
||||
CompositorBridgeParent*
|
||||
nsWindow::NewCompositorBridgeParent(int aSurfaceWidth, int aSurfaceHeight)
|
||||
{
|
||||
if (!mCompositorWidgetProxy) {
|
||||
mCompositorWidgetProxy = NewCompositorWidgetProxy();
|
||||
}
|
||||
return new CompositorBridgeParent(mCompositorWidgetProxy,
|
||||
GetDefaultScale(),
|
||||
UseAPZ(),
|
||||
true, aSurfaceWidth, aSurfaceHeight);
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::BringToTop()
|
||||
{
|
||||
|
@ -117,8 +117,6 @@ public:
|
||||
bool* aAllowRetaining = nullptr);
|
||||
virtual void DestroyCompositor();
|
||||
|
||||
virtual CompositorBridgeParent* NewCompositorBridgeParent(int aSurfaceWidth, int aSurfaceHeight);
|
||||
|
||||
NS_IMETHOD_(void) SetInputContext(const InputContext& aContext,
|
||||
const InputContextAction& aAction);
|
||||
NS_IMETHOD_(InputContext) GetInputContext();
|
||||
@ -148,6 +146,10 @@ protected:
|
||||
// event (like a keypress or mouse click).
|
||||
void UserActivity();
|
||||
|
||||
bool UseExternalCompositingSurface() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
// This is used by SynthesizeNativeTouchPoint to maintain state between
|
||||
// multiple synthesized points
|
||||
|
@ -937,20 +937,6 @@ nsBaseWidget::UseAPZ()
|
||||
(WindowType() == eWindowType_toplevel || WindowType() == eWindowType_child));
|
||||
}
|
||||
|
||||
CompositorBridgeParent*
|
||||
nsBaseWidget::NewCompositorBridgeParent(int aSurfaceWidth,
|
||||
int aSurfaceHeight)
|
||||
{
|
||||
if (!mCompositorWidgetProxy) {
|
||||
mCompositorWidgetProxy = NewCompositorWidgetProxy();
|
||||
}
|
||||
return new CompositorBridgeParent(mCompositorWidgetProxy,
|
||||
GetDefaultScale(),
|
||||
UseAPZ(),
|
||||
false,
|
||||
aSurfaceWidth, aSurfaceHeight);
|
||||
}
|
||||
|
||||
void nsBaseWidget::CreateCompositor()
|
||||
{
|
||||
LayoutDeviceIntRect rect;
|
||||
@ -1286,7 +1272,17 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
|
||||
}
|
||||
|
||||
CreateCompositorVsyncDispatcher();
|
||||
mCompositorBridgeParent = NewCompositorBridgeParent(aWidth, aHeight);
|
||||
|
||||
if (!mCompositorWidgetProxy) {
|
||||
mCompositorWidgetProxy = NewCompositorWidgetProxy();
|
||||
}
|
||||
|
||||
mCompositorBridgeParent = new CompositorBridgeParent(
|
||||
mCompositorWidgetProxy,
|
||||
GetDefaultScale(),
|
||||
UseAPZ(),
|
||||
UseExternalCompositingSurface(),
|
||||
aWidth, aHeight);
|
||||
RefPtr<ClientLayerManager> lm = new ClientLayerManager(this);
|
||||
mCompositorBridgeChild = new CompositorBridgeChild(lm);
|
||||
mCompositorBridgeChild->OpenSameProcess(mCompositorBridgeParent);
|
||||
|
@ -170,7 +170,6 @@ public:
|
||||
|
||||
mozilla::CompositorVsyncDispatcher* GetCompositorVsyncDispatcher();
|
||||
void CreateCompositorVsyncDispatcher();
|
||||
virtual CompositorBridgeParent* NewCompositorBridgeParent(int aSurfaceWidth, int aSurfaceHeight);
|
||||
virtual void CreateCompositor();
|
||||
virtual void CreateCompositor(int aWidth, int aHeight);
|
||||
virtual void PrepareWindowEffects() override {}
|
||||
@ -538,6 +537,11 @@ protected:
|
||||
bool UseAPZ();
|
||||
|
||||
protected:
|
||||
// Returns whether compositing should use an external surface size.
|
||||
virtual bool UseExternalCompositingSurface() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the OMTC compositor destruction sequence.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user