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

Commit c5269bfb authored by Vishnu Nair's avatar Vishnu Nair Committed by Android (Google) Code Review
Browse files

Merge changes I61fe1d1f,I8a440e9f

* changes:
  SF: Get hwc slot in binder thread
  SF: Look up buffer caches in binder thread
parents 345d32bc c6086ddd
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -60,11 +60,11 @@ public:
    virtual ~BpSurfaceComposer();

    status_t setTransactionState(const FrameTimelineInfo& frameTimelineInfo,
                                 const Vector<ComposerState>& state,
                                 const Vector<DisplayState>& displays, uint32_t flags,
                                 const sp<IBinder>& applyToken, const InputWindowCommands& commands,
                                 int64_t desiredPresentTime, bool isAutoTimestamp,
                                 const client_cache_t& uncacheBuffer, bool hasListenerCallbacks,
                                 Vector<ComposerState>& state, const Vector<DisplayState>& displays,
                                 uint32_t flags, const sp<IBinder>& applyToken,
                                 const InputWindowCommands& commands, int64_t desiredPresentTime,
                                 bool isAutoTimestamp, const client_cache_t& uncacheBuffer,
                                 bool hasListenerCallbacks,
                                 const std::vector<ListenerCallbacks>& listenerCallbacks,
                                 uint64_t transactionId) override {
        Parcel data, reply;
+4 −4
Original line number Diff line number Diff line
@@ -912,11 +912,11 @@ void SurfaceComposerClient::doUncacheBufferTransaction(uint64_t cacheId) {
    client_cache_t uncacheBuffer;
    uncacheBuffer.token = BufferCache::getInstance().getToken();
    uncacheBuffer.id = cacheId;

    Vector<ComposerState> composerStates;
    status_t status =
            sf->setTransactionState(FrameTimelineInfo{}, {}, {}, ISurfaceComposer::eOneWay,
                                    Transaction::getDefaultApplyToken(), {}, systemTime(), true,
                                    uncacheBuffer, false, {}, generateId());
            sf->setTransactionState(FrameTimelineInfo{}, composerStates, {},
                                    ISurfaceComposer::eOneWay, Transaction::getDefaultApplyToken(),
                                    {}, systemTime(), true, uncacheBuffer, false, {}, generateId());
    if (status != NO_ERROR) {
        ALOGE_AND_TRACE("SurfaceComposerClient::doUncacheBufferTransaction - %s",
                        strerror(-status));
+2 −2
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@
namespace android {

struct client_cache_t;
struct ComposerState;
class ComposerState;
struct DisplayStatInfo;
struct DisplayState;
struct InputWindowCommands;
@@ -110,7 +110,7 @@ public:

    /* open/close transactions. requires ACCESS_SURFACE_FLINGER permission */
    virtual status_t setTransactionState(
            const FrameTimelineInfo& frameTimelineInfo, const Vector<ComposerState>& state,
            const FrameTimelineInfo& frameTimelineInfo, Vector<ComposerState>& state,
            const Vector<DisplayState>& displays, uint32_t flags, const sp<IBinder>& applyToken,
            const InputWindowCommands& inputWindowCommands, int64_t desiredPresentTime,
            bool isAutoTimestamp, const client_cache_t& uncacheBuffer, bool hasListenerCallbacks,
+2 −1
Original line number Diff line number Diff line
@@ -311,7 +311,8 @@ struct layer_state_t {
    bool dimmingEnabled;
};

struct ComposerState {
class ComposerState {
public:
    layer_state_t state;
    status_t write(Parcel& output) const;
    status_t read(const Parcel& input);
+1 −1
Original line number Diff line number Diff line
@@ -696,7 +696,7 @@ public:
    }

    status_t setTransactionState(const FrameTimelineInfo& /*frameTimelineInfo*/,
                                 const Vector<ComposerState>& /*state*/,
                                 Vector<ComposerState>& /*state*/,
                                 const Vector<DisplayState>& /*displays*/, uint32_t /*flags*/,
                                 const sp<IBinder>& /*applyToken*/,
                                 const InputWindowCommands& /*inputWindowCommands*/,
Loading