Bug 1273946: Get more information on the cause of the device reset. Remove unused UpdateRenderModeIfDeviceReset method. r?dvander
MozReview-Commit-ID: 6NxKTBEKOvs
--- a/gfx/thebes/gfxPlatform.h
+++ b/gfx/thebes/gfxPlatform.h
@@ -610,21 +610,16 @@ public:
bool SupportsApzDragInput() const;
virtual void FlushContentDrawing() {}
// If a device reset has occurred, schedule any necessary paints in the
// widget. This should only be used within nsRefreshDriver.
virtual void SchedulePaintIfDeviceReset() {}
- // Immediately update all platform bits if a device reset has occurred.
- // This should only be used at the top of the callstack (i.e. within
- // a task, OS event, or IPDL message).
- virtual void UpdateRenderModeIfDeviceReset() {}
-
/**
* Helper method, creates a draw target for a specific Azure backend.
* Used by CreateOffscreenDrawTarget.
*/
already_AddRefed<DrawTarget>
CreateDrawTargetForBackend(mozilla::gfx::BackendType aBackend,
const mozilla::gfx::IntSize& aSize,
mozilla::gfx::SurfaceFormat aFormat);
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1007,36 +1007,27 @@ InvalidateWindowForDeviceReset(HWND aWnd
return TRUE;
}
void
gfxWindowsPlatform::SchedulePaintIfDeviceReset()
{
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS);
- if (!DidRenderingDeviceReset()) {
+ DeviceResetReason resetReason = DeviceResetReason::OK;
+ if (!DidRenderingDeviceReset(&resetReason)) {
return;
}
// Trigger an ::OnPaint for each window.
::EnumThreadWindows(GetCurrentThreadId(),
InvalidateWindowForDeviceReset,
0);
- gfxCriticalNote << "Detected rendering device reset on refresh";
-}
-
-void
-gfxWindowsPlatform::UpdateRenderModeIfDeviceReset()
-{
- PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS);
-
- if (DidRenderingDeviceReset()) {
- UpdateRenderMode();
- }
+ gfxCriticalNote << "Detected rendering device reset on refresh: " << (int)resetReason;
}
void
gfxWindowsPlatform::GetPlatformCMSOutputProfile(void* &mem, size_t &mem_size)
{
WCHAR str[MAX_PATH];
DWORD size = MAX_PATH;
BOOL res;
--- a/gfx/thebes/gfxWindowsPlatform.h
+++ b/gfx/thebes/gfxWindowsPlatform.h
@@ -177,17 +177,16 @@ public:
* Check whether format is supported on a platform or not (if unclear, returns true)
*/
virtual bool IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags) override;
virtual void CompositorUpdated() override;
bool DidRenderingDeviceReset(DeviceResetReason* aResetReason = nullptr) override;
void SchedulePaintIfDeviceReset() override;
- void UpdateRenderModeIfDeviceReset() override;
mozilla::gfx::BackendType GetContentBackendFor(mozilla::layers::LayersBackend aLayers) override;
// ClearType is not always enabled even when available (e.g. Windows XP)
// if either of these prefs are enabled and apply, use ClearType rendering
bool UseClearTypeForDownloadableFonts();
bool UseClearTypeAlways();