Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1c7a4e0 authored by toastcfh's avatar toastcfh
Browse files

QCOM: surfaceflinger: ifdef qcom composition skip flag set

Change-Id: I7ea6fc824b8038a2b84e53cc8057b17cd6bcd074
parent 415c41c6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -98,8 +98,10 @@ status_t HWComposer::createWorkList(size_t numLayers) {
}

status_t HWComposer::prepare() const {
#ifdef QCOM_HARDWARE
    // Reset the Skip composition flag
    mList->flags &= ~HWC_SKIP_COMPOSITION;
#endif
    int err = mHwc->prepare(mHwc, mList);
    if (err == NO_ERROR) {
        size_t numOVLayers = 0;
@@ -169,9 +171,11 @@ hwc_layer_t* HWComposer::getLayers() const {
    return mList ? mList->hwLayers : 0;
}

#ifdef QCOM_HARDWARE
uint32_t HWComposer::getFlags() const {
    return mList ? mList->flags : 0;
}
#endif

void HWComposer::dump(String8& result, char* buffer, size_t SIZE,
        const Vector< sp<LayerBase> >& visibleLayersSortedByZ) const {
+2 −1
Original line number Diff line number Diff line
@@ -67,9 +67,10 @@ public:
    // updated in preapre()
    size_t getLayerCount(int type) const;

#ifdef QCOM_HARDWARE
    // gets the list flags
    uint32_t getFlags() const;

#endif
#ifdef QCOM_HDMI_OUT
    void enableHDMIOutput(bool enable);
#endif
+14 −4
Original line number Diff line number Diff line
@@ -63,12 +63,16 @@ Layer::Layer(SurfaceFlinger* flinger,
        mOpaqueLayer(true),
        mNeedsDithering(false),
        mSecure(false),
        mProtectedByApp(false),
        mLayerQcomFlags(0)
#ifdef QCOM_HARDWARE
        mLayerQcomFlags(0),
#endif
        mProtectedByApp(false)
{
    mCurrentCrop.makeInvalid();
    glGenTextures(1, &mTextureName);
#ifdef QCOM_HARDWARE
    updateLayerQcomFlags(LAYER_UPDATE_STATUS, true, mLayerQcomFlags);
#endif
}

void Layer::onFirstRef()
@@ -259,7 +263,9 @@ void Layer::setPerFrameData(hwc_layer_t* hwcl) {
    } else {
        hwcl->handle = buffer->handle;
    }
#ifdef QCOM_HARDWARE
    hwcl->flags = getPerFrameFlags(hwcl->flags, mLayerQcomFlags);
#endif
}

void Layer::onDraw(const Region& clip) const
@@ -367,10 +373,12 @@ bool Layer::isProtected() const
            (activeBuffer->getUsage() & GRALLOC_USAGE_PROTECTED);
}

#ifdef QCOM_HARDWARE
void Layer::setIsUpdating(bool isUpdating)
{
    updateLayerQcomFlags(LAYER_UPDATE_STATUS, isUpdating, mLayerQcomFlags);
}
#endif

uint32_t Layer::doTransaction(uint32_t flags)
{
@@ -437,9 +445,9 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
            recomputeVisibleRegions = true;
            return;
        }

#ifdef QCOM_HARDWARE
        updateLayerQcomFlags(LAYER_UPDATE_STATUS, true, mLayerQcomFlags);

#endif
        // update the active buffer
        mActiveBuffer = mSurfaceTexture->getCurrentBuffer();

@@ -527,8 +535,10 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
                    bufWidth, bufHeight, mCurrentTransform,
                    front.requested_w, front.requested_h);
        }
#ifdef QCOM_HARDWARE
    } else {
        updateLayerQcomFlags(LAYER_UPDATE_STATUS, false, mLayerQcomFlags);
#endif
    }
}

+4 −0
Original line number Diff line number Diff line
@@ -71,7 +71,9 @@ public:
    virtual bool needsDithering() const     { return mNeedsDithering; }
    virtual bool isSecure() const           { return mSecure; }
    virtual bool isProtected() const;
#ifdef QCOM_HARDWARE
    virtual void setIsUpdating(bool isUpdating);
#endif
    virtual void onRemoved();
    virtual sp<Layer> getLayer() const { return const_cast<Layer*>(this); }
    virtual void setName(const String8& name);
@@ -126,8 +128,10 @@ private:
    // binder thread, transaction thread
    mutable Mutex mLock;

#ifdef QCOM_HARDWARE
    // Qcom specific flags for this layer.
    int mLayerQcomFlags;
#endif
};

// ---------------------------------------------------------------------------
+4 −1
Original line number Diff line number Diff line
@@ -205,8 +205,11 @@ public:
    /** called with the state lock when the surface is removed from the
     *  current list */
    virtual void onRemoved() { };

#ifdef QCOM_HARDWARE
    /** Called from surfaceFlinger to update the layer */
    virtual void setIsUpdating(bool isUpdating) { };
#endif

    /** always call base class first */
    virtual void dump(String8& result, char* scratch, size_t size) const;
Loading