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

Commit 2585d680 authored by Alec Mouri's avatar Alec Mouri Committed by Android (Google) Code Review
Browse files

Merge changes Ib5b446f3,If639ce2c,I8b469bfc

* changes:
  Remove gl surfaces from DisplayDevice.
  Bind to FBO when using GPU composition
  Get display dimensions through ANativeWindow api.
parents 95ea320e ce0ad96d
Loading
Loading
Loading
Loading
+10 −21
Original line number Original line Diff line number Diff line
@@ -275,6 +275,8 @@ std::unique_ptr<GLES20RenderEngine> GLES20RenderEngine::create(int hwcFormat,


    // now figure out what version of GL did we actually get
    // now figure out what version of GL did we actually get
    // NOTE: a dummy surface is not needed if KHR_create_context is supported
    // NOTE: a dummy surface is not needed if KHR_create_context is supported
    // TODO(alecmouri): don't create this surface if EGL_KHR_surfaceless_context
    // is supported.


    EGLConfig dummyConfig = config;
    EGLConfig dummyConfig = config;
    if (dummyConfig == EGL_NO_CONFIG) {
    if (dummyConfig == EGL_NO_CONFIG) {
@@ -301,10 +303,10 @@ std::unique_ptr<GLES20RenderEngine> GLES20RenderEngine::create(int hwcFormat,
            break;
            break;
        case GLES_VERSION_2_0:
        case GLES_VERSION_2_0:
        case GLES_VERSION_3_0:
        case GLES_VERSION_3_0:
            engine = std::make_unique<GLES20RenderEngine>(featureFlags);
            engine = std::make_unique<GLES20RenderEngine>(featureFlags, display, config, ctxt,
                                                          dummy);
            break;
            break;
    }
    }
    engine->setEGLHandles(display, config, ctxt);


    ALOGI("OpenGL ES informations:");
    ALOGI("OpenGL ES informations:");
    ALOGI("vendor    : %s", extensions.getVendor());
    ALOGI("vendor    : %s", extensions.getVendor());
@@ -314,9 +316,6 @@ std::unique_ptr<GLES20RenderEngine> GLES20RenderEngine::create(int hwcFormat,
    ALOGI("GL_MAX_TEXTURE_SIZE = %zu", engine->getMaxTextureSize());
    ALOGI("GL_MAX_TEXTURE_SIZE = %zu", engine->getMaxTextureSize());
    ALOGI("GL_MAX_VIEWPORT_DIMS = %zu", engine->getMaxViewportDims());
    ALOGI("GL_MAX_VIEWPORT_DIMS = %zu", engine->getMaxViewportDims());


    eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
    eglDestroySurface(display, dummy);

    return engine;
    return engine;
}
}


@@ -359,11 +358,13 @@ EGLConfig GLES20RenderEngine::chooseEglConfig(EGLDisplay display, int format, bo
    return config;
    return config;
}
}


