Bug 1438551 - Add a pref for enabling tiles when we are using skia with parallel painting. r=nical

MozReview-Commit-ID: JVIFr2wUWHD

--HG--
extra : rebase_source : 67cf74011993a971d66d9a7350171f0190ec08cd
This commit is contained in:
Ryan Hunt 2018-04-10 11:29:14 -05:00
Родитель 4f2811fcda
Коммит d1e87928b5
4 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -2730,7 +2730,14 @@ gfxPlatform::UsesOffMainThreadCompositing()
bool
gfxPlatform::UsesTiling() const
{
return gfxPrefs::LayersTilesEnabled();
bool isSkiaPOMTP = XRE_IsContentProcess() &&
GetDefaultContentBackend() == BackendType::SKIA &&
gfxVars::UseOMTP() &&
(gfxPrefs::LayersOMTPPaintWorkers() == -1 ||
gfxPrefs::LayersOMTPPaintWorkers() > 1);
return gfxPrefs::LayersTilesEnabled() ||
(gfxPrefs::LayersTilesEnabledIfSkiaPOMTP() && isSkiaPOMTP);
}
/***

Просмотреть файл

@ -300,7 +300,7 @@ public:
// Get the default content backend that will be used with the default
// compositor. If the compositor is known when calling this function,
// GetContentBackendFor() should be called instead.
mozilla::gfx::BackendType GetDefaultContentBackend() {
mozilla::gfx::BackendType GetDefaultContentBackend() const {
return mContentBackend;
}

Просмотреть файл

@ -589,6 +589,7 @@ private:
DECL_GFX_PREF(Live, "layers.effect.grayscale", LayersEffectGrayscale, bool, false);
DECL_GFX_PREF(Live, "layers.effect.invert", LayersEffectInvert, bool, false);
DECL_GFX_PREF(Once, "layers.enable-tiles", LayersTilesEnabled, bool, false);
DECL_GFX_PREF(Once, "layers.enable-tiles-if-skia-pomtp", LayersTilesEnabledIfSkiaPOMTP, bool, false);
DECL_GFX_PREF(Live, "layers.flash-borders", FlashLayerBorders, bool, false);
DECL_GFX_PREF(Once, "layers.force-shmem-tiles", ForceShmemTiles, bool, false);
DECL_GFX_PREF(Once, "layers.gpu-process.allow-software", GPUProcessAllowSoftware, bool, false);

Просмотреть файл

@ -5861,6 +5861,7 @@ pref("layers.omtp.paint-workers", -1);
#else
pref("layers.omtp.paint-workers", 1);
#endif
pref("layers.enable-tiles-if-skia-pomtp", false);
pref("layers.omtp.release-capture-on-main-thread", false);
pref("layers.omtp.dump-capture", false);