Bug 1187503 - use external surface size on CompositorOGL r=nical
authorSotaro Ikeda <sikeda@mozilla.com>
Mon, 27 Jul 2015 09:41:13 -0700
changeset 286447 7d7d33f26503903928f50af2467b46b45a0ecb3f
parent 286446 2ea0af589ebd830f4a4c99ae1d2f46e428801322
child 286448 92665159141766a36e43556777419b4085c58122
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1187503
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1187503 - use external surface size on CompositorOGL r=nical
widget/gonk/nsWindow.cpp
widget/gonk/nsWindow.h
--- a/widget/gonk/nsWindow.cpp
+++ b/widget/gonk/nsWindow.cpp
@@ -768,16 +768,22 @@ nsWindow::DestroyCompositor()
 {
     if (mCompositorParent && mScreen->IsPrimaryScreen()) {
         // Unset CompositorParent
         mComposer2D->SetCompositorParent(nullptr);
     }
     nsBaseWidget::DestroyCompositor();
 }
 
+CompositorParent*
+nsWindow::NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight)
+{
+    return new CompositorParent(this, true, aSurfaceWidth, aSurfaceHeight);
+}
+
 void
 nsWindow::BringToTop()
 {
     const nsTArray<nsWindow*>& windows = mScreen->GetTopWindows();
     if (!windows.IsEmpty()) {
         if (nsIWidgetListener* listener = windows[0]->GetWidgetListener()) {
             listener->WindowDeactivated();
         }
--- a/widget/gonk/nsWindow.h
+++ b/widget/gonk/nsWindow.h
@@ -110,16 +110,18 @@ public:
     virtual double GetDefaultScaleInternal();
     virtual mozilla::layers::LayerManager*
         GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
                         LayersBackend aBackendHint = mozilla::layers::LayersBackend::LAYERS_NONE,
                         LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
                         bool* aAllowRetaining = nullptr);
     virtual void DestroyCompositor();
 
+    virtual CompositorParent* NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight);
+
     NS_IMETHOD_(void) SetInputContext(const InputContext& aContext,
                                       const InputContextAction& aAction);
     NS_IMETHOD_(InputContext) GetInputContext();
 
     virtual uint32_t GetGLFrameBufferFormat() override;
 
     virtual nsIntRect GetNaturalBounds() override;
     virtual bool NeedsPaint();