GLES20RenderEngine::GLES20RenderEngine(uint32_t featureFlags)
GLES20RenderEngine::GLES20RenderEngine(uint32_t featureFlags, EGLDisplay display, EGLConfig config,
                                       EGLContext ctxt, EGLSurface dummy)
      : renderengine::impl::RenderEngine(featureFlags),
      : renderengine::impl::RenderEngine(featureFlags),
        mEGLDisplay(EGL_NO_DISPLAY),
        mEGLDisplay(display),
        mEGLConfig(nullptr),
        mEGLConfig(config),
        mEGLContext(EGL_NO_CONTEXT),
        mEGLContext(ctxt),
        mDummySurface(dummy),
        mVpWidth(0),
        mVpWidth(0),
        mVpHeight(0),
        mVpHeight(0),
        mUseColorManagement(featureFlags & USE_COLOR_MANAGEMENT) {
        mUseColorManagement(featureFlags & USE_COLOR_MANAGEMENT) {
@@ -636,12 +637,6 @@ void GLES20RenderEngine::unbindFrameBuffer(Framebuffer* /* framebuffer */) {


    // back to main framebuffer
    // back to main framebuffer
    glBindFramebuffer(GL_FRAMEBUFFER, 0);
    glBindFramebuffer(GL_FRAMEBUFFER, 0);

    // Workaround for b/77935566 to force the EGL driver to release the
    // screenshot buffer
    setScissor(Rect::EMPTY_RECT);
    clearWithColor(0.0, 0.0, 0.0, 0.0);
    disableScissor();
}
}


void GLES20RenderEngine::checkErrors() const {
void GLES20RenderEngine::checkErrors() const {
@@ -974,12 +969,6 @@ bool GLES20RenderEngine::needsXYZTransformMatrix() const {
    return (isInputHdrDataSpace || isOutputHdrDataSpace) && inputTransfer != outputTransfer;
    return (isInputHdrDataSpace || isOutputHdrDataSpace) && inputTransfer != outputTransfer;
}
}


void GLES20RenderEngine::setEGLHandles(EGLDisplay display, EGLConfig config, EGLContext ctxt) {
    mEGLDisplay = display;
    mEGLConfig = config;
    mEGLContext = ctxt;
}

} // namespace gl
} // namespace gl
} // namespace renderengine
} // namespace renderengine
} // namespace android
} // namespace android
+4 −2
Original line number Original line Diff line number Diff line
@@ -47,7 +47,8 @@ public:
    static std::unique_ptr<GLES20RenderEngine> create(int hwcFormat, uint32_t featureFlags);
    static std::unique_ptr<GLES20RenderEngine> create(int hwcFormat, uint32_t featureFlags);
    static EGLConfig chooseEglConfig(EGLDisplay display, int format, bool logConfig);
    static EGLConfig chooseEglConfig(EGLDisplay display, int format, bool logConfig);


    GLES20RenderEngine(uint32_t featureFlags); // See RenderEngine::FeatureFlag
    GLES20RenderEngine(uint32_t featureFlags, // See RenderEngine::FeatureFlag
                       EGLDisplay display, EGLConfig config, EGLContext ctxt, EGLSurface dummy);
    ~GLES20RenderEngine() override;
    ~GLES20RenderEngine() override;


    std::unique_ptr<Framebuffer> createFramebuffer() override;
    std::unique_ptr<Framebuffer> createFramebuffer() override;
@@ -120,11 +121,12 @@ private:
    // with PQ or HLG transfer function.
    // with PQ or HLG transfer function.
    bool isHdrDataSpace(const ui::Dataspace dataSpace) const;
    bool isHdrDataSpace(const ui::Dataspace dataSpace) const;
    bool needsXYZTransformMatrix() const;
    bool needsXYZTransformMatrix() const;
    void setEGLHandles(EGLDisplay display, EGLConfig config, EGLContext ctxt);
    void setEGLHandles(EGLDisplay display, EGLConfig config, EGLContext ctxt, EGLSurface dummy);


    EGLDisplay mEGLDisplay;
    EGLDisplay mEGLDisplay;
    EGLConfig mEGLConfig;
    EGLConfig mEGLConfig;
    EGLContext mEGLContext;
    EGLContext mEGLContext;
    EGLSurface mDummySurface;
    GLuint mProtectedTexName;
    GLuint mProtectedTexName;
    GLint mMaxViewportDims[2];
    GLint mMaxViewportDims[2];
    GLint mMaxTextureSize;
    GLint mMaxTextureSize;
+1 −0
Original line number Original line Diff line number Diff line
@@ -184,6 +184,7 @@ cc_defaults {
        "libhidltransport",
        "libhidltransport",
        "liblayers_proto",
        "liblayers_proto",
        "liblog",
        "liblog",
        "libsync",
        "libtimestats_proto",
        "libtimestats_proto",
        "libutils",
        "libutils",
    ],
    ],
+92 −35
Original line number Original line Diff line number Diff line
@@ -35,6 +35,8 @@
#include <gui/Surface.h>
#include <gui/Surface.h>
#include <hardware/gralloc.h>
#include <hardware/gralloc.h>
#include <renderengine/RenderEngine.h>
#include <renderengine/RenderEngine.h>
#include <sync/sync.h>
#include <system/window.h>
#include <ui/DebugUtils.h>
#include <ui/DebugUtils.h>
#include <ui/DisplayInfo.h>
#include <ui/DisplayInfo.h>
#include <ui/PixelFormat.h>
#include <ui/PixelFormat.h>
@@ -221,10 +223,8 @@ DisplayDevice::DisplayDevice(DisplayDeviceCreationArgs&& args)
        mDisplayToken(args.displayToken),
        mDisplayToken(args.displayToken),
        mId(args.displayId),
        mId(args.displayId),
        mNativeWindow(args.nativeWindow),
        mNativeWindow(args.nativeWindow),
        mGraphicBuffer(nullptr),
        mDisplaySurface(args.displaySurface),
        mDisplaySurface(args.displaySurface),
        mSurface{std::move(args.renderSurface)},
        mDisplayWidth(args.displayWidth),
        mDisplayHeight(args.displayHeight),
        mDisplayInstallOrientation(args.displayInstallOrientation),
        mDisplayInstallOrientation(args.displayInstallOrientation),
        mPageFlipCount(0),
        mPageFlipCount(0),
        mIsVirtual(args.isVirtual),
        mIsVirtual(args.isVirtual),
