diff options
author | feifanz <feifanz@codeaurora.org> | 2016-04-27 12:23:28 +0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-07-31 14:15:30 -0700 |
commit | 537364c7229cb7d5d63b4683a34e47db6aa013bd (patch) | |
tree | 520d003ef30cc809522bcf872365015bcad3c9cc /services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp | |
parent | 8cafa373aa14b21981627e0ba9ea96731254183d (diff) | |
download | frameworks_native-537364c7229cb7d5d63b4683a34e47db6aa013bd.zip frameworks_native-537364c7229cb7d5d63b4683a34e47db6aa013bd.tar.gz frameworks_native-537364c7229cb7d5d63b4683a34e47db6aa013bd.tar.bz2 |
SF: Add support to draw S3D framebuffer target
Add support to draw S3D framebuffer target in case HWC driver
can not handle due to resource or capability issue.
Change-Id: I536fa4a03e246d51891045b692d5dc5be88f2adf
CRs-fixed: 999055
Diffstat (limited to 'services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp')
-rw-r--r-- | services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp b/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp index 2b41098..6b228ed 100644 --- a/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp +++ b/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp @@ -31,6 +31,8 @@ #include "ExHWComposer.h" #ifdef QTI_BSP #include <hardware/display_defs.h> +#include <gralloc_priv.h> +#include <qdMetaData.h> #endif namespace android { @@ -74,4 +76,25 @@ bool ExHWComposer::isCompositionTypeBlit(const int32_t compType) const { return false; } +#ifdef QTI_BSP +uint32_t ExHWComposer::getS3DFlag(int disp) const { + const DisplayData& disp_data(mDisplayData[disp]); + + for (size_t i=0 ; i<disp_data.list->numHwLayers-1; i++) { + const hwc_layer_1_t &l = disp_data.list->hwLayers[i]; + private_handle_t *pvt_handle = static_cast<private_handle_t *> + (const_cast<native_handle_t*>(l.handle)); + + if (pvt_handle != NULL) { + struct S3DSFRender_t s3dRender; + getMetaData(pvt_handle, GET_S3D_RENDER, &s3dRender); + if (s3dRender.DisplayId == static_cast<uint32_t>(disp) && s3dRender.GpuRender) { + return s3dRender.GpuS3dFormat; + } + } + } + return 0; +} +#endif + }; // namespace android |