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

Commit 342aaed2 authored by Steve Kondik's avatar Steve Kondik
Browse files

Add ifdefs for QC-specific dirtyRect feature

Change-Id: I784e76ead2f8b9eeb6d5e99bd2f83fb6a32db8d8
parent e28e1706
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -60,8 +60,10 @@ class BufferItem : public Flattenable<BufferItem> {
    // mCrop is the current crop rectangle for this buffer slot.
    Rect mCrop;

#ifdef QCOM_BSP
    // mDirtyRect is the dirty rectangle for this buffer slot.
    Rect mDirtyRect;
#endif

    // mTransform is the current transform flags for this buffer slot.
    // refer to NATIVE_WINDOW_TRANSFORM_* in <window.h>
+4 −0
Original line number Diff line number Diff line
@@ -176,8 +176,10 @@ public:
    // getCurrentCrop returns the cropping rectangle of the current buffer.
    Rect getCurrentCrop() const;

#ifdef QCOM_BSP
    // getDirtyRegion returns the dirty rect associated with the current buffer.
    Rect getCurrentDirtyRect() const;
#endif

    // getCurrentTransform returns the transform of the current buffer.
    uint32_t getCurrentTransform() const;
@@ -372,9 +374,11 @@ private:
    // It gets set each time updateTexImage is called.
    Rect mCurrentCrop;

#ifdef QCOM_BSP
    //mCurrentDirtyRect is the dirty rectangle associated with the current
    //buffer.
    Rect mCurrentDirtyRect;
#endif

    // mCurrentTransform is the transform identifier for the current texture. It
    // gets set each time updateTexImage is called.
+2 −0
Original line number Diff line number Diff line
@@ -67,8 +67,10 @@ public:
        // mCrop is the current crop rectangle for this buffer slot.
        Rect mCrop;

#ifdef QCOM_BSP
        // mDirtyRect is the dirty rectangle for this buffer slot.
        Rect mDirtyRect;
#endif

        // mTransform is the current transform flags for this buffer slot.
        // refer to NATIVE_WINDOW_TRANSFORM_* in <window.h>
+6 −1
Original line number Diff line number Diff line
@@ -282,12 +282,14 @@ public:
          scalingMode(scalingMode), transform(transform), stickyTransform(sticky),
          async(async), fence(fence) { }

#ifdef QCOM_BSP
        inline QueueBufferInput(int64_t timestamp, bool isAutoTimestamp,
                const Rect& crop, const Rect& dirtyRect, int scalingMode, uint32_t transform, bool async,
                const sp<Fence>& fence, uint32_t sticky = 0)
        : timestamp(timestamp), isAutoTimestamp(isAutoTimestamp), crop(crop),
          dirtyRect(dirtyRect),scalingMode(scalingMode), transform(transform), stickyTransform(sticky),
          async(async), fence(fence) { }
#endif

        inline void deflate(int64_t* outTimestamp, bool* outIsAutoTimestamp,
                Rect* outCrop, int* outScalingMode, uint32_t* outTransform,
@@ -305,6 +307,7 @@ public:
            }
        }

#ifdef QCOM_BSP
        inline void deflate(int64_t* outTimestamp, bool* outIsAutoTimestamp,
                Rect* outCrop, Rect* outDirtyRect, int* outScalingMode, uint32_t* outTransform,
                bool* outAsync, sp<Fence>* outFence,
@@ -321,7 +324,7 @@ public:
                *outStickyTransform = stickyTransform;
            }
        }

#endif

        // Flattenable protocol
        size_t getFlattenedSize() const;
@@ -333,7 +336,9 @@ public:
        int64_t timestamp;
        int isAutoTimestamp;
        Rect crop;
#ifdef QCOM_BSP
        Rect dirtyRect;
#endif
        int scalingMode;
        uint32_t transform;
        uint32_t stickyTransform;
+4 −0
Original line number Diff line number Diff line
@@ -101,9 +101,11 @@ public:
     */
    void allocateBuffers();

#ifdef QCOM_BSP
    /* sets dirty rectangle of the buffer that gets queued next for the
     * Surface */
    status_t setDirtyRect(const Rect* dirtyRect);
#endif

protected:
    virtual ~Surface();
@@ -230,9 +232,11 @@ private:
    // that gets queued. It is set by calling setCrop.
    Rect mCrop;

#ifdef QCOM_BSP
    // mDirtyRect is the dirty rectangle set for the next buffer that gets
    // queued. It is set by calling setDirtyRect.
    Rect mDirtyRect;
#endif

    // mScalingMode is the scaling mode that will be used for the next
    // buffers that get queued. It is set by calling setScalingMode.
Loading