@@ -246,9 +246,6 @@ DisplayDevice::DisplayDevice(DisplayDeviceCreationArgs&& args)


    ALOGE_IF(!mNativeWindow, "No native window was set for display");
    ALOGE_IF(!mNativeWindow, "No native window was set for display");
    ALOGE_IF(!mDisplaySurface, "No display surface was set for display");
    ALOGE_IF(!mDisplaySurface, "No display surface was set for display");
    ALOGE_IF(!mSurface, "No render surface was set for display");
    ALOGE_IF(mDisplayWidth <= 0 || mDisplayHeight <= 0,
             "Invalid dimensions of %d x %d were set for display", mDisplayWidth, mDisplayHeight);


    std::vector<Hdr> types = args.hdrCapabilities.getSupportedHdrTypes();
    std::vector<Hdr> types = args.hdrCapabilities.getSupportedHdrTypes();
    for (Hdr hdrType : types) {
    for (Hdr hdrType : types) {
@@ -287,6 +284,14 @@ DisplayDevice::DisplayDevice(DisplayDeviceCreationArgs&& args)
    }
    }
    mHdrCapabilities = HdrCapabilities(types, maxLuminance, maxAverageLuminance, minLuminance);
    mHdrCapabilities = HdrCapabilities(types, maxLuminance, maxAverageLuminance, minLuminance);


    ANativeWindow* const window = mNativeWindow.get();

    int status = native_window_api_connect(mNativeWindow.get(), NATIVE_WINDOW_API_EGL);
    ALOGE_IF(status != NO_ERROR, "Unable to connect BQ producer: %d", status);

    mDisplayWidth = ANativeWindow_getWidth(window);
    mDisplayHeight = ANativeWindow_getHeight(window);

    // initialize the display orientation transform.
    // initialize the display orientation transform.
    setProjection(DisplayState::eOrientationDefault, mViewport, mFrame);
    setProjection(DisplayState::eOrientationDefault, mViewport, mFrame);
}
}
@@ -321,7 +326,6 @@ uint32_t DisplayDevice::getPageFlipCount() const {


void DisplayDevice::flip() const
void DisplayDevice::flip() const
{
{
    mFlinger->getRenderEngine().checkErrors();
    mPageFlipCount++;
    mPageFlipCount++;
}
}


@@ -356,9 +360,71 @@ status_t DisplayDevice::prepareFrame(HWComposer& hwc,
    return mDisplaySurface->prepareFrame(compositionType);
    return mDisplaySurface->prepareFrame(compositionType);
}
}


void DisplayDevice::swapBuffers(HWComposer& hwc) const {
sp<GraphicBuffer> DisplayDevice::dequeueBuffer() {
    int fd;
    ANativeWindowBuffer* buffer;

    status_t res = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buffer, &fd);

    if (res != NO_ERROR) {
        ALOGE("ANativeWindow::dequeueBuffer failed for display [%s] with error: %d",
              getDisplayName().c_str(), res);
        // Return fast here as we can't do much more - any rendering we do
        // now will just be wrong.
        return mGraphicBuffer;
    }

    ALOGW_IF(mGraphicBuffer != nullptr, "Clobbering a non-null pointer to a buffer [%p].",
             mGraphicBuffer->getNativeBuffer()->handle);
    mGraphicBuffer = GraphicBuffer::from(buffer);

    // Block until the buffer is ready
    // TODO(alecmouri): it's perhaps more appropriate to block renderengine so
    // that the gl driver can block instead.
    if (fd >= 0) {
        sync_wait(fd, -1);
        close(fd);
    }

    return mGraphicBuffer;
}

