diff options
Diffstat (limited to 'gfx/thebes')
-rw-r--r-- | gfx/thebes/DeviceManagerDx.cpp | 2 | ||||
-rw-r--r-- | gfx/thebes/gfxFT2FontList.cpp | 15 | ||||
-rw-r--r-- | gfx/thebes/gfxFT2FontList.h | 3 | ||||
-rw-r--r-- | gfx/thebes/gfxFont.cpp | 3 | ||||
-rw-r--r-- | gfx/thebes/gfxPlatform.cpp | 33 | ||||
-rw-r--r-- | gfx/thebes/gfxPlatformFontList.cpp | 10 | ||||
-rwxr-xr-x | gfx/thebes/gfxWindowsPlatform.cpp | 16 | ||||
-rw-r--r-- | gfx/thebes/gfxWindowsPlatform.h | 2 |
8 files changed, 13 insertions, 71 deletions
diff --git a/gfx/thebes/DeviceManagerDx.cpp b/gfx/thebes/DeviceManagerDx.cpp index e1cfc5763..9f42974c3 100644 --- a/gfx/thebes/DeviceManagerDx.cpp +++ b/gfx/thebes/DeviceManagerDx.cpp @@ -455,13 +455,11 @@ DeviceManagerDx::CreateContentDevice() : D3D_DRIVER_TYPE_UNKNOWN; if (!CreateDevice(adapter, type, flags, hr, device)) { gfxCriticalNote << "Recovered from crash while creating a D3D11 content device"; - gfxWindowsPlatform::RecordContentDeviceFailure(TelemetryDeviceCode::Content); return FeatureStatus::CrashedInHandler; } if (FAILED(hr) || !device) { gfxCriticalNote << "Failed to create a D3D11 content device: " << hexa(hr); - gfxWindowsPlatform::RecordContentDeviceFailure(TelemetryDeviceCode::Content); return FeatureStatus::Failed; } diff --git a/gfx/thebes/gfxFT2FontList.cpp b/gfx/thebes/gfxFT2FontList.cpp index 8a652df0d..09c938a24 100644 --- a/gfx/thebes/gfxFT2FontList.cpp +++ b/gfx/thebes/gfxFT2FontList.cpp @@ -812,6 +812,15 @@ public: : mFontList(aFontList) { } + void Remove() + { + nsCOMPtr<nsIObserverService> obs = services::GetObserverService(); + if (obs) { + obs->RemoveObserver(this, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID); + } + mFontList = nullptr; + } + protected: virtual ~WillShutdownObserver() { } @@ -847,11 +856,7 @@ gfxFT2FontList::gfxFT2FontList() gfxFT2FontList::~gfxFT2FontList() { if (mObserver) { - nsCOMPtr<nsIObserverService> obs = services::GetObserverService(); - if (obs) { - obs->RemoveObserver(mObserver, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID); - } - mObserver = nullptr; + mObserver->Remove(); } } diff --git a/gfx/thebes/gfxFT2FontList.h b/gfx/thebes/gfxFT2FontList.h index 63187ba26..9fb566c15 100644 --- a/gfx/thebes/gfxFT2FontList.h +++ b/gfx/thebes/gfxFT2FontList.h @@ -19,6 +19,7 @@ using mozilla::dom::FontListEntry; class FontNameCache; typedef struct FT_FaceRec_* FT_Face; class nsZipArchive; +class WillShutdownObserver; class FT2FontEntry : public gfxFontEntry { @@ -194,7 +195,7 @@ private: mozilla::UniquePtr<FontNameCache> mFontNameCache; int64_t mJarModifiedTime; - nsCOMPtr<nsIObserver> mObserver; + RefPtr<WillShutdownObserver> mObserver; }; #endif /* GFX_FT2FONTLIST_H */ diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index 8ccd721f8..490a866db 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -36,7 +36,6 @@ #include "mozilla/MemoryReporting.h" #include "mozilla/Preferences.h" #include "mozilla/Services.h" -#include "mozilla/Telemetry.h" #include "gfxMathTable.h" #include "gfxSVGGlyphs.h" #include "gfx2DGlue.h" @@ -2573,8 +2572,6 @@ gfxFont::GetShapedWord(DrawTarget *aDrawTarget, } gfxShapedWord* sw = entry->mShapedWord.get(); - bool isContent = !mStyle.systemFont; - if (sw) { sw->ResetAge(); #ifndef RELEASE_OR_BETA diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 65227a8a7..50d1fcb46 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -11,7 +11,6 @@ #include "mozilla/gfx/GPUProcessManager.h" #include "mozilla/gfx/GraphicsMessages.h" #include "mozilla/ClearOnShutdown.h" -#include "mozilla/Telemetry.h" #include "mozilla/TimeStamp.h" #include "mozilla/Unused.h" @@ -131,8 +130,6 @@ class mozilla::gl::SkiaGLGlue : public GenericAtomicRefCounted { #include "SoftwareVsyncSource.h" #include "nscore.h" // for NS_FREE_PERMANENT_DATA #include "mozilla/dom/ContentChild.h" -#include "gfxVR.h" -#include "VRManagerChild.h" #include "mozilla/gfx/GPUParent.h" #include "prsystem.h" @@ -351,25 +348,6 @@ void CrashStatsLogForwarder::Log(const std::string& aString) } } -class CrashTelemetryEvent : public Runnable -{ - virtual ~CrashTelemetryEvent() {} - - NS_DECL_ISUPPORTS_INHERITED - - explicit CrashTelemetryEvent(uint32_t aReason) : mReason(aReason) {} - - NS_IMETHOD Run() override { - MOZ_ASSERT(NS_IsMainThread()); - return NS_OK; - } - -protected: - uint32_t mReason; -}; - -NS_IMPL_ISUPPORTS_INHERITED0(CrashTelemetryEvent, Runnable); - void CrashStatsLogForwarder::CrashAction(LogReason aReason) { @@ -492,8 +470,6 @@ gfxPlatform::gfxPlatform() contentMask, BackendType::CAIRO); mTotalSystemMemory = PR_GetPhysicalMemorySize(); - - VRManager::ManagerInit(); } gfxPlatform* @@ -900,14 +876,12 @@ gfxPlatform::ShutdownLayersIPC() sLayersIPCIsUp = false; if (XRE_IsContentProcess()) { - gfx::VRManagerChild::ShutDown(); // cf bug 1215265. if (gfxPrefs::ChildProcessShutdown()) { layers::CompositorBridgeChild::ShutDown(); layers::ImageBridgeChild::ShutDown(); } } else if (XRE_IsParentProcess()) { - gfx::VRManagerChild::ShutDown(); layers::CompositorBridgeChild::ShutDown(); layers::ImageBridgeChild::ShutDown(); @@ -2441,13 +2415,6 @@ gfxPlatform::NotifyCompositorCreated(LayersBackend aBackend) // Set the backend before we notify so it's available immediately. mCompositorBackend = aBackend; - - // Notify that we created a compositor, so telemetry can update. - NS_DispatchToMainThread(NS_NewRunnableFunction([] { - if (nsCOMPtr<nsIObserverService> obsvc = services::GetObserverService()) { - obsvc->NotifyObservers(nullptr, "compositor:created", nullptr); - } - })); } void diff --git a/gfx/thebes/gfxPlatformFontList.cpp b/gfx/thebes/gfxPlatformFontList.cpp index 59df40666..5f7bbb832 100644 --- a/gfx/thebes/gfxPlatformFontList.cpp +++ b/gfx/thebes/gfxPlatformFontList.cpp @@ -21,7 +21,6 @@ #include "mozilla/Likely.h" #include "mozilla/MemoryReporting.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "mozilla/TimeStamp.h" #include "mozilla/gfx/2D.h" @@ -322,7 +321,6 @@ gfxPlatformFontList::InitOtherFamilyNames() mOtherFamilyNamesInitialized = true; } TimeStamp end = TimeStamp::Now(); - if (LOG_FONTINIT_ENABLED()) { TimeDuration elapsed = end - start; LOG_FONTINIT(("(fontinit) InitOtherFamilyNames took %8.2f ms %s", @@ -470,7 +468,7 @@ gfxPlatformFontList::GetFontList(nsIAtom *aLangGroup, { for (auto iter = mFontFamilies.Iter(); !iter.Done(); iter.Next()) { RefPtr<gfxFontFamily>& family = iter.Data(); - // use the first variation for now. This data should be the same + // use the first variation for now. This data should be the same // for all the variations and should probably be moved up to // the Family gfxFontStyle style; @@ -578,12 +576,6 @@ gfxPlatformFontList::SystemFindFontForChar(uint32_t aCh, uint32_t aNextCh, } else if (aCh == 0xFFFD && fontEntry && fallbackFamily) { mReplacementCharFallbackFamily = fallbackFamily; } - - // track system fallback time - static bool first = true; - int32_t intElapsed = int32_t(first ? elapsed.ToMilliseconds() : - elapsed.ToMicroseconds()); - first = false; return fontEntry; } diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index b1ede7ad2..82e36efe2 100755 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -22,7 +22,6 @@ #include "nsIGfxInfo.h" #include "nsServiceManagerUtils.h" #include "nsTArray.h" -#include "mozilla/Telemetry.h" #include "GeckoProfiler.h" #include "nsIWindowsRegKey.h" @@ -1435,12 +1434,6 @@ gfxWindowsPlatform::InitializeD3D11Config() } } -/* static */ void -gfxWindowsPlatform::RecordContentDeviceFailure(TelemetryDeviceCode aDevice) -{ - /* STUB */ -} - void gfxWindowsPlatform::InitializeDevices() { @@ -1478,18 +1471,9 @@ gfxWindowsPlatform::InitializeDevices() return; } - bool shouldUseD2D = gfxConfig::IsEnabled(Feature::DIRECT2D); - // First, initialize D3D11. If this succeeds we attempt to use Direct2D. InitializeD3D11(); InitializeD2D(); - - if (!gfxConfig::IsEnabled(Feature::DIRECT2D) && - XRE_IsContentProcess() && - shouldUseD2D) - { - RecordContentDeviceFailure(TelemetryDeviceCode::D2D1); - } } void diff --git a/gfx/thebes/gfxWindowsPlatform.h b/gfx/thebes/gfxWindowsPlatform.h index f401038fc..129365f82 100644 --- a/gfx/thebes/gfxWindowsPlatform.h +++ b/gfx/thebes/gfxWindowsPlatform.h @@ -225,8 +225,6 @@ public: } bool SupportsPluginDirectDXGIDrawing(); - static void RecordContentDeviceFailure(mozilla::gfx::TelemetryDeviceCode aDevice); - protected: bool AccelerateLayersByDefault() override { return true; |