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

Commit b523df0c authored by Chia-I Wu's avatar Chia-I Wu
Browse files

surfaceflinger: remove unused EGL data members

Remove SurfaceFlinger::mEGLDisplay and SurfaceFlinger::mEGLContext.
With this change, SurfaceFlinger does not use EGL directly anymore.
This also allows us to get rid of RenderEngine::getEGLContext.

Test: SurfaceFlinger_test
Change-Id: I7799d935367650508b741e62a53ce325fdc94234
parent c670d50b
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -183,10 +183,6 @@ EGLConfig RenderEngine::getEGLConfig() const {
    return mEGLConfig;
}

EGLContext RenderEngine::getEGLContext() const {
    return mEGLContext;
}

bool RenderEngine::setCurrentSurface(EGLSurface surface) {
    return eglMakeCurrent(mEGLDisplay, surface, surface, mEGLContext) == EGL_TRUE;
}
+0 −1
Original line number Diff line number Diff line
@@ -136,7 +136,6 @@ public:

    EGLDisplay getEGLDisplay() const;
    EGLConfig getEGLConfig() const;
    EGLContext getEGLContext() const;
};

// ---------------------------------------------------------------------------
+0 −6
Original line number Diff line number Diff line
@@ -28,8 +28,6 @@
#include <stdatomic.h>
#include <optional>

#include <EGL/egl.h>

#include <cutils/properties.h>
#include <log/log.h>

@@ -613,10 +611,6 @@ void SurfaceFlinger::init() {
            hasWideColorDisplay ? RenderEngine::WIDE_COLOR_SUPPORT : 0);
    LOG_ALWAYS_FATAL_IF(mRenderEngine == nullptr, "couldn't create RenderEngine");

    // retrieve the EGL display/context that was selected/created
    mEGLDisplay = mRenderEngine->getEGLDisplay();
    mEGLContext = mRenderEngine->getEGLContext();

    LOG_ALWAYS_FATAL_IF(mVrFlingerRequestsDisplay,
            "Starting with vr flinger active is not currently supported.");
    mHwc.reset(new HWComposer(mHwcServiceName));
+0 −4
Original line number Diff line number Diff line
@@ -21,8 +21,6 @@
#include <stdint.h>
#include <sys/types.h>

#include <EGL/egl.h>

/*
 * NOTE: Make sure this file doesn't include  anything from <gl/ > or <gl2/ >
 */
@@ -667,8 +665,6 @@ private:
    sp<EventThread> mInjectorEventThread;
    sp<InjectVSyncSource> mVSyncInjector;
    sp<EventControlThread> mEventControlThread;
    EGLContext mEGLContext;
    EGLDisplay mEGLDisplay;
    sp<IBinder> mBuiltinDisplays[DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES];

    // Can only accessed from the main thread, these members