| 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; | 
| Ady Abraham | 8287e85 | 2020-08-12 14:44:58 -0700 | [diff] [blame] | 30 | std::unique_ptr<scheduler::VsyncConfiguration> createVsyncConfiguration( | 
| Marin Shalamanov | 526c338 | 2020-12-10 15:22:29 +0100 | [diff] [blame] | 31 | Fps currentRefreshRate) override; | 
| Lloyd Pique | 24f3bfe | 2019-10-02 19:29:10 -0700 | [diff] [blame] | 32 | sp<StartPropertySetThread> createStartPropertySetThread(bool timestampPropertyValue) override; | 
| Lloyd Pique | 9370a48 | 2019-10-03 17:58:30 -0700 | [diff] [blame] | 33 | sp<DisplayDevice> createDisplayDevice(DisplayDeviceCreationArgs&) override; | 
| Lloyd Pique | 24f3bfe | 2019-10-02 19:29:10 -0700 | [diff] [blame] | 34 | sp<GraphicBuffer> createGraphicBuffer(uint32_t width, uint32_t height, PixelFormat format, | 
|  | 35 | uint32_t layerCount, uint64_t usage, | 
|  | 36 | std::string requestorName) override; | 
|  | 37 | void createBufferQueue(sp<IGraphicBufferProducer>* outProducer, | 
|  | 38 | sp<IGraphicBufferConsumer>* outConsumer, | 
|  | 39 | bool consumerIsSurfaceFlinger) override; | 
| Lloyd Pique | 24f3bfe | 2019-10-02 19:29:10 -0700 | [diff] [blame] | 40 | std::unique_ptr<surfaceflinger::NativeWindowSurface> createNativeWindowSurface( | 
|  | 41 | const sp<IGraphicBufferProducer>&) override; | 
|  | 42 | std::unique_ptr<compositionengine::CompositionEngine> createCompositionEngine() override; | 
| Patrick Williams | 83f36b2 | 2022-09-14 17:57:35 +0000 | [diff] [blame] | 43 | sp<Layer> createBufferStateLayer(const LayerCreationArgs& args) override; | 
| Patrick Williams | 46b61b9 | 2022-09-01 17:25:49 +0000 | [diff] [blame] | 44 | sp<Layer> createEffectLayer(const LayerCreationArgs& args) override; | 
| Vishnu Nair | e14c6b3 | 2022-08-06 04:20:15 +0000 | [diff] [blame] | 45 | sp<LayerFE> createLayerFE(const std::string& layerName) override; | 
| Adithya Srinivasan | 2db3c1b | 2020-11-18 12:43:17 -0800 | [diff] [blame] | 46 | std::unique_ptr<FrameTracer> createFrameTracer() override; | 
| Adithya Srinivasan | 0118967 | 2020-10-20 14:23:05 -0700 | [diff] [blame] | 47 | std::unique_ptr<frametimeline::FrameTimeline> createFrameTimeline( | 
| Adithya Srinivasan | 9b2ca3e | 2020-11-10 10:14:17 -0800 | [diff] [blame] | 48 | std::shared_ptr<TimeStats> timeStats, pid_t surfaceFlingerPid) override; | 
| Lloyd Pique | 24f3bfe | 2019-10-02 19:29:10 -0700 | [diff] [blame] | 49 | }; | 
|  | 50 |  | 
|  | 51 | } // namespace android::surfaceflinger |