| Lloyd Pique | 24f3bfe | 2019-10-02 19:29:10 -0700 | [diff] [blame] | 1 | /* | 
 | 2 |  * Copyright 2019 The Android Open Source Project | 
 | 3 |  * | 
 | 4 |  * Licensed under the Apache License, Version 2.0 (the "License"); | 
 | 5 |  * you may not use this file except in compliance with the License. | 
 | 6 |  * You may obtain a copy of the License at | 
 | 7 |  * | 
 | 8 |  *      http://www.apache.org/licenses/LICENSE-2.0 | 
 | 9 |  * | 
 | 10 |  * Unless required by applicable law or agreed to in writing, software | 
 | 11 |  * distributed under the License is distributed on an "AS IS" BASIS, | 
 | 12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
 | 13 |  * See the License for the specific language governing permissions and | 
 | 14 |  * limitations under the License. | 
 | 15 |  */ | 
 | 16 |  | 
 | 17 | #pragma once | 
 | 18 |  | 
 | 19 | #include "SurfaceFlingerFactory.h" | 
 | 20 |  | 
 | 21 | namespace android::surfaceflinger { | 
 | 22 |  | 
 | 23 | // A default implementation of the factory which creates the standard | 
 | 24 | // implementation types for each interface. | 
 | 25 | class DefaultFactory : public surfaceflinger::Factory { | 
 | 26 | public: | 
 | 27 |     virtual ~DefaultFactory(); | 
 | 28 |  | 
| Lloyd Pique | 24f3bfe | 2019-10-02 19:29:10 -0700 | [diff] [blame] | 29 |     std::unique_ptr<HWComposer> createHWComposer(const std::string& serviceName) override; | 
 | 30 |     std::unique_ptr<MessageQueue> createMessageQueue() override; | 
| Ady Abraham | 8287e85 | 2020-08-12 14:44:58 -0700 | [diff] [blame] | 31 |     std::unique_ptr<scheduler::VsyncConfiguration> createVsyncConfiguration( | 
| Marin Shalamanov | 526c338 | 2020-12-10 15:22:29 +0100 | [diff] [blame] | 32 |             Fps currentRefreshRate) override; | 
| Ady Abraham | 3efa394 | 2021-06-24 19:01:25 -0700 | [diff] [blame] | 33 |     std::unique_ptr<Scheduler> createScheduler( | 
 | 34 |             const std::shared_ptr<scheduler::RefreshRateConfigs>&, ISchedulerCallback&) override; | 
| Pablo Gamito | c351d6f | 2020-09-17 15:34:26 +0000 | [diff] [blame] | 35 |     sp<SurfaceInterceptor> createSurfaceInterceptor() override; | 
| Lloyd Pique | 24f3bfe | 2019-10-02 19:29:10 -0700 | [diff] [blame] | 36 |     sp<StartPropertySetThread> createStartPropertySetThread(bool timestampPropertyValue) override; | 
| Lloyd Pique | 9370a48 | 2019-10-03 17:58:30 -0700 | [diff] [blame] | 37 |     sp<DisplayDevice> createDisplayDevice(DisplayDeviceCreationArgs&) override; | 
| Lloyd Pique | 24f3bfe | 2019-10-02 19:29:10 -0700 | [diff] [blame] | 38 |     sp<GraphicBuffer> createGraphicBuffer(uint32_t width, uint32_t height, PixelFormat format, | 
 | 39 |                                           uint32_t layerCount, uint64_t usage, | 
 | 40 |                                           std::string requestorName) override; | 
 | 41 |     void createBufferQueue(sp<IGraphicBufferProducer>* outProducer, | 
 | 42 |                            sp<IGraphicBufferConsumer>* outConsumer, | 
 | 43 |                            bool consumerIsSurfaceFlinger) override; | 
| Lloyd Pique | e300b31 | 2019-10-03 13:03:45 -0700 | [diff] [blame] | 44 |     sp<IGraphicBufferProducer> createMonitoredProducer(const sp<IGraphicBufferProducer>&, | 
 | 45 |                                                        const sp<SurfaceFlinger>&, | 
 | 46 |                                                        const wp<Layer>&) override; | 
 | 47 |     sp<BufferLayerConsumer> createBufferLayerConsumer(const sp<IGraphicBufferConsumer>&, | 
 | 48 |                                                       renderengine::RenderEngine&, uint32_t tex, | 
 | 49 |                                                       Layer*) override; | 
| Lloyd Pique | 24f3bfe | 2019-10-02 19:29:10 -0700 | [diff] [blame] | 50 |     std::unique_ptr<surfaceflinger::NativeWindowSurface> createNativeWindowSurface( | 
 | 51 |             const sp<IGraphicBufferProducer>&) override; | 
 | 52 |     std::unique_ptr<compositionengine::CompositionEngine> createCompositionEngine() override; | 
 | 53 |     sp<BufferQueueLayer> createBufferQueueLayer(const LayerCreationArgs& args) override; | 
 | 54 |     sp<BufferStateLayer> createBufferStateLayer(const LayerCreationArgs& args) override; | 
| Vishnu Nair | fa247b1 | 2020-02-11 08:58:26 -0800 | [diff] [blame] | 55 |     sp<EffectLayer> createEffectLayer(const LayerCreationArgs& args) override; | 
| Lloyd Pique | 24f3bfe | 2019-10-02 19:29:10 -0700 | [diff] [blame] | 56 |     sp<ContainerLayer> createContainerLayer(const LayerCreationArgs& args) override; | 
| Adithya Srinivasan | 2db3c1b | 2020-11-18 12:43:17 -0800 | [diff] [blame] | 57 |     std::unique_ptr<FrameTracer> createFrameTracer() override; | 
| Adithya Srinivasan | 0118967 | 2020-10-20 14:23:05 -0700 | [diff] [blame] | 58 |     std::unique_ptr<frametimeline::FrameTimeline> createFrameTimeline( | 
| Adithya Srinivasan | 9b2ca3e | 2020-11-10 10:14:17 -0800 | [diff] [blame] | 59 |             std::shared_ptr<TimeStats> timeStats, pid_t surfaceFlingerPid) override; | 
| Lloyd Pique | 24f3bfe | 2019-10-02 19:29:10 -0700 | [diff] [blame] | 60 | }; | 
 | 61 |  | 
 | 62 | } // namespace android::surfaceflinger |