summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/ExSurfaceFlinger/ExLayer.h
diff options
context:
space:
mode:
authorfeifanz <feifanz@codeaurora.org>2016-04-27 12:23:28 +0800
committerSteve Kondik <steve@cyngn.com>2016-07-31 14:15:30 -0700
commit537364c7229cb7d5d63b4683a34e47db6aa013bd (patch)
tree520d003ef30cc809522bcf872365015bcad3c9cc /services/surfaceflinger/ExSurfaceFlinger/ExLayer.h
parent8cafa373aa14b21981627e0ba9ea96731254183d (diff)
downloadframeworks_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/ExLayer.h')
-rw-r--r--services/surfaceflinger/ExSurfaceFlinger/ExLayer.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/services/surfaceflinger/ExSurfaceFlinger/ExLayer.h b/services/surfaceflinger/ExSurfaceFlinger/ExLayer.h
index 01c74a8..9d22b5f 100644
--- a/services/surfaceflinger/ExSurfaceFlinger/ExLayer.h
+++ b/services/surfaceflinger/ExSurfaceFlinger/ExLayer.h
@@ -43,6 +43,22 @@ class ExSurfaceFlinger;
class ExLayer : public Layer
{
public:
+#ifdef QTI_BSP
+ enum {
+ /*
+ * HWC S3D_MODE is set by HWC driver to indicate that HWC driver can not support
+ * S3D standalone, need surfaceflinger help to draw layers twice to construct
+ * S3D framebuffer target.
+ */
+ HWC_S3DMODE_NONE = 0x00000000,
+ HWC_S3DMODE_LR = 0x00000001,
+ HWC_S3DMODE_RL = 0x00000002,
+ HWC_S3DMODE_TB = 0x00000003,
+ HWC_S3DMODE_FP = 0x00000004,
+ HWC_S3DMODE_MAX = 0x00000005,
+ };
+#endif
+
ExLayer(SurfaceFlinger* flinger, const sp<Client>& client,
const String8& name, uint32_t w, uint32_t h, uint32_t flags);
virtual ~ExLayer();
@@ -57,11 +73,27 @@ public:
HWComposer::HWCLayerInterface& layer);
virtual bool canAllowGPUForProtected() const;
+#ifdef QTI_BSP
+ virtual void computeGeometryS3D(const sp<const DisplayDevice>& hw, Mesh& mesh,
+ Mesh& meshLeftTop, Mesh &meshRightBottom, uint32_t s3d_fmt) const;
+#endif
protected:
bool mDebugLogs;
bool isDebug() { return mDebugLogs; }
bool mIsGPUAllowedForProtected;
+ bool mIsHDMIPrimary;
+
+private:
+#ifdef QTI_BSP
+ // The mesh used to draw the layer in GLES composition mode for s3d left/top
+ mutable Mesh mMeshLeftTop;
+ // The mesh used to draw the layer in GLES composition mode for s3d right/bottom
+ mutable Mesh mMeshRightBottom;
+
+ virtual void drawWithOpenGL(const sp<const DisplayDevice>& hw, const Region& clip,
+ bool useIdentityTransform) const;
};
+#endif
}; // namespace android