[webkit-changes] [WebKit/WebKit] 30bdd8: [Linux] Simplify encoding, decoding of DMABufObject

Žan Doberšek noreply at github.com
Tue Feb 28 05:43:57 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 30bdd8d25a8ef3254c53e84f5bce5bdd53bf47cc
      https://github.com/WebKit/WebKit/commit/30bdd8d25a8ef3254c53e84f5bce5bdd53bf47cc
  Author: Žan Doberšek <zdobersek at igalia.com>
  Date:   2023-02-28 (Tue, 28 Feb 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/gbm/DMABufObject.h
    M Source/WebCore/platform/graphics/gbm/DMABufReleaseFlag.h

  Log Message:
  -----------
  [Linux] Simplify encoding, decoding of DMABufObject
https://bugs.webkit.org/show_bug.cgi?id=252977

Reviewed by Michael Catanzaro.

When encoding and decoding DMABufObject objects, don't iterate over the planes
and encode/decode each parameter separately. Instead, just encode the standalone
arrays of one side and correspondingly decode them on the other side. Once all
the data is through during decoding, the final DMABufObject can be constructed.

DMABufReleaseFlag gains its own encode and decode methods, simply encoding the
file descriptor on one side and decoding it on the other.

* Source/WebCore/platform/graphics/gbm/DMABufObject.h:
(WebCore::DMABufObject::encode):
(WebCore::DMABufObject::decode):
* Source/WebCore/platform/graphics/gbm/DMABufReleaseFlag.h:
(WebCore::DMABufReleaseFlag::encode):
(WebCore::DMABufReleaseFlag::decode):

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




More information about the webkit-changes mailing list