void DisplayDevice::queueBuffer(HWComposer& hwc) {
    if (hwc.hasClientComposition(mId) || hwc.hasFlipClientTargetRequest(mId)) {
    if (hwc.hasClientComposition(mId) || hwc.hasFlipClientTargetRequest(mId)) {
        mSurface->swapBuffers();
        // hasFlipClientTargetRequest could return true even if we haven't
        // dequeued a buffer before. Try dequeueing one if we don't have a
        // buffer ready.
        if (mGraphicBuffer == nullptr) {
            ALOGI("Attempting to queue a client composited buffer without one "
                  "previously dequeued for display [%s]. Attempting to dequeue "
                  "a scratch buffer now",
                  mDisplayName.c_str());
            // We shouldn't deadlock here, since mGraphicBuffer == nullptr only
            // after a successful call to queueBuffer, or if dequeueBuffer has
            // never been called.
            dequeueBuffer();
        }

        if (mGraphicBuffer == nullptr) {
            ALOGE("No buffer is ready for display [%s]", mDisplayName.c_str());
        } else {
            int fd = mBufferReady.release();

            status_t res = mNativeWindow->queueBuffer(mNativeWindow.get(),
                                                      mGraphicBuffer->getNativeBuffer(), fd);
            if (res != NO_ERROR) {
                ALOGE("Error when queueing buffer for display [%s]: %d", mDisplayName.c_str(), res);
                // We risk blocking on dequeueBuffer if the primary display failed
                // to queue up its buffer, so crash here.
                if (isPrimary()) {
                    LOG_ALWAYS_FATAL("ANativeWindow::queueBuffer failed with error: %d", res);
                } else {
                    mNativeWindow->cancelBuffer(mNativeWindow.get(),
                                                mGraphicBuffer->getNativeBuffer(), fd);
                }
            }
            mGraphicBuffer = nullptr;
        }
    }
    }


    status_t result = mDisplaySurface->advanceFrame();
    status_t result = mDisplaySurface->advanceFrame();
@@ -367,16 +433,10 @@ void DisplayDevice::swapBuffers(HWComposer& hwc) const {
    }
    }
}
}


void DisplayDevice::onSwapBuffersCompleted() const {
void DisplayDevice::onPresentDisplayCompleted() {
    mDisplaySurface->onFrameCommitted();
    mDisplaySurface->onFrameCommitted();
}
}


bool DisplayDevice::makeCurrent() const {
    bool success = mFlinger->getRenderEngine().setCurrentSurface(*mSurface);
    setViewportAndProjection();
    return success;
}

