Skip to content

Commit

Permalink
Bug 1318780 - Split CompositorVsyncScheduleOwner to its own file r=kats
Browse files Browse the repository at this point in the history
--HG--
rename : gfx/layers/ipc/CompositorVsyncScheduler.h => gfx/layers/ipc/CompositorVsyncSchedulerOwner.h
  • Loading branch information
Sotaro Ikeda authored and rainemak committed May 27, 2020
1 parent 0806405 commit a2433c8
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 8 deletions.
1 change: 1 addition & 0 deletions gfx/layers/ipc/CompositorBridgeParent.cpp
Expand Up @@ -41,6 +41,7 @@
#include "mozilla/layers/CompositorOGL.h" // for CompositorOGL
#include "mozilla/layers/CompositorThread.h"
#include "mozilla/layers/CompositorTypes.h"
#include "mozilla/layers/CompositorVsyncScheduler.h"
#include "mozilla/layers/CrossProcessCompositorBridgeParent.h"
#include "mozilla/layers/FrameUniformityData.h"
#include "mozilla/layers/ImageBridgeParent.h"
Expand Down
3 changes: 2 additions & 1 deletion gfx/layers/ipc/CompositorBridgeParent.h
Expand Up @@ -28,7 +28,7 @@
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/SharedMemory.h"
#include "mozilla/layers/CompositorController.h"
#include "mozilla/layers/CompositorVsyncScheduler.h"
#include "mozilla/layers/CompositorVsyncSchedulerOwner.h"
#include "mozilla/layers/GeckoContentController.h"
#include "mozilla/layers/ISurfaceAllocator.h" // for ShmemAllocator
#include "mozilla/layers/LayersMessages.h" // for TargetConfig
Expand Down Expand Up @@ -63,6 +63,7 @@ class APZCTreeManagerParent;
class AsyncCompositionManager;
class Compositor;
class CompositorBridgeParent;
class CompositorVsyncScheduler;
class LayerManagerComposite;
class LayerTransactionParent;
class PAPZParent;
Expand Down
1 change: 1 addition & 0 deletions gfx/layers/ipc/CompositorVsyncScheduler.cpp
Expand Up @@ -21,6 +21,7 @@
#include "mozilla/gfx/Point.h" // for IntSize
#include "mozilla/gfx/Rect.h" // for IntSize
#include "mozilla/layers/CompositorThread.h"
#include "mozilla/layers/CompositorVsyncSchedulerOwner.h"
#include "mozilla/mozalloc.h" // for operator new, etc
#include "nsCOMPtr.h" // for already_AddRefed
#include "nsDebug.h" // for NS_ASSERTION, etc
Expand Down
8 changes: 1 addition & 7 deletions gfx/layers/ipc/CompositorVsyncScheduler.h
Expand Up @@ -32,13 +32,7 @@ class DrawTarget;

namespace layers {

class CompositorVsyncSchedulerOwner
{
public:
virtual bool IsPendingComposite() = 0;
virtual void FinishPendingComposite() = 0;
virtual void CompositeToTarget(gfx::DrawTarget* aTarget, const gfx::IntRect* aRect = nullptr) = 0;
};
class CompositorVsyncSchedulerOwner;

/**
* Manages the vsync (de)registration and tracking on behalf of the
Expand Down
29 changes: 29 additions & 0 deletions gfx/layers/ipc/CompositorVsyncSchedulerOwner.h
@@ -0,0 +1,29 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=4 ts=8 et tw=80 : */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef mozilla_layers_CompositorVsyncSchedulerOwner_h
#define mozilla_layers_CompositorVsyncSchedulerOwner_h

namespace mozilla {

namespace gfx {
class DrawTarget;
} // namespace gfx

namespace layers {

class CompositorVsyncSchedulerOwner
{
public:
virtual bool IsPendingComposite() = 0;
virtual void FinishPendingComposite() = 0;
virtual void CompositeToTarget(gfx::DrawTarget* aTarget, const gfx::IntRect* aRect = nullptr) = 0;
};

} // namespace layers
} // namespace mozilla

#endif // mozilla_layers_CompositorVsyncSchedulerOwner_h
1 change: 1 addition & 0 deletions gfx/layers/moz.build
Expand Up @@ -169,6 +169,7 @@ EXPORTS.mozilla.layers += [
'ipc/CompositorBridgeParent.h',
'ipc/CompositorThread.h',
'ipc/CompositorVsyncScheduler.h',
'ipc/CompositorVsyncSchedulerOwner.h',
'ipc/CrossProcessCompositorBridgeParent.h',
'ipc/GonkNativeHandle.h',
'ipc/GonkNativeHandleUtils.h',
Expand Down

0 comments on commit a2433c8

Please sign in to comment.