Bug 239799 - Avoid sending a flush IPC to the GPU process when destroying a RemoteImageBuffer
Summary: Avoid sending a flush IPC to the GPU process when destroying a RemoteImageBuffer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-26 20:33 PDT by Simon Fraser (smfr)
Modified: 2022-04-27 12:03 PDT (History)
5 users (show)

See Also:


Attachments
Patch (6.45 KB, patch)
2022-04-26 20:36 PDT, Simon Fraser (smfr)
sabouhallawa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2022-04-26 20:33:23 PDT
Avoid sending a flush IPC to the GPU process when destroying a RemoteImageBuffer
Comment 1 Simon Fraser (smfr) 2022-04-26 20:36:14 PDT
Created attachment 458415 [details]
Patch
Comment 2 Said Abou-Hallawa 2022-04-26 22:39:46 PDT
Comment on attachment 458415 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=458415&action=review

> Source/WebCore/ChangeLog:8
> +        No new tests (OOPS!).

This should be removed before landing.

> Source/WebCore/platform/graphics/ImageBuffer.h:101
> +    virtual bool flushDrawingContextAsync() { return false; }

It is not clear from the name what this function returns. Should it be renamed flushDrawingContextAsyncIfNeeded()?

> Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:313
> +        return false;

The order in this function is a little bit hard to read. Can't it be rearranged like this:

// Nothing to flush, return true if we need the caller to wait.
if (!m_remoteDisplayList.needsFlush())
    return hasPendingFlush();

// Do the flushing and tell the caller to wait.
...
m_remoteDisplayList.flushContext(m_sentFlushIdentifier);
...
return true;
Comment 3 Simon Fraser (smfr) 2022-04-27 12:02:05 PDT
https://trac.webkit.org/changeset/293522/webkit
Comment 4 Radar WebKit Bug Importer 2022-04-27 12:03:14 PDT
<rdar://problem/92412491>