/* * Copyright 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include "SurfaceFlingerFactory.h" namespace android::surfaceflinger { // A default implementation of the factory which creates the standard // implementation types for each interface. class DefaultFactory : public surfaceflinger::Factory { public: virtual ~DefaultFactory(); std::unique_ptr createHWComposer(const std::string& serviceName) override; std::unique_ptr createMessageQueue() override; std::unique_ptr createVsyncConfiguration( Fps currentRefreshRate) override; std::unique_ptr createScheduler(const scheduler::RefreshRateConfigs&, ISchedulerCallback&) override; sp createSurfaceInterceptor() override; sp createStartPropertySetThread(bool timestampPropertyValue) override; sp createDisplayDevice(DisplayDeviceCreationArgs&) override; sp createGraphicBuffer(uint32_t width, uint32_t height, PixelFormat format, uint32_t layerCount, uint64_t usage, std::string requestorName) override; void createBufferQueue(sp* outProducer, sp* outConsumer, bool consumerIsSurfaceFlinger) override; sp createMonitoredProducer(const sp&, const sp&, const wp&) override; sp createBufferLayerConsumer(const sp&, renderengine::RenderEngine&, uint32_t tex, Layer*) override; std::unique_ptr createNativeWindowSurface( const sp&) override; std::unique_ptr createCompositionEngine() override; sp createBufferQueueLayer(const LayerCreationArgs& args) override; sp createBufferStateLayer(const LayerCreationArgs& args) override; sp createEffectLayer(const LayerCreationArgs& args) override; sp createContainerLayer(const LayerCreationArgs& args) override; std::unique_ptr createFrameTracer() override; std::unique_ptr createFrameTimeline( std::shared_ptr timeStats, pid_t surfaceFlingerPid) override; }; } // namespace android::surfaceflinger