void DisplayDevice::setViewportAndProjection() const {
void DisplayDevice::setViewportAndProjection() const {
    size_t w = mDisplayWidth;
    size_t w = mDisplayWidth;
    size_t h = mDisplayHeight;
    size_t h = mDisplayHeight;
@@ -384,6 +444,13 @@ void DisplayDevice::setViewportAndProjection() const {
    mFlinger->getRenderEngine().setViewportAndProjection(w, h, sourceCrop, ui::Transform::ROT_0);
    mFlinger->getRenderEngine().setViewportAndProjection(w, h, sourceCrop, ui::Transform::ROT_0);
}
}


void DisplayDevice::finishBuffer() {
    mBufferReady = mFlinger->getRenderEngine().flush();
    if (mBufferReady.get() < 0) {
        mFlinger->getRenderEngine().finish();
    }
}

const sp<Fence>& DisplayDevice::getClientTargetAcquireFence() const {
const sp<Fence>& DisplayDevice::getClientTargetAcquireFence() const {
    return mDisplaySurface->getClientTargetAcquireFence();
    return mDisplaySurface->getClientTargetAcquireFence();
}
}
@@ -532,19 +599,10 @@ status_t DisplayDevice::orientationToTransfrom(
void DisplayDevice::setDisplaySize(const int newWidth, const int newHeight) {
void DisplayDevice::setDisplaySize(const int newWidth, const int newHeight) {
    dirtyRegion.set(getBounds());
    dirtyRegion.set(getBounds());


    mSurface->setNativeWindow(nullptr);

    mDisplaySurface->resizeBuffers(newWidth, newHeight);
    mDisplaySurface->resizeBuffers(newWidth, newHeight);


    ANativeWindow* const window = mNativeWindow.get();
    mDisplayWidth = newWidth;
    mSurface->setNativeWindow(window);
    mDisplayHeight = newHeight;
    mDisplayWidth = mSurface->getWidth();
    mDisplayHeight = mSurface->getHeight();

    LOG_FATAL_IF(mDisplayWidth != newWidth,
                "Unable to set new width to %d", newWidth);
    LOG_FATAL_IF(mDisplayHeight != newHeight,
                "Unable to set new height to %d", newHeight);
}
}


void DisplayDevice::setProjection(int orientation,
void DisplayDevice::setProjection(int orientation,
@@ -658,12 +716,11 @@ void DisplayDevice::dump(String8& result) const {
    ANativeWindow* const window = mNativeWindow.get();
    ANativeWindow* const window = mNativeWindow.get();
    result.appendFormat("+ %s\n", getDebugName().c_str());
    result.appendFormat("+ %s\n", getDebugName().c_str());
    result.appendFormat("  layerStack=%u, (%4dx%4d), ANativeWindow=%p "
    result.appendFormat("  layerStack=%u, (%4dx%4d), ANativeWindow=%p "
                        "(%d:%d:%d:%d), orient=%2d (type=%08x), "
                        "format=%d, orient=%2d (type=%08x), flips=%u, isSecure=%d, "
                        "flips=%u, isSecure=%d, powerMode=%d, activeConfig=%d, numLayers=%zu\n",
                        "powerMode=%d, activeConfig=%d, numLayers=%zu\n",
                        mLayerStack, mDisplayWidth, mDisplayHeight, window,
                        mLayerStack, mDisplayWidth, mDisplayHeight, window,
                        mSurface->queryRedSize(), mSurface->queryGreenSize(),
                        ANativeWindow_getFormat(window), mOrientation, tr.getType(),
                        mSurface->queryBlueSize(), mSurface->queryAlphaSize(), mOrientation,
                        getPageFlipCount(), mIsSecure, mPowerMode, mActiveConfig,
                        tr.getType(), getPageFlipCount(), mIsSecure, mPowerMode, mActiveConfig,
                        mVisibleLayersSortedByZ.size());
                        mVisibleLayersSortedByZ.size());
    result.appendFormat("   v:[%d,%d,%d,%d], f:[%d,%d,%d,%d], s:[%d,%d,%d,%d],"
    result.appendFormat("   v:[%d,%d,%d,%d], f:[%d,%d,%d,%d], s:[%d,%d,%d,%d],"
                        "transform:[[%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f]]\n",
                        "transform:[[%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f]]\n",
@@ -674,9 +731,9 @@ void DisplayDevice::dump(String8& result) const {
    auto const surface = static_cast<Surface*>(window);
    auto const surface = static_cast<Surface*>(window);
    ui::Dataspace dataspace = surface->getBuffersDataSpace();
    ui::Dataspace dataspace = surface->getBuffersDataSpace();
    result.appendFormat("   wideColorGamut=%d, hdr10=%d, colorMode=%s, dataspace: %s (%d)\n",
    result.appendFormat("   wideColorGamut=%d, hdr10=%d, colorMode=%s, dataspace: %s (%d)\n",
                        mHasWideColorGamut, mHasHdr10,
                        mHasWideColorGamut, mHasHdr10, decodeColorMode(mActiveColorMode).c_str(),
                        decodeColorMode(mActiveColorMode).c_str(),
                        dataspaceDetails(static_cast<android_dataspace>(dataspace)).c_str(),
                        dataspaceDetails(static_cast<android_dataspace>(dataspace)).c_str(), dataspace);
                        dataspace);


    String8 surfaceDump;
    String8 surfaceDump;
    mDisplaySurface->dumpAsString(surfaceDump);
    mDisplaySurface->dumpAsString(surfaceDump);
+19 −11
Original line number Original line Diff line number Diff line
@@ -24,25 +24,25 @@
#include <string>
#include <string>
#include <unordered_map>
#include <unordered_map>


#include <android/native_window.h>
#include <binder/IBinder.h>
#include <binder/IBinder.h>
#include <gui/LayerState.h>
#include <gui/LayerState.h>
#include <hardware/hwcomposer_defs.h>
#include <hardware/hwcomposer_defs.h>
#include <math/mat4.h>
#include <math/mat4.h>
#include <renderengine/Surface.h>
#include <renderengine/RenderEngine.h>
#include <system/window.h>
#include <ui/GraphicTypes.h>
#include <ui/GraphicTypes.h>
#include <ui/HdrCapabilities.h>
#include <ui/HdrCapabilities.h>
#include <ui/Region.h>
#include <ui/Region.h>
#include <ui/Transform.h>
#include <ui/Transform.h>
#include <utils/RefBase.h>
#include <utils/Mutex.h>
#include <utils/Mutex.h>
#include <utils/RefBase.h>
#include <utils/String8.h>
#include <utils/String8.h>
#include <utils/Timers.h>
#include <utils/Timers.h>


#include "DisplayHardware/DisplayIdentification.h"
#include "DisplayHardware/DisplayIdentification.h"
#include "RenderArea.h"
#include "RenderArea.h"


struct ANativeWindow;

namespace android {
namespace android {


class DisplaySurface;
class DisplaySurface;
@@ -146,10 +146,13 @@ public:
                          ui::Dataspace* outDataspace, ui::ColorMode* outMode,
                          ui::Dataspace* outDataspace, ui::ColorMode* outMode,
                          ui::RenderIntent* outIntent) const;
                          ui::RenderIntent* outIntent) const;


    void swapBuffers(HWComposer& hwc) const;
    // Queues the drawn buffer for consumption by HWC.
    void queueBuffer(HWComposer& hwc);
    // Allocates a buffer as scratch space for GPU composition
    sp<GraphicBuffer> dequeueBuffer();


    // called after h/w composer has completed its set() call
    // called after h/w composer has completed its set() call
    void onSwapBuffersCompleted() const;
    void onPresentDisplayCompleted();


    Rect getBounds() const {
    Rect getBounds() const {
        return Rect(mDisplayWidth, mDisplayHeight);
        return Rect(mDisplayWidth, mDisplayHeight);
@@ -159,7 +162,11 @@ public:
    void setDisplayName(const std::string& displayName);
    void setDisplayName(const std::string& displayName);
    const std::string& getDisplayName() const { return mDisplayName; }
    const std::string& getDisplayName() const { return mDisplayName; }


    bool makeCurrent() const;
    // Acquires a new buffer for GPU composition.
    void readyNewBuffer();
    // Marks the current buffer has finished, so that it can be presented and
    // swapped out.
    void finishBuffer();
    void setViewportAndProjection() const;
    void setViewportAndProjection() const;


    const sp<Fence>& getClientTargetAcquireFence() const;
    const sp<Fence>& getClientTargetAcquireFence() const;
@@ -204,9 +211,13 @@ private:


    // ANativeWindow this display is rendering into
    // ANativeWindow this display is rendering into
    sp<ANativeWindow> mNativeWindow;
    sp<ANativeWindow> mNativeWindow;
    // Current buffer that this display can render to.
    sp<GraphicBuffer> mGraphicBuffer;
    sp<DisplaySurface> mDisplaySurface;
    sp<DisplaySurface> mDisplaySurface;
    // File descriptor indicating that mGraphicBuffer is ready for display, i.e.
    // that drawing to the buffer is now complete.
    base::unique_fd mBufferReady;


    std::unique_ptr<renderengine::Surface> mSurface;
    int             mDisplayWidth;
    int             mDisplayWidth;
    int             mDisplayHeight;
    int             mDisplayHeight;
    const int       mDisplayInstallOrientation;
    const int       mDisplayInstallOrientation;
@@ -326,9 +337,6 @@ struct DisplayDeviceCreationArgs {
    bool isSecure{false};
    bool isSecure{false};
    sp<ANativeWindow> nativeWindow;
    sp<ANativeWindow> nativeWindow;
    sp<DisplaySurface> displaySurface;
    sp<DisplaySurface> displaySurface;
    std::unique_ptr<renderengine::Surface> renderSurface;
    int displayWidth{0};
    int displayHeight{0};
    int displayInstallOrientation{DisplayState::eOrientationDefault};
    int displayInstallOrientation{DisplayState::eOrientationDefault};
    bool hasWideColorGamut{false};
    bool hasWideColorGamut{false};
    HdrCapabilities hdrCapabilities;
    HdrCapabilities hdrCapabilities;
Loading