SurfaceFlinger: Disable rotation animation on Secondary displays
- Add support to set animating layer for HWCLayers - After hwc_prepare, dont override the compType of a layer to HWC_FRAMEBUFFER if its for non-primary displays Change-Id: Iac462778ce5fb9016290846146e62f80dcfafd5c CRs-fixed: 922304
This commit is contained in:
parent
c57c920c26
commit
81c57b3149
@ -36,6 +36,9 @@
|
|||||||
|
|
||||||
#include <hardware/hardware.h>
|
#include <hardware/hardware.h>
|
||||||
#include <hardware/hwcomposer.h>
|
#include <hardware/hwcomposer.h>
|
||||||
|
#ifdef QTI_BSP
|
||||||
|
#include <exhwcomposer_defs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <android/configuration.h>
|
#include <android/configuration.h>
|
||||||
|
|
||||||
@ -692,13 +695,14 @@ status_t HWComposer::prepare() {
|
|||||||
disp.hasFbComp = false;
|
disp.hasFbComp = false;
|
||||||
disp.hasOvComp = false;
|
disp.hasOvComp = false;
|
||||||
if (disp.list) {
|
if (disp.list) {
|
||||||
for (size_t i=0 ; i<disp.list->numHwLayers ; i++) {
|
for (size_t j=0 ; j<disp.list->numHwLayers ; j++) {
|
||||||
hwc_layer_1_t& l = disp.list->hwLayers[i];
|
hwc_layer_1_t& l = disp.list->hwLayers[j];
|
||||||
|
|
||||||
//ALOGD("prepare: %d, type=%d, handle=%p",
|
//ALOGD("prepare: %d, type=%d, handle=%p",
|
||||||
// i, l.compositionType, l.handle);
|
// i, l.compositionType, l.handle);
|
||||||
|
|
||||||
if (l.flags & HWC_SKIP_LAYER) {
|
if ((i == DisplayDevice::DISPLAY_PRIMARY) &&
|
||||||
|
l.flags & HWC_SKIP_LAYER) {
|
||||||
l.compositionType = HWC_FRAMEBUFFER;
|
l.compositionType = HWC_FRAMEBUFFER;
|
||||||
}
|
}
|
||||||
if (l.compositionType == HWC_FRAMEBUFFER) {
|
if (l.compositionType == HWC_FRAMEBUFFER) {
|
||||||
@ -987,6 +991,17 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
virtual void setAnimating(bool animating) {
|
||||||
|
if (animating) {
|
||||||
|
#ifdef QTI_BSP
|
||||||
|
getLayer()->flags |= HWC_SCREENSHOT_ANIMATOR_LAYER;
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
#ifdef QTI_BSP
|
||||||
|
getLayer()->flags &= ~HWC_SCREENSHOT_ANIMATOR_LAYER;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
virtual void setDefaultState() {
|
virtual void setDefaultState() {
|
||||||
hwc_layer_1_t* const l = getLayer();
|
hwc_layer_1_t* const l = getLayer();
|
||||||
l->compositionType = HWC_FRAMEBUFFER;
|
l->compositionType = HWC_FRAMEBUFFER;
|
||||||
|
@ -181,6 +181,7 @@ public:
|
|||||||
virtual void setAcquireFenceFd(int fenceFd) = 0;
|
virtual void setAcquireFenceFd(int fenceFd) = 0;
|
||||||
virtual void setPlaneAlpha(uint8_t alpha) = 0;
|
virtual void setPlaneAlpha(uint8_t alpha) = 0;
|
||||||
virtual void onDisplayed() = 0;
|
virtual void onDisplayed() = 0;
|
||||||
|
virtual void setAnimating(bool animating)= 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user