mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Bug 1458462 - Create paint workers if it's possible we could switch to tiling in the future. r=nical
On windows it's possible for us to fallback from D2D to Skia rendering at any time due to a device reset. If this happens with `enable-tiles-if-skia-pomtp` enabled we could begin to use tiling. This can cause a crash if we never created the worker threads because at initialization time we weren't using tiling. Another way to fix this would be to dynamically create the worker threads in UpdateRenderMode if we have switched to skia. That's a larger change and more might be required, so I'd rather just fix the crash for now. This commit also fixes a pref that should be `Once` instead of `Live`. MozReview-Commit-ID: JQidXPjI7ER --HG-- extra : amend_source : ba9a3746faea3a7355251b7e97e3f7c5dc1ba06b
This commit is contained in:
parent
8bee753352
commit
c2b8279a9f
@ -165,7 +165,10 @@ PaintThread::Init()
|
||||
}
|
||||
sThread = thread;
|
||||
|
||||
if (gfxPlatform::GetPlatform()->UsesTiling()) {
|
||||
// Only create paint workers for tiling if we are using tiling or could
|
||||
// expect to dynamically switch to tiling in the future
|
||||
if (gfxPlatform::GetPlatform()->UsesTiling() ||
|
||||
gfxPrefs::LayersTilesEnabledIfSkiaPOMTP()) {
|
||||
int32_t paintWorkerCount = PaintThread::CalculatePaintWorkerCount();
|
||||
mPaintWorkers = SharedThreadPool::Get(NS_LITERAL_CSTRING("PaintWorker"), paintWorkerCount);
|
||||
}
|
||||
|
@ -620,7 +620,7 @@ private:
|
||||
DECL_GFX_PREF(Once, "layers.offmainthreadcomposition.force-disabled", LayersOffMainThreadCompositionForceDisabled, bool, false);
|
||||
DECL_GFX_PREF(Live, "layers.offmainthreadcomposition.frame-rate", LayersCompositionFrameRate, int32_t,-1);
|
||||
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(Once, "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);
|
||||
|
Loading…
Reference in New Issue
Block a user