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

Commit 7f3517f6 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

Revert "Rework BOARD_EGL_NEEDS_LEGACY_FB implementation"

This reverts commit 1c01d2b2, it's
not reliable on Mali
parent 16793721
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -252,10 +252,6 @@ private:

    // must be accessed from lock/unlock thread only
    Region mDirtyRegion;

#ifdef BOARD_EGL_NEEDS_LEGACY_FB
    bool                        mDequeuedOnce;
#endif
};

}; // namespace android
+0 −4
Original line number Diff line number Diff line
@@ -43,10 +43,6 @@ ifeq ($(TARGET_USES_QCOM_BSP),true)
    LOCAL_CFLAGS += -DQCOM_BSP
endif

ifeq ($(BOARD_EGL_NEEDS_LEGACY_FB),true)
    LOCAL_CFLAGS += -DBOARD_EGL_NEEDS_LEGACY_FB
endif

LOCAL_MODULE:= libgui

ifeq ($(TARGET_BOARD_PLATFORM), tegra)
+5 −18
Original line number Diff line number Diff line
@@ -72,9 +72,6 @@ Surface::Surface(
    mTransformHint = 0;
    mConsumerRunningBehind = false;
    mConnectedToCpu = false;
#ifdef BOARD_EGL_NEEDS_LEGACY_FB
    mDequeuedOnce = false;
#endif
}

Surface::~Surface() {
@@ -221,9 +218,6 @@ int Surface::dequeueBuffer(android_native_buffer_t** buffer,
    }

    *buffer = gbuf.get();
#ifdef BOARD_EGL_NEEDS_LEGACY_FB
    if (!mDequeuedOnce) mDequeuedOnce = true;
#endif
    return OK;
}

@@ -312,12 +306,6 @@ int Surface::query(int what, int* value) const {
                }
                break;
            case NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER: {
#ifdef BOARD_EGL_NEEDS_LEGACY_FB
                if (!mDequeuedOnce) {
                    *value = 0;
                } else
#endif
                {
                sp<ISurfaceComposer> composer(
                        ComposerService::getComposerService());
                if (composer->authenticateSurfaceTexture(mGraphicBufferProducer)) {
@@ -325,7 +313,6 @@ int Surface::query(int what, int* value) const {
                } else {
                    *value = 0;
                }
                }
                return NO_ERROR;
            }
            case NATIVE_WINDOW_CONCRETE_TYPE:
+4 −0
Original line number Diff line number Diff line
@@ -34,6 +34,10 @@ ifeq ($(TARGET_DISABLE_TRIPLE_BUFFERING),true)
	LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING
endif

ifeq ($(BOARD_EGL_NEEDS_LEGACY_FB),true)
	LOCAL_CFLAGS += -DBOARD_EGL_NEEDS_LEGACY_FB
endif

ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
  LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
endif
+8 −0
Original line number Diff line number Diff line
@@ -29,6 +29,10 @@

#include <gui/Surface.h>

#ifdef BOARD_EGL_NEEDS_LEGACY_FB
#include <ui/FramebufferNativeWindow.h>
#endif

#include <GLES/gl.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
@@ -92,7 +96,11 @@ DisplayDevice::DisplayDevice(
      mOrientation()
{
    mNativeWindow = new Surface(mDisplaySurface->getIGraphicBufferProducer());
#ifndef BOARD_EGL_NEEDS_LEGACY_FB
    ANativeWindow* const window = mNativeWindow.get();
#else
    ANativeWindow* const window = new FramebufferNativeWindow();
#endif

    int format;
    window->query(window, NATIVE_WINDOW_FORMAT, &format);