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

Commit b0c8d787 authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "Support SurfaceView synchronization."

parents fe914cc8 7dde599b
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -170,6 +170,9 @@ public:
    // See IGraphicBufferProducer::getConsumerName
    // See IGraphicBufferProducer::getConsumerName
    virtual String8 getConsumerName() const override;
    virtual String8 getConsumerName() const override;


    // See IGraphicBufferProducer::getNextFrameNumber
    virtual uint64_t getNextFrameNumber() const override;

private:
private:
    // This is required by the IBinder::DeathRecipient interface
    // This is required by the IBinder::DeathRecipient interface
    virtual void binderDied(const wp<IBinder>& who);
    virtual void binderDied(const wp<IBinder>& who);
+3 −0
Original line number Original line Diff line number Diff line
@@ -508,6 +508,9 @@ public:


    // Returns the name of the connected consumer.
    // Returns the name of the connected consumer.
    virtual String8 getConsumerName() const = 0;
    virtual String8 getConsumerName() const = 0;

    // Returns the number of the next frame which will be dequeued.
    virtual uint64_t getNextFrameNumber() const = 0;
};
};


// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
+3 −0
Original line number Original line Diff line number Diff line
@@ -109,6 +109,9 @@ public:
    // See IGraphicBufferProducer::getConsumerName
    // See IGraphicBufferProducer::getConsumerName
    String8 getConsumerName() const;
    String8 getConsumerName() const;


    // See IGraphicBufferProducer::getNextFrameNumber
    uint64_t getNextFrameNumber() const;

protected:
protected:
    virtual ~Surface();
    virtual ~Surface();


+2 −0
Original line number Original line Diff line number Diff line
@@ -134,6 +134,8 @@ public:
    status_t    setSize(const sp<IBinder>& id, uint32_t w, uint32_t h);
    status_t    setSize(const sp<IBinder>& id, uint32_t w, uint32_t h);
    status_t    setCrop(const sp<IBinder>& id, const Rect& crop);
    status_t    setCrop(const sp<IBinder>& id, const Rect& crop);
    status_t    setLayerStack(const sp<IBinder>& id, uint32_t layerStack);
    status_t    setLayerStack(const sp<IBinder>& id, uint32_t layerStack);
    status_t    deferTransactionUntil(const sp<IBinder>& id,
            const sp<IBinder>& handle, uint64_t frameNumber);
    status_t    destroySurface(const sp<IBinder>& id);
    status_t    destroySurface(const sp<IBinder>& id);


    status_t clearLayerFrameStats(const sp<IBinder>& token) const;
    status_t clearLayerFrameStats(const sp<IBinder>& token) const;
+5 −0
Original line number Original line Diff line number Diff line
@@ -69,10 +69,15 @@ public:
    status_t    setMatrix(float dsdx, float dtdx, float dsdy, float dtdy);
    status_t    setMatrix(float dsdx, float dtdx, float dsdy, float dtdy);
    status_t    setCrop(const Rect& crop);
    status_t    setCrop(const Rect& crop);


    // Defers applying any changes made in this transaction until the Layer
    // identified by handle reaches the given frameNumber
    status_t deferTransactionUntil(sp<IBinder> handle, uint64_t frameNumber);

    static status_t writeSurfaceToParcel(
    static status_t writeSurfaceToParcel(
            const sp<SurfaceControl>& control, Parcel* parcel);
            const sp<SurfaceControl>& control, Parcel* parcel);


    sp<Surface> getSurface() const;
    sp<Surface> getSurface() const;
    sp<IBinder> getHandle() const;


    status_t clearLayerFrameStats() const;
    status_t clearLayerFrameStats() const;
    status_t getLayerFrameStats(FrameStats* outStats) const;
    status_t getLayerFrameStats(FrameStats* outStats) const;
Loading