[webkit-changes] [WebKit/WebKit] d891c0: SharedVideoFrameReader does not need to create a d...

youennf noreply at github.com
Fri Nov 10 08:01:06 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d891c0e48c746f2772958d4b208065cdb92f7731
      https://github.com/WebKit/WebKit/commit/d891c0e48c746f2772958d4b208065cdb92f7731
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2023-11-10 (Fri, 10 Nov 2023)

  Changed paths:
    M Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.cpp
    M Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.h

  Log Message:
  -----------
  SharedVideoFrameReader does not need to create a default IPC::Semaphore
https://bugs.webkit.org/show_bug.cgi?id=264467
rdar://118160442

Reviewed by Chris Dumez.

Creating a default IPC::Semaphore is costly.
Given SharedVideoFrameReader will never use its default IPC::Semaphore (it should use the one created from writer side),
we move m_semaphore to std::optional<IPC::Semaphore> to make the SharedVideoFrameReader constructor less expensive.

* Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.cpp:
(WebKit::SharedVideoFrameReader::readBufferFromSharedMemory):
* Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.h:

Canonical link: https://commits.webkit.org/270533@main




More information about the webkit-changes mailing list