diff options
author | Arun Kumar K.R <akumarkr@codeaurora.org> | 2015-10-07 18:27:03 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-10-26 14:20:43 -0700 |
commit | 81c57b314972b8f15e450b71fbafa1c826e914a2 (patch) | |
tree | 68eaf4ff6586fe4c40fd826167b85c7223dcbc0d /services/surfaceflinger/DisplayHardware | |
parent | c57c920c266e761ac7940aa3f48672dbdbada965 (diff) | |
download | frameworks_native-81c57b314972b8f15e450b71fbafa1c826e914a2.zip frameworks_native-81c57b314972b8f15e450b71fbafa1c826e914a2.tar.gz frameworks_native-81c57b314972b8f15e450b71fbafa1c826e914a2.tar.bz2 |
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
Diffstat (limited to 'services/surfaceflinger/DisplayHardware')
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.cpp | 21 | ||||
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.h | 1 |
2 files changed, 19 insertions, 3 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index 5bdcd7f..33a09f8 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -36,6 +36,9 @@ #include <hardware/hardware.h> #include <hardware/hwcomposer.h> +#ifdef QTI_BSP +#include <exhwcomposer_defs.h> +#endif #include <android/configuration.h> @@ -692,13 +695,14 @@ status_t HWComposer::prepare() { disp.hasFbComp = false; disp.hasOvComp = false; if (disp.list) { - for (size_t i=0 ; i<disp.list->numHwLayers ; i++) { - hwc_layer_1_t& l = disp.list->hwLayers[i]; + for (size_t j=0 ; j<disp.list->numHwLayers ; j++) { + hwc_layer_1_t& l = disp.list->hwLayers[j]; //ALOGD("prepare: %d, type=%d, handle=%p", // 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; } 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() { hwc_layer_1_t* const l = getLayer(); l->compositionType = HWC_FRAMEBUFFER; diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h index ea9a208..89ed4e9 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.h +++ b/services/surfaceflinger/DisplayHardware/HWComposer.h @@ -181,6 +181,7 @@ public: virtual void setAcquireFenceFd(int fenceFd) = 0; virtual void setPlaneAlpha(uint8_t alpha) = 0; virtual void onDisplayed() = 0; + virtual void setAnimating(bool animating)= 0; }; /* |