61 lines
1.6 KiB
C++
61 lines
1.6 KiB
C++
/*
|
|
* Copyright (c) 2017 Amlogic, Inc. All rights reserved.
|
|
*
|
|
* This source code is subject to the terms and conditions defined in the
|
|
* file 'LICENSE' which is part of this source code package.
|
|
*
|
|
* Description:
|
|
*/
|
|
|
|
#ifndef CLIENT_COMPOSER_H
|
|
#define CLIENT_COMPOSER_H
|
|
|
|
#include <IComposer.h>
|
|
|
|
#define CLIENT_COMPOSER_NAME "Client"
|
|
|
|
/*
|
|
* ClientComposer: ask SurfaceFlinger to do composition.
|
|
*/
|
|
class ClientComposer : public IComposer {
|
|
public:
|
|
ClientComposer();
|
|
~ClientComposer();
|
|
|
|
const char* getName() { return CLIENT_COMPOSER_NAME; }
|
|
meson_composition_t getType() { return MESON_COMPOSITION_CLIENT; }
|
|
|
|
bool isFbsSupport(
|
|
std::vector<std::shared_ptr<DrmFramebufferBase>> & fbs,
|
|
std::vector<std::shared_ptr<DrmFramebufferBase>> & overlayfbs,
|
|
int composeIdx = 0);
|
|
|
|
int32_t prepare();
|
|
|
|
int32_t addInputs(
|
|
std::vector<std::shared_ptr<DrmFramebufferBase>> & fbs,
|
|
std::vector<std::shared_ptr<DrmFramebufferBase>> & overlayfbs,
|
|
int composeIdx = 0);
|
|
|
|
int32_t getOverlyFbs(std::vector<std::shared_ptr<DrmFramebufferBase>> & overlays);
|
|
|
|
int32_t setOutput(
|
|
std::shared_ptr<DrmFramebufferBase> & fb,
|
|
int composeIdx = 0);
|
|
|
|
int32_t start(int composeIdx = 0);
|
|
|
|
std::shared_ptr<DrmFramebufferBase> getOutput(int composeIdx = 0);
|
|
|
|
int32_t setReleaseFence() {return 0;}
|
|
int32_t enable(bool enable __unused) {return 0;}
|
|
|
|
protected:
|
|
/* protect of mClientTarget */
|
|
std::mutex mMutex;
|
|
std::shared_ptr<DrmFramebufferBase> mClientTarget;
|
|
std::vector<std::shared_ptr<DrmFramebufferBase>> mOverlayFbs;
|
|
};
|
|
|
|
#endif/*CLIENT_COMPOSER_H*/
|