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

Commit 879e4f54 authored by Jim Shargo's avatar Jim Shargo Committed by Android (Google) Code Review
Browse files

Merge "Surface: Improve logging dramatically" into main

parents 9ff64f6a 632bb8b6
Loading
Loading
Loading
Loading
+157 −125

File changed.

Preview size limit exceeded, changes collapsed.

+5 −4
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <utils/Condition.h>
#include <utils/Mutex.h>
#include <utils/RefBase.h>
#include <utils/String8.h>

#include <shared_mutex>
#include <unordered_set>
@@ -365,10 +366,6 @@ private:
    int dispatchSetFrameTimelineInfo(va_list args);
    int dispatchSetAdditionalOptions(va_list args);

    std::mutex mNameMutex;
    std::string mName;
    const char* getDebugName();

protected:
    virtual int dequeueBuffer(sp<GraphicBuffer>* buffer, int* fenceFd);
    virtual int cancelBuffer(sp<GraphicBuffer>&& buffer, int fenceFd);
@@ -745,6 +742,10 @@ protected:
    // the GRALLOC_USAGE_CURSOR usage flag should be set on the buffer created when this surface is
    // locked.
    bool mIsForCursor = false;

    mutable std::mutex mDebugMutex;
    String8 mDebugName GUARDED_BY(mDebugMutex) = String8("not-connected");
    uint64_t mId GUARDED_BY(mDebugMutex) = 0;
};

} // namespace android