summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/SurfaceFlingerFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/SurfaceFlingerFactory.h')
-rw-r--r--services/surfaceflinger/SurfaceFlingerFactory.h31
1 files changed, 18 insertions, 13 deletions
diff --git a/services/surfaceflinger/SurfaceFlingerFactory.h b/services/surfaceflinger/SurfaceFlingerFactory.h
index 6f4fcc6900..885297fc30 100644
--- a/services/surfaceflinger/SurfaceFlingerFactory.h
+++ b/services/surfaceflinger/SurfaceFlingerFactory.h
@@ -16,6 +16,8 @@
#pragma once
+#include "Fps.h"
+
#include <cutils/compiler.h>
#include <utils/StrongPointer.h>
@@ -34,21 +36,21 @@ class BufferLayerConsumer;
class EffectLayer;
class ContainerLayer;
class DisplayDevice;
-class DispSync;
-class EventControlThread;
+class FrameTracer;
class GraphicBuffer;
class HWComposer;
class IGraphicBufferConsumer;
class IGraphicBufferProducer;
-class ISchedulerCallback;
class Layer;
class MessageQueue;
class Scheduler;
class StartPropertySetThread;
class SurfaceFlinger;
class SurfaceInterceptor;
+class TimeStats;
struct DisplayDeviceCreationArgs;
+struct ISchedulerCallback;
struct LayerCreationArgs;
namespace compositionengine {
@@ -56,10 +58,15 @@ class CompositionEngine;
} // namespace compositionengine
namespace scheduler {
-class PhaseConfiguration;
+class VsyncConfiguration;
+class VsyncController;
class RefreshRateConfigs;
} // namespace scheduler
+namespace frametimeline {
+class FrameTimeline;
+} // namespace frametimeline
+
namespace surfaceflinger {
class NativeWindowSurface;
@@ -68,18 +75,13 @@ class NativeWindowSurface;
// of each interface.
class Factory {
public:
- using SetVSyncEnabled = std::function<void(bool)>;
-
- virtual std::unique_ptr<DispSync> createDispSync(const char* name, bool hasSyncFramework) = 0;
- virtual std::unique_ptr<EventControlThread> createEventControlThread(SetVSyncEnabled) = 0;
virtual std::unique_ptr<HWComposer> createHWComposer(const std::string& serviceName) = 0;
virtual std::unique_ptr<MessageQueue> createMessageQueue() = 0;
- virtual std::unique_ptr<scheduler::PhaseConfiguration> createPhaseConfiguration(
- const scheduler::RefreshRateConfigs&) = 0;
- virtual std::unique_ptr<Scheduler> createScheduler(SetVSyncEnabled,
- const scheduler::RefreshRateConfigs&,
+ virtual std::unique_ptr<scheduler::VsyncConfiguration> createVsyncConfiguration(
+ Fps currentRefreshRate) = 0;
+ virtual std::unique_ptr<Scheduler> createScheduler(const scheduler::RefreshRateConfigs&,
ISchedulerCallback&) = 0;
- virtual std::unique_ptr<SurfaceInterceptor> createSurfaceInterceptor(SurfaceFlinger*) = 0;
+ virtual sp<SurfaceInterceptor> createSurfaceInterceptor() = 0;
virtual sp<StartPropertySetThread> createStartPropertySetThread(
bool timestampPropertyValue) = 0;
@@ -106,6 +108,9 @@ public:
virtual sp<BufferStateLayer> createBufferStateLayer(const LayerCreationArgs& args) = 0;
virtual sp<EffectLayer> createEffectLayer(const LayerCreationArgs& args) = 0;
virtual sp<ContainerLayer> createContainerLayer(const LayerCreationArgs& args) = 0;
+ virtual std::unique_ptr<FrameTracer> createFrameTracer() = 0;
+ virtual std::unique_ptr<frametimeline::FrameTimeline> createFrameTimeline(
+ std::shared_ptr<TimeStats> timeStats, pid_t surfaceFlingerPid) = 0;
protected:
~Factory() = default;