macos: add readonly IOSurfaceLock helper
authorChristian Hergert <christian@hergert.me>
Mon, 28 Feb 2022 09:29:22 +0000 (01:29 -0800)
committerChristian Hergert <christian@hergert.me>
Mon, 28 Feb 2022 19:36:27 +0000 (11:36 -0800)
commitdbede0b11599b284bf57154a334254789fc16ab1
treee21b7f6c276cd75542bd75530a5d1f3e9ced8bbc
parent1e40033852633b62a751510f6c1aa6b83445e5b3
macos: add readonly IOSurfaceLock helper

This can be used to lock a surface for reading to avoid causing the
surface contents to be invalidated. This is needed when reading back from
a front-buffer to the back-buffer as is needed when using Cairo surfaces
to implement something similar to BufferAge.
gdk/macos/gdkmacosbuffer-private.h
gdk/macos/gdkmacosbuffer.c