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

Commit 15a477ba authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7435440 from 3b71371d to sc-d1-release

Change-Id: I8860121df75d3be762682734ea541d00631d95d2
parents fd8c5105 3b71371d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1453,7 +1453,9 @@ EGLBoolean eglSurfaceAttribImpl(EGLDisplay dpy, EGLSurface surface, EGLint attri

    if (attribute == EGL_TIMESTAMPS_ANDROID) {
        if (!s->getNativeWindow()) {
            return setError(EGL_BAD_SURFACE, (EGLBoolean)EGL_FALSE);
            // According to the spec, "if surface is not a window surface this has no
            // effect."
            return EGL_TRUE;
        }
        int err = native_window_enable_frame_timestamps(s->getNativeWindow(), value != 0);
        return (err == 0) ? EGL_TRUE : setError(EGL_BAD_SURFACE, (EGLBoolean)EGL_FALSE);
+2 −0
Original line number Diff line number Diff line
@@ -132,6 +132,8 @@ public:

    compositionengine::OutputLayer* getBlurLayer() const;

    bool hasHdrLayers() const;

private:
    CachedSet() = default;

+9 −0
Original line number Diff line number Diff line
@@ -240,6 +240,15 @@ public:
    void resetFramesSinceBufferUpdate() { mFramesSinceBufferUpdate = 0; }
    int64_t getFramesSinceBufferUpdate() const { return mFramesSinceBufferUpdate; }

    ui::Dataspace getDataspace() const { return mOutputDataspace.get(); }

    bool isHdr() const {
        const ui::Dataspace transfer =
                static_cast<ui::Dataspace>(getDataspace() & ui::Dataspace::TRANSFER_MASK);
        return (transfer == ui::Dataspace::TRANSFER_ST2084 ||
                transfer == ui::Dataspace::TRANSFER_HLG);
    }

    void dump(std::string& result) const;
    std::optional<std::string> compare(const LayerState& other) const;

+5 −1
Original line number Diff line number Diff line
@@ -228,7 +228,6 @@ void CachedSet::render(renderengine::RenderEngine& renderEngine,
        // Assume that the final layer contains the buffer that we want to
        // replace with a hole punch.
        holePunchSettings = clientCompositionList.back();
        LOG_ALWAYS_FATAL_IF(!holePunchSettings.source.buffer.buffer, "Expected to have a buffer!");
        // This mimics Layer::prepareClearClientComposition
        holePunchSettings.source.buffer.buffer = nullptr;
        holePunchSettings.source.solidColor = half3(0.0f, 0.0f, 0.0f);
@@ -346,6 +345,11 @@ compositionengine::OutputLayer* CachedSet::getBlurLayer() const {
    return mBlurLayer ? mBlurLayer->getOutputLayer() : nullptr;
}

bool CachedSet::hasHdrLayers() const {
    return std::any_of(mLayers.cbegin(), mLayers.cend(),
                       [](const Layer& layer) { return layer.getState()->isHdr(); });
}

void CachedSet::dump(std::string& result) const {
    const auto now = std::chrono::steady_clock::now();

+2 −1
Original line number Diff line number Diff line
@@ -368,7 +368,8 @@ std::vector<Flattener::Run> Flattener::findCandidateRuns(time_point now) const {
    for (auto currentSet = mLayers.cbegin(); currentSet != mLayers.cend(); ++currentSet) {
        const bool layerIsInactive = now - currentSet->getLastUpdate() > kActiveLayerTimeout;
        const bool layerHasBlur = currentSet->hasBlurBehind();
        if (layerIsInactive && (firstLayer || runHasFirstLayer || !layerHasBlur)) {
        if (layerIsInactive && (firstLayer || runHasFirstLayer || !layerHasBlur) &&
            !currentSet->hasHdrLayers()) {
            if (isPartOfRun) {
                builder.append(currentSet->getLayerCount());
            } else {
Loading