surfaceflinger: Isolate S3D code to msm8996 only
Change-Id: Ie4b77b55eb306c795b452c59d8ae3383bd2804bc
This commit is contained in:
parent
534f857430
commit
193a8c9334
@ -122,6 +122,9 @@ ifeq ($(TARGET_USES_QCOM_BSP), true)
|
|||||||
LOCAL_SHARED_LIBRARIES += libqdutils
|
LOCAL_SHARED_LIBRARIES += libqdutils
|
||||||
LOCAL_SHARED_LIBRARIES += libqdMetaData
|
LOCAL_SHARED_LIBRARIES += libqdMetaData
|
||||||
LOCAL_CFLAGS += -DQTI_BSP
|
LOCAL_CFLAGS += -DQTI_BSP
|
||||||
|
ifeq ($(call is-board-platform-in-list,msm8996),true)
|
||||||
|
LOCAL_CFLAGS += -DSDM_TARGET
|
||||||
|
endif
|
||||||
LOCAL_SRC_FILES += \
|
LOCAL_SRC_FILES += \
|
||||||
ExSurfaceFlinger/ExLayer.cpp \
|
ExSurfaceFlinger/ExLayer.cpp \
|
||||||
ExSurfaceFlinger/ExSurfaceFlinger.cpp \
|
ExSurfaceFlinger/ExSurfaceFlinger.cpp \
|
||||||
|
@ -76,7 +76,7 @@ bool ExHWComposer::isCompositionTypeBlit(const int32_t compType) const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef QTI_BSP
|
#if defined(QTI_BSP) && defined(SDM_TARGET)
|
||||||
uint32_t ExHWComposer::getS3DFlag(int disp) const {
|
uint32_t ExHWComposer::getS3DFlag(int disp) const {
|
||||||
const DisplayData& disp_data(mDisplayData[disp]);
|
const DisplayData& disp_data(mDisplayData[disp]);
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ bool ExLayer::canAllowGPUForProtected() const {
|
|||||||
void ExLayer::drawWithOpenGL(const sp<const DisplayDevice>& hw,
|
void ExLayer::drawWithOpenGL(const sp<const DisplayDevice>& hw,
|
||||||
const Region& /* clip */, bool useIdentityTransform) const {
|
const Region& /* clip */, bool useIdentityTransform) const {
|
||||||
const State& s(getDrawingState());
|
const State& s(getDrawingState());
|
||||||
#ifdef QTI_BSP
|
#if defined(QTI_BSP) && defined(SDM_TARGET)
|
||||||
uint32_t s3d_fmt = 0;
|
uint32_t s3d_fmt = 0;
|
||||||
private_handle_t *pvt_handle = static_cast<private_handle_t *>
|
private_handle_t *pvt_handle = static_cast<private_handle_t *>
|
||||||
(const_cast<native_handle_t*>(mActiveBuffer->handle));
|
(const_cast<native_handle_t*>(mActiveBuffer->handle));
|
||||||
@ -278,14 +278,14 @@ void ExLayer::drawWithOpenGL(const sp<const DisplayDevice>& hw,
|
|||||||
texCoords[2] = vec2(right, 1.0f - bottom);
|
texCoords[2] = vec2(right, 1.0f - bottom);
|
||||||
texCoords[3] = vec2(right, 1.0f - top);
|
texCoords[3] = vec2(right, 1.0f - top);
|
||||||
|
|
||||||
#ifdef QTI_BSP
|
#if defined(QTI_BSP) && defined(SDM_TARGET)
|
||||||
computeGeometryS3D(hw, mMesh, mMeshLeftTop, mMeshRightBottom, s3d_fmt);
|
computeGeometryS3D(hw, mMesh, mMeshLeftTop, mMeshRightBottom, s3d_fmt);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RenderEngine& engine(mFlinger->getRenderEngine());
|
RenderEngine& engine(mFlinger->getRenderEngine());
|
||||||
engine.setupLayerBlending(mPremultipliedAlpha, isOpaque(s), s.alpha);
|
engine.setupLayerBlending(mPremultipliedAlpha, isOpaque(s), s.alpha);
|
||||||
|
|
||||||
#ifdef QTI_BSP
|
#if defined(QTI_BSP) && defined(SDM_TARGET)
|
||||||
if (s3d_fmt != HWC_S3DMODE_NONE) {
|
if (s3d_fmt != HWC_S3DMODE_NONE) {
|
||||||
engine.setScissor(0, 0, hw->getWidth(), hw->getHeight());
|
engine.setScissor(0, 0, hw->getWidth(), hw->getHeight());
|
||||||
engine.drawMesh(mMeshLeftTop);
|
engine.drawMesh(mMeshLeftTop);
|
||||||
@ -293,7 +293,7 @@ void ExLayer::drawWithOpenGL(const sp<const DisplayDevice>& hw,
|
|||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
engine.drawMesh(mMesh);
|
engine.drawMesh(mMesh);
|
||||||
#ifdef QTI_BSP
|
#if defined(QTI_BSP) && defined(SDM_TARGET)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2004,7 +2004,7 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& hw, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Never touch the framebuffer if we don't have any framebuffer layers
|
// 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) |
|
const bool hasHwcComposition = hwc.hasHwcComposition(id) |
|
||||||
(reinterpret_cast<ExHWComposer*>(&hwc))->getS3DFlag(id);
|
(reinterpret_cast<ExHWComposer*>(&hwc))->getS3DFlag(id);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user