From 425b9f85983b08834f48004a3e9be8d29760f967 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Thu, 1 Feb 2018 16:28:53 -0500 Subject: [PATCH] Bug 1435022 - Document some methods. r=sotaro MozReview-Commit-ID: CItOABKtjRl --HG-- extra : rebase_source : 702981068a9176f98e66d7466d5ced742a2a9e6a --- gfx/layers/ipc/CompositorVsyncScheduler.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gfx/layers/ipc/CompositorVsyncScheduler.h b/gfx/layers/ipc/CompositorVsyncScheduler.h index 7bf3a6ce9893..79885e70a74e 100644 --- a/gfx/layers/ipc/CompositorVsyncScheduler.h +++ b/gfx/layers/ipc/CompositorVsyncScheduler.h @@ -48,6 +48,10 @@ public: explicit CompositorVsyncScheduler(CompositorVsyncSchedulerOwner* aVsyncSchedulerOwner, widget::CompositorWidget* aWidget); + /** + * Notify this class of a vsync. This will trigger a composite if one is + * needed. This must be called from the vsync dispatch thread. + */ bool NotifyVsync(TimeStamp aVsyncTimestamp); /** @@ -55,9 +59,28 @@ public: */ void Destroy(); + /** + * Notify this class that a composition is needed. This will trigger a + * composition soon (likely at the next vsync). This must be called on the + * compositor thread. + */ void ScheduleComposition(); + + /** + * Cancel any composite task that has been scheduled but hasn't run yet. + */ void CancelCurrentCompositeTask(); + + /** + * Check if a composite is pending. This is generally true between a call + * to ScheduleComposition() and the time the composite happens. + */ bool NeedsComposite(); + + /** + * Force a composite to happen right away, without waiting for the next vsync. + * This must be called on the compositor thread. + */ void ForceComposeToTarget(gfx::DrawTarget* aTarget, const gfx::IntRect* aRect); const TimeStamp& GetLastComposeTime()