gtk2/gdk/macos
Christian Hergert 998c787638 macos: fix cairo renderer with double buffering
If we are double buffering surfaces with IOSurface then we need to copy
the area that was damaged in the previous frame to the back buffer. This
can be done with IOSurface but we need to hold the read-only lock so that
we don't cause the underlying IOSurface contents to be invalidated.

Additionally, since this is only used in the context of rendering to a
GdkMacosSurface, we know the life-time of the cairo_surface_t and can
simply lock/unlock the IOSurface buffer from begin_frame/end_frame to have
the buffer flushing semantics we want.

To ensure that we don't over damage, we store the damage in begin_frame
(and copy it) and then subtract it from the next frames damage to determine
the smallest amount we need to copy (taking scale factor into account).

We don't care to modify the damage region to swapBuffers because they
already have the right contents and could potentially fall into another
tile anyway and we'd like to avoid damaging that.

Fixes #4735
2022-03-16 12:24:11 -07:00
..
edgesnapping.c macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
edgesnapping.h gdk: Drop GdkPoint from the api 2020-10-29 14:23:46 -04:00
gdkdisplaylinksource.c macos: use video mode for refresh rate and interval 2022-03-16 12:24:11 -07:00
gdkdisplaylinksource.h macos: use video mode for refresh rate and interval 2022-03-16 12:24:11 -07:00
gdkmacos.h macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
GdkMacosBaseView.c macos: use input_region to specify tracking areas 2022-02-16 03:07:51 -08:00
GdkMacosBaseView.h macos: use input_region to specify tracking areas 2022-02-16 03:07:51 -08:00
gdkmacosbuffer-private.h macos: add readonly IOSurfaceLock helper 2022-03-16 12:24:11 -07:00
gdkmacosbuffer.c macos: fix cairo renderer with double buffering 2022-03-16 12:24:11 -07:00
gdkmacoscairocontext-private.h macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
gdkmacoscairocontext.c macos: fix cairo renderer with double buffering 2022-03-16 12:24:11 -07:00
gdkmacosclipboard-private.h macos: make pasteboard usage reusable 2021-06-17 17:19:19 -07:00
gdkmacosclipboard.c macos: make pasteboard usage reusable 2021-06-17 17:19:19 -07:00
gdkmacoscursor-private.h macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
gdkmacoscursor.c Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkmacosdevice-private.h macos: Stop using _gdk_device_query_state 2020-08-26 17:56:41 -04:00
gdkmacosdevice.c macos: track grab serial like other backends 2020-12-02 11:34:31 -08:00
gdkmacosdevice.h macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
gdkmacosdisplay-feedback.c macos: move feedback mechanisms into separate file 2022-03-16 12:23:34 -07:00
gdkmacosdisplay-private.h macos: support mix-rate monitors 2022-03-16 12:24:11 -07:00
gdkmacosdisplay-settings.c Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkmacosdisplay-translate.c macos: short-circuit on NSEventPhaseMayBegin 2022-03-16 12:24:11 -07:00
gdkmacosdisplay-wm.c macos: create new windows with slight origin offset 2022-03-16 12:22:52 -07:00
gdkmacosdisplay.c macos: support mix-rate monitors 2022-03-16 12:24:11 -07:00
gdkmacosdisplay.h macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
gdkmacosdrag-private.h macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
gdkmacosdrag.c macos: Don't include gdkinternals.h 2021-09-24 22:50:29 +02:00
gdkmacosdragsurface-private.h macos: move drag motion to GdkMacosDrag 2021-06-17 13:24:39 -07:00
gdkmacosdragsurface.c macos: move drag motion to GdkMacosDrag 2021-06-17 13:24:39 -07:00
gdkmacosdrop-private.h macos: implement GdkDrop for macOS 2021-06-17 17:26:42 -07:00
gdkmacosdrop.c macos: implement GdkDrop for macOS 2021-06-17 17:26:42 -07:00
gdkmacoseventsource-private.h macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
gdkmacoseventsource.c docs: Cosmetics 2021-10-18 08:35:54 -04:00
gdkmacosglcontext-private.h macos: use CALayer and IOSurface for rendering 2022-02-22 12:01:29 -08:00
gdkmacosglcontext.c macos: update CGL context when surface resizes 2022-02-22 13:15:25 -08:00
gdkmacosglcontext.h macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
gdkmacoskeymap-private.h macos: add key equivalent helper 2020-10-09 20:03:52 -07:00
gdkmacoskeymap.c Correct translation of Mac JIS Eisu & Kana keys 2021-07-24 20:59:18 +09:00
gdkmacoskeymap.h macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
GdkMacosLayer.c macos: only invalidate tiles when size changes 2022-02-22 12:01:29 -08:00
GdkMacosLayer.h macos: use CALayer and IOSurface for rendering 2022-02-22 12:01:29 -08:00
gdkmacosmonitor-private.h macos: support mix-rate monitors 2022-03-16 12:24:11 -07:00
gdkmacosmonitor.c macos: support mix-rate monitors 2022-03-16 12:24:11 -07:00
gdkmacosmonitor.h macos: track various changes in GDK 2020-10-09 20:02:18 -07:00
gdkmacospopupsurface-private.h macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
gdkmacospopupsurface.c macos: remove popup surface from parent 2022-02-03 19:26:16 -08:00
gdkmacosseat-private.h Support stylus devices on macos 2021-01-11 11:41:00 +01:00
gdkmacosseat.c macos: Fix a compiler warning 2021-06-17 17:14:14 -07:00
gdkmacosseat.h Support stylus devices on macos 2021-01-11 11:41:00 +01:00
gdkmacossurface-private.h macos: support mix-rate monitors 2022-03-16 12:24:11 -07:00
gdkmacossurface.c macos: support mix-rate monitors 2022-03-16 12:24:11 -07:00
gdkmacossurface.h macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
GdkMacosTile.c macos: use CALayer and IOSurface for rendering 2022-02-22 12:01:29 -08:00
GdkMacosTile.h macos: use CALayer and IOSurface for rendering 2022-02-22 12:01:29 -08:00
gdkmacostoplevelsurface-private.h macos: fix configure, move-resize, and compute-size 2022-02-18 02:50:46 -08:00
gdkmacostoplevelsurface.c macos: fix origin during live resize of titled window 2022-03-16 12:23:04 -07:00
gdkmacosutils-private.h macos: handle point conversion on older macOS 2021-01-05 13:52:11 -08:00
GdkMacosView.c macos: use CALayer and IOSurface for rendering 2022-02-22 12:01:29 -08:00
GdkMacosView.h macos: use CALayer and IOSurface for rendering 2022-02-22 12:01:29 -08:00
GdkMacosWindow.c macos: restore unfullscreen frame with style mask 2022-03-16 12:23:04 -07:00
GdkMacosWindow.h macos: use CALayer and IOSurface for rendering 2022-02-22 12:01:29 -08:00
meson.build macos: move feedback mechanisms into separate file 2022-03-16 12:23:34 -07:00