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

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

surfaceflinger: remove EGLConfig from DisplayDevice ctor

It is queryable from RenderEngine.

Test: SurfaceFlinger_test
Change-Id: Id976f831f846b9ff7a5f6d8578cfe1787d55da86
parent eadbaa68
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,6 @@ DisplayDevice::DisplayDevice(
        const wp<IBinder>& displayToken,
        const sp<DisplaySurface>& displaySurface,
        const sp<IGraphicBufferProducer>& producer,
        EGLConfig config,
        bool supportWideColor)
    : lastCompositionHadVisibleLayers(false),
      mFlinger(flinger),
@@ -121,6 +120,7 @@ DisplayDevice::DisplayDevice(

    EGLSurface eglSurface;
    EGLDisplay display = mFlinger->getRenderEngine().getEGLDisplay();
    EGLConfig config = mFlinger->getRenderEngine().getEGLConfig();

    if (config == EGL_NO_CONFIG) {
        config = RenderEngine::chooseEglConfig(display, PIXEL_FORMAT_RGBA_8888,
+0 −1
Original line number Diff line number Diff line
@@ -87,7 +87,6 @@ public:
            const wp<IBinder>& displayToken,
            const sp<DisplaySurface>& displaySurface,
            const sp<IGraphicBufferProducer>& producer,
            EGLConfig config,
            bool supportWideColor);
    // clang-format on

+2 −5
Original line number Diff line number Diff line
@@ -1297,8 +1297,7 @@ void SurfaceFlinger::createDefaultDisplayDevice() {
    }
    bool useWideColorMode = hasWideColorModes && hasWideColorDisplay && !mForceNativeColorMode;
    sp<DisplayDevice> hw = new DisplayDevice(this, DisplayDevice::DISPLAY_PRIMARY, type, isSecure,
                                             token, fbs, producer, mRenderEngine->getEGLConfig(),
                                             useWideColorMode);
                                             token, fbs, producer, useWideColorMode);
    mDisplays.add(token, hw);
    android_color_mode defaultColorMode = HAL_COLOR_MODE_NATIVE;
    if (useWideColorMode) {
@@ -2285,9 +2284,7 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)
                    if (dispSurface != NULL) {
                        sp<DisplayDevice> hw =
                                new DisplayDevice(this, state.type, hwcId, state.isSecure, display,
                                                  dispSurface, producer,
                                                  mRenderEngine->getEGLConfig(),
                                                  hasWideColorDisplay);
                                                  dispSurface, producer, hasWideColorDisplay);
                        hw->setLayerStack(state.layerStack);
                        hw->setProjection(state.orientation,
                                state.viewport, state.frame);