1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 
7 #ifndef mozilla_layers_CompositorVsyncSchedulerOwner_h
8 #define mozilla_layers_CompositorVsyncSchedulerOwner_h
9 
10 #include "mozilla/VsyncDispatcher.h"
11 
12 namespace mozilla {
13 
14 namespace gfx {
15 class DrawTarget;
16 }  // namespace gfx
17 
18 namespace layers {
19 
20 class CompositorVsyncSchedulerOwner {
21  public:
22   virtual bool IsPendingComposite() = 0;
23   virtual void FinishPendingComposite() = 0;
24   virtual void CompositeToTarget(VsyncId aId, gfx::DrawTarget* aTarget,
25                                  const gfx::IntRect* aRect = nullptr) = 0;
26   virtual TimeDuration GetVsyncInterval() const = 0;
27 };
28 
29 }  // namespace layers
30 }  // namespace mozilla
31 
32 #endif  // mozilla_layers_CompositorVsyncSchedulerOwner_h
33