DisplayExtn: Extend interface to support async commit.

Change-Id: I70919add71d8bbdf7d6fd30041475a4d9419d6c2
This commit is contained in:
Ramakant Singh
2020-12-21 12:52:44 +05:30
committed by Gerrit - the friendly Code Review server
parent 4bd6cb01ef
commit df1244ab37

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -30,11 +30,43 @@
#ifndef __DISP_EXTN_INTF_H__
#define __DISP_EXTN_INTF_H__
#include <vector>
#include <list>
#include <ui/Fence.h>
#define EARLY_WAKEUP_FEATURE 1
#define DYNAMIC_EARLY_WAKEUP_CONFIG 1
namespace composer {
struct LayerFlags {
bool secure_camera = false;
bool secure_video = false;
bool secure_ui = false;
bool compatible = false;
};
struct FBTLayerInfo {
int32_t width = 0;
int32_t height = 0;
int32_t dataspace = 0;
int32_t max_buffer_count = 3;
bool secure = false;
bool operator != (FBTLayerInfo &f) {
return (width != f.width ||
height != f.height ||
dataspace != f.dataspace ||
secure != f.secure);
}
};
struct FBTSlotInfo {
int index = -1;
android::sp<android::Fence> fence = android::Fence::NO_FENCE;
bool predicted = false;
};
class DisplayExtnIntf {
public:
virtual int SetContentFps(uint32_t fps) = 0;
@@ -44,6 +76,11 @@ class DisplayExtnIntf {
virtual int NotifyEarlyWakeUp(bool gpu, bool display) = 0;
virtual int NotifyDisplayEarlyWakeUp(uint32_t display_id) = 0;
virtual int SetEarlyWakeUpConfig(uint32_t display_id, bool enable) = 0;
virtual int TryUnifiedDraw(uint32_t display_id, int32_t max_frameBuffer) = 0;
virtual int BeginDraw(uint32_t display_id, std::vector<LayerFlags> &layers,
const FBTLayerInfo fbt_info, const FBTSlotInfo &fbt_current,
FBTSlotInfo &fbt_future) = 0;
virtual int EndDraw(uint32_t display_id, const FBTSlotInfo &fbt_current) = 0;
protected:
virtual ~DisplayExtnIntf() { }