sdm: color-manager: Detect first frame of UI to apply color-mode.
Default color-mode is applied on the first frame of UI screen. sdm.boot_anim_layer_count property is used to configure the number of layers in boot animation process. Any commit with more layers than sdm.boot_anim_layer_count is treated as first frame of UI and default color-mode is applied at this point. CRs-Fixed: 939410 Change-Id: Ib5c568819cd045f0de4ee7dcb4accfae9c27f5b2
This commit is contained in:
@@ -64,6 +64,7 @@ class Debug {
|
||||
static int GetSimulationFlag();
|
||||
static int GetHDMIResolution();
|
||||
static int GetIdleTimeoutMs();
|
||||
static int GetBootAnimLayerCount();
|
||||
static bool IsRotatorDownScaleDisabled();
|
||||
static bool IsDecimationDisabled();
|
||||
static int GetMaxPipesPerMixer(DisplayType display_type);
|
||||
|
||||
@@ -97,14 +97,17 @@ int HWCDisplayPrimary::Init() {
|
||||
return HWCDisplay::Init();
|
||||
}
|
||||
|
||||
void HWCDisplayPrimary::ProcessBootAnimCompleted() {
|
||||
char value[PROPERTY_VALUE_MAX];
|
||||
void HWCDisplayPrimary::ProcessBootAnimCompleted(hwc_display_contents_1_t *list) {
|
||||
uint32_t numBootUpLayers = 0;
|
||||
|
||||
// Applying default mode after bootanimation is finished
|
||||
property_get("init.svc.bootanim", value, "running");
|
||||
if (!strncmp(value, "stopped", strlen("stopped"))) {
|
||||
numBootUpLayers = static_cast<uint32_t>(Debug::GetBootAnimLayerCount());
|
||||
|
||||
if (numBootUpLayers == 0) {
|
||||
numBootUpLayers = 2;
|
||||
}
|
||||
|
||||
if (list->numHwLayers > numBootUpLayers) {
|
||||
boot_animation_completed_ = true;
|
||||
|
||||
// one-shot action check if bootanimation completed then apply default display mode.
|
||||
if (display_intf_)
|
||||
display_intf_->ApplyDefaultDisplayMode();
|
||||
@@ -116,7 +119,7 @@ int HWCDisplayPrimary::Prepare(hwc_display_contents_1_t *content_list) {
|
||||
DisplayError error = kErrorNone;
|
||||
|
||||
if (!boot_animation_completed_)
|
||||
ProcessBootAnimCompleted();
|
||||
ProcessBootAnimCompleted(content_list);
|
||||
|
||||
if (display_paused_) {
|
||||
MarkLayersForGPUBypass(content_list);
|
||||
|
||||
@@ -55,7 +55,7 @@ class HWCDisplayPrimary : public HWCDisplay {
|
||||
HWCDisplayPrimary(CoreInterface *core_intf, hwc_procs_t const **hwc_procs);
|
||||
void SetMetaDataRefreshRateFlag(bool enable);
|
||||
virtual DisplayError SetDisplayMode(uint32_t mode);
|
||||
void ProcessBootAnimCompleted();
|
||||
void ProcessBootAnimCompleted(hwc_display_contents_1_t *content_list);
|
||||
void SetQDCMSolidFillInfo(bool enable, uint32_t color);
|
||||
void ToggleCPUHint(bool set);
|
||||
void ForceRefreshRate(uint32_t refresh_rate);
|
||||
|
||||
@@ -59,6 +59,13 @@ int Debug::GetIdleTimeoutMs() {
|
||||
return value;
|
||||
}
|
||||
|
||||
int Debug::GetBootAnimLayerCount() {
|
||||
int value = 0;
|
||||
debug_.debug_handler_->GetProperty("sdm.boot_anim_layer_count", &value);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
bool Debug::IsRotatorDownScaleDisabled() {
|
||||
int value = 0;
|
||||
debug_.debug_handler_->GetProperty("sdm.debug.rotator_downscale", &value);
|
||||
|
||||
Reference in New Issue
Block a user