Bug 1435022 - Remove useless code (mExpectedComposeStartTime is never assigned). r?sotaro
MozReview-Commit-ID: LEgR6JFy0Ys
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -947,25 +947,16 @@ CompositorBridgeParent::CompositeToTarge
{
AUTO_PROFILER_TRACING("Paint", "Composite");
AUTO_PROFILER_LABEL("CompositorBridgeParent::CompositeToTarget", GRAPHICS);
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread(),
"Composite can only be called on the compositor thread");
TimeStamp start = TimeStamp::Now();
-#ifdef COMPOSITOR_PERFORMANCE_WARNING
- TimeDuration scheduleDelta = TimeStamp::Now() - mCompositorScheduler->GetExpectedComposeStartTime();
- if (scheduleDelta > TimeDuration::FromMilliseconds(2) ||
- scheduleDelta < TimeDuration::FromMilliseconds(-2)) {
- printf_stderr("Compositor: Compose starting off schedule by %4.1f ms\n",
- scheduleDelta.ToMilliseconds());
- }
-#endif
-
if (!CanComposite()) {
TimeStamp end = TimeStamp::Now();
DidComposite(start, end);
return;
}
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
if (!mWaitForPluginsUntil.IsNull() &&
--- a/gfx/layers/ipc/CompositorVsyncScheduler.h
+++ b/gfx/layers/ipc/CompositorVsyncScheduler.h
@@ -83,22 +83,16 @@ public:
*/
void ForceComposeToTarget(gfx::DrawTarget* aTarget, const gfx::IntRect* aRect);
/**
* Return the vsync timestamp of the last or ongoing composite. Must be called
* on the compositor thread.
*/
const TimeStamp& GetLastComposeTime() const;
-#ifdef COMPOSITOR_PERFORMANCE_WARNING
- const TimeStamp& GetExpectedComposeStartTime()
- {
- return mExpectedComposeStartTime;
- }
-#endif
private:
virtual ~CompositorVsyncScheduler();
// Schedule a task to run on the compositor thread.
void ScheduleTask(already_AddRefed<CancelableRunnable>);
// Post a task to run Composite() on the compositor thread, if there isn't
@@ -131,20 +125,16 @@ private:
Mutex mMutex;
// Hold raw pointer to avoid mutual reference.
CompositorVsyncScheduler* mOwner;
};
CompositorVsyncSchedulerOwner* mVsyncSchedulerOwner;
TimeStamp mLastCompose;
-#ifdef COMPOSITOR_PERFORMANCE_WARNING
- TimeStamp mExpectedComposeStartTime;
-#endif
-
bool mAsapScheduling;
bool mIsObservingVsync;
uint32_t mNeedsComposite;
int32_t mVsyncNotificationsSkipped;
widget::CompositorWidget* mWidget;
RefPtr<CompositorVsyncScheduler::Observer> mVsyncObserver;
mozilla::Monitor mCurrentCompositeTaskMonitor;