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

Commit 284803e1 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8521661 from 1ba1adb5 to tm-qpr1-release

Change-Id: If51b227da10c14e40f23132bae0c8bb476ddc2a7
parents 8e72be61 1ba1adb5
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1495,6 +1495,18 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setBuffe
    s->bufferData = std::move(bufferData);
    registerSurfaceControlForCallback(sc);

    // With the current infrastructure, a release callback will not be invoked if there's no
    // transaction callback in the case when a buffer is latched and not released early. This is
    // because the legacy implementation didn't have a release callback and sent releases in the
    // transaction callback. Because of this, we need to make sure to have a transaction callback
    // set up when a buffer is sent in a transaction to ensure the caller gets the release
    // callback, regardless if they set up a transaction callback.
    //
    // TODO (b/230380821): Remove when release callbacks are separated from transaction callbacks
    addTransactionCompletedCallback([](void*, nsecs_t, const sp<Fence>&,
                                       const std::vector<SurfaceControlStats>&) {},
                                    nullptr);

    mContainsBuffer = true;
    return *this;
}
+1 −1
Original line number Diff line number Diff line
@@ -439,7 +439,7 @@ void Cache::primeShaderCache(SkiaRenderEngine* renderengine) {

        const nsecs_t timeAfter = systemTime();
        const float compileTimeMs = static_cast<float>(timeAfter - timeBefore) / 1.0E6;
        const int shadersCompiled = renderengine->reportShadersCompiled();
        const int shadersCompiled = renderengine->reportShadersCompiled() - previousCount;
        ALOGD("Shader cache generated %d shaders in %f ms\n", shadersCompiled, compileTimeMs);
    }
}
+1 −7
Original line number Diff line number Diff line
@@ -296,14 +296,8 @@ void SkiaGLRenderEngine::SkSLCacheMonitor::store(const SkData& key, const SkData
    ATRACE_FORMAT("SF cache: %i shaders", mTotalShadersCompiled);
}

void SkiaGLRenderEngine::assertShadersCompiled(int numShaders) {
    const int cached = mSkSLCacheMonitor.shadersCachedSinceLastCall();
    LOG_ALWAYS_FATAL_IF(cached != numShaders, "Attempted to cache %i shaders; cached %i",
                        numShaders, cached);
}

int SkiaGLRenderEngine::reportShadersCompiled() {
    return mSkSLCacheMonitor.shadersCachedSinceLastCall();
    return mSkSLCacheMonitor.totalShadersCompiled();
}

SkiaGLRenderEngine::SkiaGLRenderEngine(const RenderEngineCreationArgs& args, EGLDisplay display,
+2 −1
Original line number Diff line number Diff line
@@ -61,7 +61,6 @@ public:
    bool supportsProtectedContent() const override;
    void useProtectedContext(bool useProtectedContext) override;
    bool supportsBackgroundBlur() override { return mBlurFilter != nullptr; }
    void assertShadersCompiled(int numShaders) override;
    void onActiveDisplaySizeChanged(ui::Size size) override;
    int reportShadersCompiled() override;

@@ -178,6 +177,8 @@ private:
            return shadersCachedSinceLastCall;
        }

        int totalShadersCompiled() const { return mTotalShadersCompiled; }

    private:
        int mShadersCachedSinceLastCall = 0;
        int mTotalShadersCompiled = 0;
+0 −1
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ public:
    virtual bool isProtected() const override { return false; } // mInProtectedContext; }
    virtual bool supportsProtectedContent() const override { return false; };
    virtual int getContextPriority() override { return 0; }
    virtual void assertShadersCompiled(int numShaders) {}
    virtual int reportShadersCompiled() { return 0; }
    virtual void setEnableTracing(bool tracingEnabled) override;

Loading