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

Commit 17ffe902 authored by Nolan Scobie's avatar Nolan Scobie
Browse files

Rename SkiaGpuContext::isAbandoned to isAbandonedOrDeviceLost

In Ganesh, "abandoned" means either the context was explicitly
abandoned, or the underlying GPU API's "device" was lost.

In Graphite, there's only the concept of losing the device.

Test: compiles
Bug: b/293371537
Change-Id: I1bc69b799e9d7bdb3bde037f79b3736fc2023d70
parent 342d394c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -665,8 +665,8 @@ void SkiaRenderEngine::drawLayersInternal(
    validateOutputBufferUsage(buffer->getBuffer());

    auto context = getActiveContext();
    LOG_ALWAYS_FATAL_IF(context->isAbandoned(), "Context is abandoned/device lost at start of %s",
                        __func__);
    LOG_ALWAYS_FATAL_IF(context->isAbandonedOrDeviceLost(),
                        "Context is abandoned/device lost at start of %s", __func__);

    // any AutoBackendTexture deletions will now be deferred until cleanupPostRender is called
    DeferTextureCleanup dtc(mTextureCleanupMgr);
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ size_t GaneshGpuContext::getMaxTextureSize() const {
    return mGrContext->maxTextureSize();
};

bool GaneshGpuContext::isAbandoned() {
bool GaneshGpuContext::isAbandonedOrDeviceLost() {
    return mGrContext->abandoned();
}

+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ public:

    size_t getMaxRenderTargetSize() const override;
    size_t getMaxTextureSize() const override;
    bool isAbandoned() override;
    bool isAbandonedOrDeviceLost() override;
    void setResourceCacheLimit(size_t maxResourceBytes) override;

    void finishRenderingAndAbandonContext() override;
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ public:
     */
    virtual sk_sp<SkSurface> createRenderTarget(SkImageInfo imageInfo) = 0;

    virtual bool isAbandoned() = 0;
    virtual bool isAbandonedOrDeviceLost() = 0;
    virtual size_t getMaxRenderTargetSize() const = 0;
    virtual size_t getMaxTextureSize() const = 0;
    virtual void setResourceCacheLimit(size_t maxResourceBytes) = 0;