[gtk/wip/chergert/macos-iosurface] macos: add comment regarding buffer lock
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/macos-iosurface] macos: add comment regarding buffer lock
- Date: Sat, 12 Feb 2022 10:32:39 +0000 (UTC)
commit 647b53578947c3dc148af1d6be983a8687ace7ac
Author: Christian Hergert <christian hergert me>
Date: Sat Feb 12 00:45:47 2022 -0800
macos: add comment regarding buffer lock
gdk/macos/gdkmacosbuffer.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/gdk/macos/gdkmacosbuffer.c b/gdk/macos/gdkmacosbuffer.c
index 1612eaa9f6..2982d39594 100644
--- a/gdk/macos/gdkmacosbuffer.c
+++ b/gdk/macos/gdkmacosbuffer.c
@@ -153,6 +153,17 @@ _gdk_macos_buffer_get_native (GdkMacosBuffer *self)
return self->surface;
}
+/**
+ * _gdk_macos_buffer_lock:
+ *
+ * This function matches the IOSurfaceLock() name but what it really
+ * does is page the buffer back for the CPU to access from VRAM.
+ *
+ * Generally we don't want to do that, but we do need to in some
+ * cases such as when we are rendering with Cairo. There might
+ * be an opportunity later to avoid that, but since we are using
+ * GL pretty much everywhere already, we don't try.
+ */
void
_gdk_macos_buffer_lock (GdkMacosBuffer *self)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]