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

Commit e2e39a3b authored by Pablo Ceballos's avatar Pablo Ceballos Committed by android-build-merger
Browse files

Merge "SF: Add FenceTracker" into nyc-dev

am: 830f5004

* commit '830f5004':
  SF: Add FenceTracker
parents 308b6c91 830f5004
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ LOCAL_SRC_FILES := \
    DispSync.cpp \
    EventControlThread.cpp \
    EventThread.cpp \
    FenceTracker.cpp \
    FrameTracker.cpp \
    Layer.cpp \
    LayerDim.cpp \
@@ -103,7 +104,7 @@ else
endif

LOCAL_CFLAGS += -fvisibility=hidden -Werror=format
LOCAL_CFLAGS += -std=c++11
LOCAL_CFLAGS += -std=c++14

LOCAL_SHARED_LIBRARIES := \
    libcutils \
@@ -133,7 +134,7 @@ LOCAL_CLANG := true

LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
LOCAL_CPPFLAGS := -std=c++11
LOCAL_CPPFLAGS := -std=c++14

LOCAL_INIT_RC := surfaceflinger.rc

@@ -172,7 +173,7 @@ include $(CLEAR_VARS)
LOCAL_CLANG := true

LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
LOCAL_CPPFLAGS := -std=c++11
LOCAL_CPPFLAGS := -std=c++14

LOCAL_SRC_FILES := \
    DdmConnection.cpp
+0 −2
Original line number Diff line number Diff line
@@ -364,11 +364,9 @@ void DisplayDevice::setViewportAndProjection() const {
        false, Transform::ROT_0);
}

#ifdef USE_HWC2
const sp<Fence>& DisplayDevice::getClientTargetAcquireFence() const {
    return mDisplaySurface->getClientTargetAcquireFence();
}
#endif

// ----------------------------------------------------------------------------

+0 −4
Original line number Diff line number Diff line
@@ -49,9 +49,7 @@ namespace android {

struct DisplayInfo;
class DisplaySurface;
#ifdef USE_HWC2
class Fence;
#endif
class IGraphicBufferProducer;
class Layer;
class SurfaceFlinger;
@@ -174,9 +172,7 @@ public:
    EGLBoolean makeCurrent(EGLDisplay dpy, EGLContext ctx) const;
    void setViewportAndProjection() const;

#ifdef USE_HWC2
    const sp<Fence>& getClientTargetAcquireFence() const;
#endif

    /* ------------------------------------------------------------------------
     * Display power mode management.
+0 −2
Original line number Diff line number Diff line
@@ -76,9 +76,7 @@ public:

    virtual void resizeBuffers(const uint32_t w, const uint32_t h) = 0;

#ifdef USE_HWC2
    virtual const sp<Fence>& getClientTargetAcquireFence() const = 0;
#endif

protected:
    DisplaySurface() {}
+1 −6
Original line number Diff line number Diff line
@@ -60,15 +60,14 @@ FramebufferSurface::FramebufferSurface(HWComposer& hwc, int disp,
    ConsumerBase(consumer),
    mDisplayType(disp),
    mCurrentBufferSlot(-1),
#ifdef USE_HWC2
    mCurrentBuffer(),
    mCurrentFence(Fence::NO_FENCE),
#ifdef USE_HWC2
    mHwc(hwc),
    mHasPendingRelease(false),
    mPreviousBufferSlot(BufferQueue::INVALID_BUFFER_SLOT),
    mPreviousBuffer()
#else
    mCurrentBuffer(0),
    mHwc(hwc)
#endif
{
@@ -168,9 +167,7 @@ status_t FramebufferSurface::nextBuffer(sp<GraphicBuffer>& outBuffer, sp<Fence>&
    }
    mCurrentBufferSlot = item.mSlot;
    mCurrentBuffer = mSlots[mCurrentBufferSlot].mGraphicBuffer;
#ifdef USE_HWC2
    mCurrentFence = item.mFence;
#endif

    outFence = item.mFence;
    outBuffer = mCurrentBuffer;
@@ -254,11 +251,9 @@ void FramebufferSurface::dumpLocked(String8& result, const char* prefix) const
    ConsumerBase::dumpLocked(result, prefix);
}

#ifdef USE_HWC2
const sp<Fence>& FramebufferSurface::getClientTargetAcquireFence() const {
    return mCurrentFence;
}
#endif

// ----------------------------------------------------------------------------
}; // namespace android
Loading