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

Commit 4f6e0220 authored by Courtney Goeltzenleuchter's avatar Courtney Goeltzenleuchter Committed by android-build-merger
Browse files

Dump FramebufferSurface dataspace

am: 19987a8c

Change-Id: Ie80ea63b0715cdc4157e285aa767c281e80e1986
parents e7f449da 19987a8c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include <gui/BufferQueue.h>
#include <gui/Surface.h>

#include <ui/DebugUtils.h>
#include <ui/GraphicBuffer.h>
#include <ui/Rect.h>

@@ -103,6 +104,7 @@ status_t FramebufferSurface::advanceFrame() {
    sp<Fence> acquireFence(Fence::NO_FENCE);
    android_dataspace_t dataspace = HAL_DATASPACE_UNKNOWN;
    status_t result = nextBuffer(slot, buf, acquireFence, dataspace);
    mDataSpace = dataspace;
    if (result != NO_ERROR) {
        ALOGE("error latching next FramebufferSurface buffer: %s (%d)",
                strerror(-result), result);
@@ -249,7 +251,10 @@ status_t FramebufferSurface::compositionComplete()
#endif

void FramebufferSurface::dumpAsString(String8& result) const {
    ConsumerBase::dumpState(result);
    Mutex::Autolock lock(mMutex);
    result.appendFormat("FramebufferSurface: dataspace: %s(%d)\n",
                        dataspaceDetails(mDataSpace).c_str(), mDataSpace);
    ConsumerBase::dumpLocked(result, "");
}

void FramebufferSurface::dumpLocked(String8& result, const char* prefix) const
+7 −0
Original line number Diff line number Diff line
@@ -83,6 +83,13 @@ private:
    // or the buffer is not associated with a slot.
    int mCurrentBufferSlot;

    // mDataSpace is the dataspace of the current composition buffer for
    // this FramebufferSurface. It will be 0 when HWC is doing the
    // compositing. Otherwise it will display the dataspace of the buffer
    // use for compositing which can change as wide-color content is
    // on/off.
    android_dataspace mDataSpace;

    // mCurrentBuffer is the current buffer or NULL to indicate that there is
    // no current buffer.
    sp<GraphicBuffer> mCurrentBuffer;