sdm: add check for disabling external animation
In current design the flag passed from clients is used to disable external animation. Refine this flag to two parts, one is to indicate whether animation is present, another is to check the system property and disable external animation. So other functions can know the presence of animation layers if necessary. CRs-fixed: 1019601 Change-Id: Ib6ffb7a28d6935b86bc93abc82049b77b3ddcd08
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
757f1a29c1
commit
f2ecade773
@@ -76,6 +76,7 @@ class Debug {
|
||||
static bool IsScalarDisabled();
|
||||
static bool IsUbwcTiledFrameBuffer();
|
||||
static bool IsAVRDisabled();
|
||||
static bool IsExtAnimDisabled();
|
||||
static bool GetProperty(const char *property_name, char *value);
|
||||
static bool SetProperty(const char *property_name, const char *value);
|
||||
|
||||
|
||||
@@ -109,6 +109,8 @@ int HWCDisplay::Init() {
|
||||
s3d_format_hwc_to_sdm_.insert(std::pair<int, LayerBufferS3DFormat>(HAL_3D_TOP_BOTTOM,
|
||||
kS3dFormatTopBottom));
|
||||
|
||||
disable_animation_ = Debug::IsExtAnimDisabled();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -737,9 +739,11 @@ int HWCDisplay::PostCommitLayerStack(hwc_display_contents_1_t *content_list) {
|
||||
// framebuffer layer throughout animation and do not allow framework to do eglswapbuffer on
|
||||
// framebuffer target. So graphics doesn't close the release fence fd of framebuffer target,
|
||||
// Hence close the release fencefd of framebuffer target here.
|
||||
if (layer->composition == kCompositionGPUTarget && animating_) {
|
||||
close(hwc_layer.releaseFenceFd);
|
||||
hwc_layer.releaseFenceFd = -1;
|
||||
if (disable_animation_) {
|
||||
if (layer->composition == kCompositionGPUTarget && animating_) {
|
||||
close(hwc_layer.releaseFenceFd);
|
||||
hwc_layer.releaseFenceFd = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -207,6 +207,7 @@ class HWCDisplay : public DisplayEventHandler {
|
||||
bool secure_display_active_ = false;
|
||||
bool skip_prepare_ = false;
|
||||
bool solid_fill_enable_ = false;
|
||||
bool disable_animation_ = false;
|
||||
uint32_t solid_fill_color_ = 0;
|
||||
LayerRect display_rect_;
|
||||
std::map<int, LayerBufferS3DFormat> s3d_format_hwc_to_sdm_;
|
||||
|
||||
@@ -154,6 +154,13 @@ bool Debug::IsAVRDisabled() {
|
||||
return (value == 1);
|
||||
}
|
||||
|
||||
bool Debug::IsExtAnimDisabled() {
|
||||
int value = 0;
|
||||
debug_.debug_handler_->GetProperty("sys.disable_ext_animation", &value);
|
||||
|
||||
return (value == 1);
|
||||
}
|
||||
|
||||
bool Debug::GetProperty(const char* property_name, char* value) {
|
||||
if (debug_.debug_handler_->GetProperty(property_name, value) != kErrorNone) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user