From 193a8c93342e0b0677540cc70850e43317c54992 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Mon, 1 Aug 2016 13:21:58 -0700 Subject: surfaceflinger: Isolate S3D code to msm8996 only Change-Id: Ie4b77b55eb306c795b452c59d8ae3383bd2804bc --- services/surfaceflinger/Android.mk | 3 +++ services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp | 2 +- services/surfaceflinger/ExSurfaceFlinger/ExLayer.cpp | 8 ++++---- services/surfaceflinger/SurfaceFlinger.cpp | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk index 2d907fa..0bbdac0 100644 --- a/services/surfaceflinger/Android.mk +++ b/services/surfaceflinger/Android.mk @@ -122,6 +122,9 @@ ifeq ($(TARGET_USES_QCOM_BSP), true) LOCAL_SHARED_LIBRARIES += libqdutils LOCAL_SHARED_LIBRARIES += libqdMetaData LOCAL_CFLAGS += -DQTI_BSP + ifeq ($(call is-board-platform-in-list,msm8996),true) + LOCAL_CFLAGS += -DSDM_TARGET + endif LOCAL_SRC_FILES += \ ExSurfaceFlinger/ExLayer.cpp \ ExSurfaceFlinger/ExSurfaceFlinger.cpp \ diff --git a/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp b/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp index 6b228ed..64a67e5 100644 --- a/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp +++ b/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp @@ -76,7 +76,7 @@ bool ExHWComposer::isCompositionTypeBlit(const int32_t compType) const { return false; } -#ifdef QTI_BSP +#if defined(QTI_BSP) && defined(SDM_TARGET) uint32_t ExHWComposer::getS3DFlag(int disp) const { const DisplayData& disp_data(mDisplayData[disp]); diff --git a/services/surfaceflinger/ExSurfaceFlinger/ExLayer.cpp b/services/surfaceflinger/ExSurfaceFlinger/ExLayer.cpp index 5df34ed..875d47f 100644 --- a/services/surfaceflinger/ExSurfaceFlinger/ExLayer.cpp +++ b/services/surfaceflinger/ExSurfaceFlinger/ExLayer.cpp @@ -221,7 +221,7 @@ bool ExLayer::canAllowGPUForProtected() const { void ExLayer::drawWithOpenGL(const sp& hw, const Region& /* clip */, bool useIdentityTransform) const { const State& s(getDrawingState()); -#ifdef QTI_BSP +#if defined(QTI_BSP) && defined(SDM_TARGET) uint32_t s3d_fmt = 0; private_handle_t *pvt_handle = static_cast (const_cast(mActiveBuffer->handle)); @@ -278,14 +278,14 @@ void ExLayer::drawWithOpenGL(const sp& hw, texCoords[2] = vec2(right, 1.0f - bottom); texCoords[3] = vec2(right, 1.0f - top); -#ifdef QTI_BSP +#if defined(QTI_BSP) && defined(SDM_TARGET) computeGeometryS3D(hw, mMesh, mMeshLeftTop, mMeshRightBottom, s3d_fmt); #endif RenderEngine& engine(mFlinger->getRenderEngine()); engine.setupLayerBlending(mPremultipliedAlpha, isOpaque(s), s.alpha); -#ifdef QTI_BSP +#if defined(QTI_BSP) && defined(SDM_TARGET) if (s3d_fmt != HWC_S3DMODE_NONE) { engine.setScissor(0, 0, hw->getWidth(), hw->getHeight()); engine.drawMesh(mMeshLeftTop); @@ -293,7 +293,7 @@ void ExLayer::drawWithOpenGL(const sp& hw, } else { #endif engine.drawMesh(mMesh); -#ifdef QTI_BSP +#if defined(QTI_BSP) && defined(SDM_TARGET) } #endif diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 693e9d9..3070e45 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2004,7 +2004,7 @@ bool SurfaceFlinger::doComposeSurfaces(const sp& hw, const } // Never touch the framebuffer if we don't have any framebuffer layers -#ifdef QTI_BSP +#if defined(QTI_BSP) && defined(SDM_TARGET) const bool hasHwcComposition = hwc.hasHwcComposition(id) | (reinterpret_cast(&hwc))->getS3DFlag(id); #else -- cgit v1.1