From f46bd54523946f0c501dc32f850cda7214009dfb Mon Sep 17 00:00:00 2001 From: Ali Juma Date: Wed, 13 Jun 2012 15:53:38 -0400 Subject: [PATCH] Bug 703484 - Part 1c: Disable OMTC on Windows because it crashes. r=bgirard --- widget/windows/nsWindow.cpp | 11 ++++++++--- widget/windows/nsWindow.h | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index 8df95259fbf..58abcf7f385 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -3104,6 +3104,13 @@ GetLayerManagerPrefs(LayerManagerPrefs* aManagerPrefs) aManagerPrefs->mDisableAcceleration || safeMode; } +bool +nsWindow::UseOffMainThreadCompositing() +{ + // OMTC doesn't work on Windows right now. + return false; +} + LayerManager* nsWindow::GetLayerManager(PLayersChild* aShadowManager, LayersBackend aBackendHint, @@ -3204,9 +3211,7 @@ nsWindow::GetLayerManager(PLayersChild* aShadowManager, // Fall back to software if we couldn't use any hardware backends. if (!mLayerManager) { // Try to use an async compositor first, if possible - bool useCompositor = - Preferences::GetBool("layers.offmainthreadcomposition.enabled", false); - if (useCompositor) { + if (UseOffMainThreadCompositing()) { // e10s uses the parameter to pass in the shadow manager from the TabChild // so we don't expect to see it there since this doesn't support e10s. NS_ASSERTION(aShadowManager == nsnull, "Async Compositor not supported with e10s"); diff --git a/widget/windows/nsWindow.h b/widget/windows/nsWindow.h index 0d3c1c135f9..ae096b21cf0 100644 --- a/widget/windows/nsWindow.h +++ b/widget/windows/nsWindow.h @@ -275,6 +275,8 @@ public: bool const DestroyCalled() { return mDestroyCalled; } static void SetupKeyModifiersSequence(nsTArray* aArray, PRUint32 aModifiers); + + virtual bool UseOffMainThreadCompositing(); protected: // A magic number to identify the FAKETRACKPOINTSCROLLABLE window created