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

Commit 48b5f3cb authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

REThreaded: convert gen- and delete-Textures to no-ops

Bug: 199501005
Test: make
Test: perfetto trace

These functions are not implemented by SkiaGLRenderEngine, so blocking
on them does not serve any purpose. Skip them unless we're running the
THREADED (implicitly GLES) version.

In a local perfetto trace, this reduces the time for these methods from
around 100 microseconds to around 1 microsecond.

Change-Id: I86945d5a1e565db423c181bc828c3f168301784b
parent f2869ebf
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -178,6 +178,10 @@ void RenderEngineThreaded::dump(std::string& result) {

void RenderEngineThreaded::genTextures(size_t count, uint32_t* names) {
    ATRACE_CALL();
    // This is a no-op in SkiaRenderEngine.
    if (getRenderEngineType() != RenderEngineType::THREADED) {
        return;
    }
    std::promise<void> resultPromise;
    std::future<void> resultFuture = resultPromise.get_future();
    {
@@ -194,6 +198,10 @@ void RenderEngineThreaded::genTextures(size_t count, uint32_t* names) {

void RenderEngineThreaded::deleteTextures(size_t count, uint32_t const* names) {
    ATRACE_CALL();
    // This is a no-op in SkiaRenderEngine.
    if (getRenderEngineType() != RenderEngineType::THREADED) {
        return;
    }
    std::promise<void> resultPromise;
    std::future<void> resultFuture = resultPromise.get_future();
    {