зеркало из https://github.com/mozilla/gecko-dev.git
Bug 774388 - Patch 4: Flatten the way that we track whether we are using OMTC, and move Layers IPC shutdown code back to gfxPlatform (but still triggered by ShutdownXPCOM) - r=nical,sotaro
This commit is contained in:
Родитель
7ec9b3199d
Коммит
c0944ebe5b
|
@ -1710,8 +1710,7 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority,
|
||||||
// PBrowsers are created, because they rely on the Compositor
|
// PBrowsers are created, because they rely on the Compositor
|
||||||
// already being around. (Creation is async, so can't happen
|
// already being around. (Creation is async, so can't happen
|
||||||
// on demand.)
|
// on demand.)
|
||||||
bool useOffMainThreadCompositing = !!CompositorParent::CompositorLoop();
|
if (gfxPlatform::UsesOffMainThreadCompositing()) {
|
||||||
if (useOffMainThreadCompositing) {
|
|
||||||
DebugOnly<bool> opened = PCompositor::Open(this);
|
DebugOnly<bool> opened = PCompositor::Open(this);
|
||||||
MOZ_ASSERT(opened);
|
MOZ_ASSERT(opened);
|
||||||
|
|
||||||
|
|
|
@ -1888,9 +1888,9 @@ TabParent::GetWidget() const
|
||||||
bool
|
bool
|
||||||
TabParent::UseAsyncPanZoom()
|
TabParent::UseAsyncPanZoom()
|
||||||
{
|
{
|
||||||
bool usingOffMainThreadCompositing = !!CompositorParent::CompositorLoop();
|
return gfxPlatform::UsesOffMainThreadCompositing() &&
|
||||||
return (usingOffMainThreadCompositing && gfxPrefs::AsyncPanZoomEnabled() &&
|
gfxPrefs::AsyncPanZoomEnabled() &&
|
||||||
GetScrollingBehavior() == ASYNC_PAN_ZOOM);
|
GetScrollingBehavior() == ASYNC_PAN_ZOOM;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsEventStatus
|
nsEventStatus
|
||||||
|
|
|
@ -277,6 +277,9 @@ gfxPlatform::gfxPlatform()
|
||||||
uint32_t contentMask = BackendTypeBit(BackendType::CAIRO);
|
uint32_t contentMask = BackendTypeBit(BackendType::CAIRO);
|
||||||
InitBackendPrefs(canvasMask, BackendType::CAIRO,
|
InitBackendPrefs(canvasMask, BackendType::CAIRO,
|
||||||
contentMask, BackendType::CAIRO);
|
contentMask, BackendType::CAIRO);
|
||||||
|
|
||||||
|
mUsesOffMainThreadCompositing = ComputeUsesOffMainThreadCompositing();
|
||||||
|
mAlreadyShutDownLayersIPC = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gfxPlatform*
|
gfxPlatform*
|
||||||
|
@ -364,17 +367,12 @@ gfxPlatform::Init()
|
||||||
mozilla::gl::GLContext::StaticInit();
|
mozilla::gl::GLContext::StaticInit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool useOffMainThreadCompositing = OffMainThreadCompositionRequired() ||
|
if (UsesOffMainThreadCompositing() &&
|
||||||
GetPrefLayersOffMainThreadCompositionEnabled();
|
XRE_GetProcessType() == GeckoProcessType_Default)
|
||||||
|
{
|
||||||
if (!OffMainThreadCompositionRequired()) {
|
mozilla::layers::CompositorParent::StartUp();
|
||||||
useOffMainThreadCompositing &= GetPlatform()->SupportsOffMainThreadCompositing();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (useOffMainThreadCompositing && (XRE_GetProcessType() == GeckoProcessType_Default)) {
|
|
||||||
CompositorParent::StartUp();
|
|
||||||
if (gfxPrefs::AsyncVideoEnabled()) {
|
if (gfxPrefs::AsyncVideoEnabled()) {
|
||||||
ImageBridgeChild::StartUp();
|
mozilla::layers::ImageBridgeChild::StartUp();
|
||||||
}
|
}
|
||||||
#ifdef MOZ_WIDGET_GONK
|
#ifdef MOZ_WIDGET_GONK
|
||||||
SharedBufferManagerChild::StartUp();
|
SharedBufferManagerChild::StartUp();
|
||||||
|
@ -444,6 +442,9 @@ gfxPlatform::Init()
|
||||||
void
|
void
|
||||||
gfxPlatform::Shutdown()
|
gfxPlatform::Shutdown()
|
||||||
{
|
{
|
||||||
|
MOZ_ASSERT(gPlatform, "gfxPlatform already down!");
|
||||||
|
MOZ_ASSERT(gPlatform->mAlreadyShutDownLayersIPC, "ShutdownLayersIPC should have been called before this point!");
|
||||||
|
|
||||||
// These may be called before the corresponding subsystems have actually
|
// These may be called before the corresponding subsystems have actually
|
||||||
// started up. That's OK, they can handle it.
|
// started up. That's OK, they can handle it.
|
||||||
gfxFontCache::Shutdown();
|
gfxFontCache::Shutdown();
|
||||||
|
@ -506,6 +507,25 @@ gfxPlatform::Shutdown()
|
||||||
gPlatform = nullptr;
|
gPlatform = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* static */ void
|
||||||
|
gfxPlatform::ShutdownLayersIPC()
|
||||||
|
{
|
||||||
|
MOZ_ASSERT(!gPlatform->mAlreadyShutDownLayersIPC);
|
||||||
|
if (UsesOffMainThreadCompositing() &&
|
||||||
|
XRE_GetProcessType() == GeckoProcessType_Default)
|
||||||
|
{
|
||||||
|
// This must happen after the shutdown of media and widgets, which
|
||||||
|
// are triggered by the NS_XPCOM_SHUTDOWN_OBSERVER_ID notification.
|
||||||
|
layers::ImageBridgeChild::ShutDown();
|
||||||
|
#ifdef MOZ_WIDGET_GONK
|
||||||
|
layers::SharedBufferManagerChild::ShutDown();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
layers::CompositorParent::ShutDown();
|
||||||
|
}
|
||||||
|
gPlatform->mAlreadyShutDownLayersIPC = true;
|
||||||
|
}
|
||||||
|
|
||||||
gfxPlatform::~gfxPlatform()
|
gfxPlatform::~gfxPlatform()
|
||||||
{
|
{
|
||||||
mScreenReferenceSurface = nullptr;
|
mScreenReferenceSurface = nullptr;
|
||||||
|
@ -532,7 +552,6 @@ gfxPlatform::~gfxPlatform()
|
||||||
|
|
||||||
bool
|
bool
|
||||||
gfxPlatform::PreferMemoryOverShmem() const {
|
gfxPlatform::PreferMemoryOverShmem() const {
|
||||||
MOZ_ASSERT(!CompositorParent::IsInCompositorThread());
|
|
||||||
return mLayersPreferMemoryOverShmem;
|
return mLayersPreferMemoryOverShmem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1542,9 +1561,7 @@ gfxPlatform::GetBackendPref(const char* aBackendPrefName, uint32_t &aBackendBitm
|
||||||
bool
|
bool
|
||||||
gfxPlatform::OffMainThreadCompositingEnabled()
|
gfxPlatform::OffMainThreadCompositingEnabled()
|
||||||
{
|
{
|
||||||
return XRE_GetProcessType() == GeckoProcessType_Default ?
|
return UsesOffMainThreadCompositing();
|
||||||
CompositorParent::CompositorLoop() != nullptr :
|
|
||||||
CompositorChild::ChildProcessHasCompositor();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
eCMSMode
|
eCMSMode
|
||||||
|
@ -2008,27 +2025,6 @@ InitLayersAccelerationPrefs()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
gfxPlatform::GetPrefLayersOffMainThreadCompositionEnabled()
|
|
||||||
{
|
|
||||||
InitLayersAccelerationPrefs();
|
|
||||||
return gfxPrefs::LayersOffMainThreadCompositionEnabled() ||
|
|
||||||
gfxPrefs::LayersOffMainThreadCompositionForceEnabled() ||
|
|
||||||
gfxPrefs::LayersOffMainThreadCompositionTestingEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool gfxPlatform::OffMainThreadCompositionRequired()
|
|
||||||
{
|
|
||||||
InitLayersAccelerationPrefs();
|
|
||||||
#if defined(MOZ_WIDGET_GTK) && defined(NIGHTLY_BUILD)
|
|
||||||
// Linux users who chose OpenGL are being grandfathered in to OMTC
|
|
||||||
return sPrefBrowserTabsRemoteAutostart ||
|
|
||||||
gfxPrefs::LayersAccelerationForceEnabled();
|
|
||||||
#else
|
|
||||||
return sPrefBrowserTabsRemoteAutostart;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
gfxPlatform::CanUseDirect3D9()
|
gfxPlatform::CanUseDirect3D9()
|
||||||
{
|
{
|
||||||
|
@ -2075,3 +2071,25 @@ gfxPlatform::GetScaledFontForFontWithCairoSkia(DrawTarget* aTarget, gfxFont* aFo
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
gfxPlatform::ComputeUsesOffMainThreadCompositing()
|
||||||
|
{
|
||||||
|
InitLayersAccelerationPrefs();
|
||||||
|
bool result =
|
||||||
|
sPrefBrowserTabsRemoteAutostart ||
|
||||||
|
gfxPrefs::LayersOffMainThreadCompositionEnabled() ||
|
||||||
|
gfxPrefs::LayersOffMainThreadCompositionForceEnabled() ||
|
||||||
|
gfxPrefs::LayersOffMainThreadCompositionTestingEnabled();
|
||||||
|
#if defined(MOZ_WIDGET_GTK) && defined(NIGHTLY_BUILD)
|
||||||
|
// Linux users who chose OpenGL are being grandfathered in to OMTC
|
||||||
|
result |=
|
||||||
|
gfxPrefs::LayersAccelerationForceEnabled() ||
|
||||||
|
PR_GetEnv("MOZ_USE_OMTC") ||
|
||||||
|
PR_GetEnv("MOZ_OMTC_ENABLED"); // yeah, these two env vars do the same thing.
|
||||||
|
// I'm told that one of them is enabled on some test slaves config.
|
||||||
|
// so be slightly careful if you think you can
|
||||||
|
// remove one of them.
|
||||||
|
#endif
|
||||||
|
return result;
|
||||||
|
}
|
|
@ -170,6 +170,8 @@ public:
|
||||||
*/
|
*/
|
||||||
static void Shutdown();
|
static void Shutdown();
|
||||||
|
|
||||||
|
static void ShutdownLayersIPC();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an offscreen surface of the given dimensions
|
* Create an offscreen surface of the given dimensions
|
||||||
* and image format.
|
* and image format.
|
||||||
|
@ -433,16 +435,9 @@ public:
|
||||||
|
|
||||||
static bool OffMainThreadCompositingEnabled();
|
static bool OffMainThreadCompositingEnabled();
|
||||||
|
|
||||||
/** Use gfxPlatform::GetPref* methods instead of direct calls to Preferences
|
|
||||||
* to get the values for layers preferences. These will only be evaluated
|
|
||||||
* only once, and remain the same until restart.
|
|
||||||
*/
|
|
||||||
static bool GetPrefLayersOffMainThreadCompositionEnabled();
|
|
||||||
static bool CanUseDirect3D9();
|
static bool CanUseDirect3D9();
|
||||||
static bool CanUseDirect3D11();
|
static bool CanUseDirect3D11();
|
||||||
|
|
||||||
static bool OffMainThreadCompositionRequired();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is it possible to use buffer rotation. Note that these
|
* Is it possible to use buffer rotation. Note that these
|
||||||
* check the preference, but also allow for the override to
|
* check the preference, but also allow for the override to
|
||||||
|
@ -549,6 +544,10 @@ public:
|
||||||
|
|
||||||
virtual bool IsInGonkEmulator() const { return false; }
|
virtual bool IsInGonkEmulator() const { return false; }
|
||||||
|
|
||||||
|
static bool UsesOffMainThreadCompositing() {
|
||||||
|
return GetPlatform()->mUsesOffMainThreadCompositing;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
gfxPlatform();
|
gfxPlatform();
|
||||||
virtual ~gfxPlatform();
|
virtual ~gfxPlatform();
|
||||||
|
@ -618,6 +617,13 @@ protected:
|
||||||
// max number of entries in word cache
|
// max number of entries in word cache
|
||||||
int32_t mWordCacheMaxEntries;
|
int32_t mWordCacheMaxEntries;
|
||||||
|
|
||||||
|
// Whether we use OMTC/OMPC (as opposed to main-thread compositing)
|
||||||
|
bool mUsesOffMainThreadCompositing;
|
||||||
|
|
||||||
|
// Whether ShutdownLayersIPC has alrady been called. Used to enforce that
|
||||||
|
// it is called before Shutdown.
|
||||||
|
bool mAlreadyShutDownLayersIPC;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* Start up Thebes.
|
* Start up Thebes.
|
||||||
|
@ -632,7 +638,7 @@ private:
|
||||||
|
|
||||||
virtual void GetPlatformCMSOutputProfile(void *&mem, size_t &size);
|
virtual void GetPlatformCMSOutputProfile(void *&mem, size_t &size);
|
||||||
|
|
||||||
virtual bool SupportsOffMainThreadCompositing() { return true; }
|
bool ComputeUsesOffMainThreadCompositing();
|
||||||
|
|
||||||
nsRefPtr<gfxASurface> mScreenReferenceSurface;
|
nsRefPtr<gfxASurface> mScreenReferenceSurface;
|
||||||
mozilla::RefPtr<mozilla::gfx::DrawTarget> mScreenReferenceDrawTarget;
|
mozilla::RefPtr<mozilla::gfx::DrawTarget> mScreenReferenceDrawTarget;
|
||||||
|
|
|
@ -252,18 +252,6 @@ gfxPlatformGtk::GetScreenDepth() const
|
||||||
return sDepth;
|
return sDepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
gfxPlatformGtk::SupportsOffMainThreadCompositing()
|
|
||||||
{
|
|
||||||
// Nightly builds have OMTC support by default for Electrolysis testing.
|
|
||||||
#if defined(MOZ_X11) && !defined(NIGHTLY_BUILD)
|
|
||||||
return (PR_GetEnv("MOZ_USE_OMTC") != nullptr) ||
|
|
||||||
(PR_GetEnv("MOZ_OMTC_ENABLED") != nullptr);
|
|
||||||
#else
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
gfxPlatformGtk::GetPlatformCMSOutputProfile(void *&mem, size_t &size)
|
gfxPlatformGtk::GetPlatformCMSOutputProfile(void *&mem, size_t &size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -98,7 +98,6 @@ protected:
|
||||||
private:
|
private:
|
||||||
virtual void GetPlatformCMSOutputProfile(void *&mem, size_t &size);
|
virtual void GetPlatformCMSOutputProfile(void *&mem, size_t &size);
|
||||||
|
|
||||||
virtual bool SupportsOffMainThreadCompositing();
|
|
||||||
#ifdef MOZ_X11
|
#ifdef MOZ_X11
|
||||||
static bool sUseXRender;
|
static bool sUseXRender;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -435,12 +435,6 @@ gfxPlatformMac::UseAcceleratedCanvas()
|
||||||
return nsCocoaFeatures::OnLionOrLater() && Preferences::GetBool("gfx.canvas.azure.accelerated", false);
|
return nsCocoaFeatures::OnLionOrLater() && Preferences::GetBool("gfx.canvas.azure.accelerated", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
gfxPlatformMac::SupportsOffMainThreadCompositing()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
gfxPlatformMac::GetPlatformCMSOutputProfile(void* &mem, size_t &size)
|
gfxPlatformMac::GetPlatformCMSOutputProfile(void* &mem, size_t &size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,8 +72,6 @@ public:
|
||||||
private:
|
private:
|
||||||
virtual void GetPlatformCMSOutputProfile(void* &mem, size_t &size);
|
virtual void GetPlatformCMSOutputProfile(void* &mem, size_t &size);
|
||||||
|
|
||||||
virtual bool SupportsOffMainThreadCompositing();
|
|
||||||
|
|
||||||
// read in the pref value for the lower threshold on font anti-aliasing
|
// read in the pref value for the lower threshold on font anti-aliasing
|
||||||
static uint32_t ReadAntiAliasingThreshold();
|
static uint32_t ReadAntiAliasingThreshold();
|
||||||
|
|
||||||
|
|
|
@ -160,17 +160,6 @@ gfxQtPlatform::MakePlatformFont(const gfxProxyFontEntry *aProxyEntry,
|
||||||
aFontData, aLength);
|
aFontData, aLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
gfxQtPlatform::SupportsOffMainThreadCompositing()
|
|
||||||
{
|
|
||||||
#if defined(MOZ_X11) && !defined(NIGHTLY_BUILD)
|
|
||||||
return (PR_GetEnv("MOZ_USE_OMTC") != nullptr) ||
|
|
||||||
(PR_GetEnv("MOZ_OMTC_ENABLED") != nullptr);
|
|
||||||
#else
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
gfxQtPlatform::IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags)
|
gfxQtPlatform::IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags)
|
||||||
{
|
{
|
||||||
|
|
|
@ -83,8 +83,6 @@ public:
|
||||||
|
|
||||||
virtual int GetScreenDepth() const MOZ_OVERRIDE;
|
virtual int GetScreenDepth() const MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual bool SupportsOffMainThreadCompositing() MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static gfxFontconfigUtils *sFontconfigUtils;
|
static gfxFontconfigUtils *sFontconfigUtils;
|
||||||
|
|
||||||
|
|
|
@ -1380,8 +1380,8 @@ gfxWindowsPlatform::GetD3D9DeviceManager()
|
||||||
// We should only create the d3d9 device on the compositor thread
|
// We should only create the d3d9 device on the compositor thread
|
||||||
// or we don't have a compositor thread.
|
// or we don't have a compositor thread.
|
||||||
if (!mDeviceManager &&
|
if (!mDeviceManager &&
|
||||||
(CompositorParent::IsInCompositorThread() ||
|
(!gfxPlatform::UsesOffMainThreadCompositing() ||
|
||||||
!CompositorParent::CompositorLoop())) {
|
CompositorParent::IsInCompositorThread())) {
|
||||||
mDeviceManager = new DeviceManagerD3D9();
|
mDeviceManager = new DeviceManagerD3D9();
|
||||||
if (!mDeviceManager->Init()) {
|
if (!mDeviceManager->Init()) {
|
||||||
NS_WARNING("Could not initialise device manager");
|
NS_WARNING("Could not initialise device manager");
|
||||||
|
|
|
@ -71,7 +71,6 @@
|
||||||
#include "nsDOMBlobBuilder.h"
|
#include "nsDOMBlobBuilder.h"
|
||||||
#include "nsDOMFileReader.h"
|
#include "nsDOMFileReader.h"
|
||||||
|
|
||||||
#include "gfxPlatform.h"
|
|
||||||
#include "nsFormData.h"
|
#include "nsFormData.h"
|
||||||
#include "nsHostObjectProtocolHandler.h"
|
#include "nsHostObjectProtocolHandler.h"
|
||||||
#include "nsHostObjectURI.h"
|
#include "nsHostObjectURI.h"
|
||||||
|
|
|
@ -737,7 +737,7 @@ RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CompositorParent::CompositorLoop()) {
|
if (gfxPlatform::UsesOffMainThreadCompositing()) {
|
||||||
// Our remote frame will push layers updates to the compositor,
|
// Our remote frame will push layers updates to the compositor,
|
||||||
// and we'll keep an indirect reference to that tree.
|
// and we'll keep an indirect reference to that tree.
|
||||||
*aId = mLayersId = CompositorParent::AllocateLayerTreeId();
|
*aId = mLayersId = CompositorParent::AllocateLayerTreeId();
|
||||||
|
|
|
@ -998,7 +998,8 @@ MetroWidget::ShouldUseOffMainThreadCompositing()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// toolkit or test widgets can't use omtc, they don't have ICoreWindow.
|
// toolkit or test widgets can't use omtc, they don't have ICoreWindow.
|
||||||
return (CompositorParent::CompositorLoop() && mWindowType == eWindowType_toplevel);
|
return gfxPlatform::UsesOffMainThreadCompositing() &&
|
||||||
|
mWindowType == eWindowType_toplevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -1008,7 +1009,8 @@ MetroWidget::ShouldUseMainThreadD3D10Manager()
|
||||||
if (!mView) {
|
if (!mView) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return (!CompositorParent::CompositorLoop() && mWindowType == eWindowType_toplevel);
|
return !gfxPlatform::UsesOffMainThreadCompositing() &&
|
||||||
|
mWindowType == eWindowType_toplevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -888,6 +888,9 @@ CheckForBasicBackends(nsTArray<LayersBackend>& aHints)
|
||||||
|
|
||||||
void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
|
void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
|
||||||
{
|
{
|
||||||
|
MOZ_ASSERT(gfxPlatform::UsesOffMainThreadCompositing(),
|
||||||
|
"This function assumes OMTC");
|
||||||
|
|
||||||
// Recreating this is tricky, as we may still have an old and we need
|
// Recreating this is tricky, as we may still have an old and we need
|
||||||
// to make sure it's properly destroyed by calling DestroyCompositor!
|
// to make sure it's properly destroyed by calling DestroyCompositor!
|
||||||
|
|
||||||
|
@ -946,7 +949,7 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
|
||||||
|
|
||||||
bool nsBaseWidget::ShouldUseOffMainThreadCompositing()
|
bool nsBaseWidget::ShouldUseOffMainThreadCompositing()
|
||||||
{
|
{
|
||||||
return CompositorParent::CompositorLoop();
|
return gfxPlatform::UsesOffMainThreadCompositing();
|
||||||
}
|
}
|
||||||
|
|
||||||
LayerManager* nsBaseWidget::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
LayerManager* nsBaseWidget::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
||||||
|
|
|
@ -149,6 +149,8 @@ extern nsresult nsStringInputStreamConstructor(nsISupports *, REFNSIID, void **)
|
||||||
|
|
||||||
#include "jsapi.h"
|
#include "jsapi.h"
|
||||||
|
|
||||||
|
#include "gfxPlatform.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using base::AtExitManager;
|
using base::AtExitManager;
|
||||||
using mozilla::ipc::BrowserProcessSubThread;
|
using mozilla::ipc::BrowserProcessSubThread;
|
||||||
|
@ -797,13 +799,6 @@ ShutdownXPCOM(nsIServiceManager* servMgr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This must happen after the shutdown of media and widgets, which
|
|
||||||
// are triggered by the NS_XPCOM_SHUTDOWN_OBSERVER_ID notification.
|
|
||||||
layers::ImageBridgeChild::ShutDown();
|
|
||||||
#ifdef MOZ_WIDGET_GONK
|
|
||||||
layers::SharedBufferManagerChild::ShutDown();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_ProcessPendingEvents(thread);
|
NS_ProcessPendingEvents(thread);
|
||||||
mozilla::scache::StartupCache::DeleteSingleton();
|
mozilla::scache::StartupCache::DeleteSingleton();
|
||||||
if (observerService)
|
if (observerService)
|
||||||
|
@ -811,7 +806,9 @@ ShutdownXPCOM(nsIServiceManager* servMgr)
|
||||||
NotifyObservers(nullptr, NS_XPCOM_SHUTDOWN_THREADS_OBSERVER_ID,
|
NotifyObservers(nullptr, NS_XPCOM_SHUTDOWN_THREADS_OBSERVER_ID,
|
||||||
nullptr);
|
nullptr);
|
||||||
|
|
||||||
layers::CompositorParent::ShutDown();
|
// This must happen after the shutdown of media and widgets, which
|
||||||
|
// are triggered by the NS_XPCOM_SHUTDOWN_OBSERVER_ID notification.
|
||||||
|
gfxPlatform::ShutdownLayersIPC();
|
||||||
|
|
||||||
gXPCOMThreadsShutDown = true;
|
gXPCOMThreadsShutDown = true;
|
||||||
NS_ProcessPendingEvents(thread);
|
NS_ProcessPendingEvents(thread);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче