Skip to content

Instantly share code, notes, and snippets.

@thubble
thubble / chromium-support-disjoint-vaapi-export-import.patch
Last active February 18, 2024 21:28
Patch to allow Chromium zero-copy VaapiVideoDecoder to work when va-api exports dma-buf planes as disjoint, such as with AMD Mesa
--- a/gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc
+++ b/gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc
@@ -257,7 +257,7 @@
return false;
}
-#if BUILDFLAG(IS_LINUX)
+#if 0
if (format.IsLegacyMultiplanar()) {
// ExternalVkImageBacking doesn't work properly with external sampler
@sindresorhus
sindresorhus / esm-package.md
Last active May 22, 2024 09:14
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.