Bug 1438144 - Repaint on resize asynchronously draft
authorTakuro Ashie <ashie@clear-code.com>
Wed, 28 Mar 2018 14:26:00 +0900
changeset 773595 5d1077d7779525950c1d61cc31d5a9687b938fb9
parent 773594 f3caa11e1d9a39bab620a025d1db79bd645d3a2a
push id104261
push userbmo:ashie@clear-code.com
push dateWed, 28 Mar 2018 05:26:44 +0000
bugs1438144
milestone61.0a1
Bug 1438144 - Repaint on resize asynchronously Otherwise nsViewManager::Refresh() will be blocked forever when CompositorOGL is enabled with EGL. Note that it's a dirty hack, we should fix synchronous repaint instead. MozReview-Commit-ID: KNfY74bVG93
gfx/thebes/gfxPrefs.h
widget/gtk/nsWindow.h
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -614,17 +614,17 @@ private:
   DECL_GFX_PREF(Live, "layers.omtp.dump-capture",              LayersOMTPDumpCapture, bool, false);
   DECL_GFX_PREF(Live, "layers.omtp.paint-workers",             LayersOMTPPaintWorkers, int32_t, 1);
   DECL_GFX_PREF(Live, "layers.omtp.release-capture-on-main-thread", LayersOMTPReleaseCaptureOnMainThread, bool, false);
   DECL_GFX_PREF(Live, "layers.orientation.sync.timeout",       OrientationSyncMillis, uint32_t, (uint32_t)0);
   DECL_GFX_PREF(Once, "layers.prefer-opengl",                  LayersPreferOpenGL, bool, false);
   DECL_GFX_PREF(Live, "layers.progressive-paint",              ProgressivePaint, bool, false);
   DECL_GFX_PREF(Live, "layers.shared-buffer-provider.enabled", PersistentBufferProviderSharedEnabled, bool, false);
   DECL_GFX_PREF(Live, "layers.single-tile.enabled",            LayersSingleTileEnabled, bool, true);
-  DECL_GFX_PREF(Live, "layers.force-synchronous-resize",       LayersForceSynchronousResize, bool, true);
+  DECL_GFX_PREF(Live, "layers.force-synchronous-resize",       LayersForceSynchronousResize, bool, false);
 
   // We allow for configurable and rectangular tile size to avoid wasting memory on devices whose
   // screen size does not align nicely to the default tile size. Although layers can be any size,
   // they are often the same size as the screen, especially for width.
   DECL_GFX_PREF(Once, "layers.tile-width",                     LayersTileWidth, int32_t, 256);
   DECL_GFX_PREF(Once, "layers.tile-height",                    LayersTileHeight, int32_t, 256);
   DECL_GFX_PREF(Once, "layers.tile-initial-pool-size",         LayersTileInitialPoolSize, uint32_t, (uint32_t)50);
   DECL_GFX_PREF(Once, "layers.tile-pool-unused-size",          LayersTilePoolUnusedSize, uint32_t, (uint32_t)10);
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
@@ -596,16 +596,19 @@ private:
     virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
                                           LayersBackend aBackendHint = mozilla::layers::LayersBackend::LAYERS_NONE,
                                           LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT) override;
 
     void SetCompositorWidgetDelegate(CompositorWidgetDelegate* delegate) override;
 
     void CleanLayerManagerRecursive();
 
+    virtual bool SynchronouslyRepaintOnResize() override
+    { return false; }
+
     virtual int32_t RoundsWidgetCoordinatesTo() override;
 
     /**
      * |mIMContext| takes all IME related stuff.
      *
      * This is owned by the top-level nsWindow or the topmost child
      * nsWindow embedded in a non-Gecko widget.
      *