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

Commit 07dffa18 authored by Andreas Gampe's avatar Andreas Gampe Committed by Gerrit Code Review
Browse files

Merge "Frameworks/native: Wall Werror in surfaceflinger"

parents fecc0bf4 89fd4f7f
Loading
Loading
Loading
Loading
+32 −26
Original line number Diff line number Diff line
@@ -102,6 +102,8 @@ LOCAL_SHARED_LIBRARIES := \

LOCAL_MODULE:= libsurfaceflinger

LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code

include $(BUILD_SHARED_LIBRARY)

###############################################################
@@ -131,6 +133,8 @@ ifdef TARGET_32_BIT_SURFACEFLINGER
LOCAL_32_BIT_ONLY := true
endif

LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code

include $(BUILD_EXECUTABLE)

###############################################################
@@ -149,5 +153,7 @@ LOCAL_SHARED_LIBRARIES := \

LOCAL_MODULE:= libsurfaceflinger_ddmconnection

LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code

include $(BUILD_SHARED_LIBRARY)
endif # libnativehelper
+19 −13
Original line number Diff line number Diff line
@@ -44,6 +44,18 @@
using namespace android;
// ----------------------------------------------------------------------------

#ifdef EGL_ANDROID_swap_rectangle
static constexpr bool kEGLAndroidSwapRectangle = true;
#else
static constexpr bool kEGLAndroidSwapRectangle = false;
#endif

#if !defined(EGL_EGLEXT_PROTOTYPES) || !defined(EGL_ANDROID_swap_rectangle)
// Dummy implementation in case it is missing.
inline void eglSetSwapRectangleANDROID (EGLDisplay, EGLSurface, EGLint, EGLint, EGLint, EGLint) {
}
#endif

/*
 * Initialize the display to the specified values.
 *
@@ -84,7 +96,6 @@ DisplayDevice::DisplayDevice(
     */

    EGLSurface surface;
    EGLint w, h;
    EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
    if (config == EGL_NO_CONFIG) {
        config = RenderEngine::chooseEglConfig(display, format);
@@ -188,19 +199,14 @@ void DisplayDevice::flip(const Region& dirty) const
{
    mFlinger->getRenderEngine().checkErrors();

    EGLDisplay dpy = mDisplay;
    EGLSurface surface = mSurface;

#ifdef EGL_ANDROID_swap_rectangle
    if (kEGLAndroidSwapRectangle) {
        if (mFlags & SWAP_RECTANGLE) {
            const Region newDirty(dirty.intersect(bounds()));
            const Rect b(newDirty.getBounds());
        eglSetSwapRectangleANDROID(dpy, surface,
            eglSetSwapRectangleANDROID(mDisplay, mSurface,
                    b.left, b.top, b.width(), b.height());
        }
#else
    (void) dirty; // Eliminate unused parameter warning
#endif
    }

    mPageFlipCount++;
}
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ FramebufferSurface::FramebufferSurface(HWComposer& hwc, int disp,
    mConsumer->setDefaultMaxBufferCount(NUM_FRAMEBUFFER_SURFACE_BUFFERS);
}

status_t FramebufferSurface::beginFrame(bool mustRecompose) {
status_t FramebufferSurface::beginFrame(bool /* mustRecompose */) {
    return NO_ERROR;
}

+1 −0
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ public:
    virtual status_t compositionComplete();
    virtual status_t advanceFrame();
    virtual void onFrameCommitted();
    using BBinder::dump;
    virtual void dump(String8& result) const;
    virtual void resizeBuffers(const uint32_t w, const uint32_t h);

+0 −2
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@ Layer::Layer(SurfaceFlinger* flinger, const sp<Client>& client,
        mTextureName(-1U),
        mPremultipliedAlpha(true),
        mName("unnamed"),
        mDebug(false),
        mFormat(PIXEL_FORMAT_NONE),
        mTransactionFlags(0),
        mQueuedFrames(0),
@@ -646,7 +645,6 @@ void Layer::clearWithOpenGL(

void Layer::drawWithOpenGL(const sp<const DisplayDevice>& hw,
        const Region& /* clip */, bool useIdentityTransform) const {
    const uint32_t fbHeight = hw->getHeight();
    const State& s(getDrawingState());

    computeGeometry(hw, mMesh, useIdentityTransform);
Loading