forked from AuroraMiddleware/gtk
58b9c3a6d4
Instead of relying on cairo_t to perform drawing from our backing image surface to the Core Graphics context, we can convert the cairo_image_surface_t into a CGImageRef without having to copy data if we are certain of the alignment of the image up front. Without this, there are many situations, based on the size of the window that could cause cairo to take a slow path and malloc/copy the data to ensure that alignment. The previous commit titled "macos: align image surface rowstride to 16-bytes" ensures that this invariant is true so that our drawing code can assume we can reference the framebuffer from the cairo_image_surface_t using a CGDataProvider. Since GdkMacosCairoContext and GdkMacosCairoSubview are coordinating, we can also setup the transformation/scale early when drawing the cairo_image_surface_t instead of when copying it to Core Graphics. Furthermore, the CGImageRef is created with an RGB colorspace so that we are not performing colorspace conversion to the output device. We don't get color matching between displays, but we don't expect that anyway, particularly with the software renderer. |
||
---|---|---|
.. | ||
edgesnapping.c | ||
edgesnapping.h | ||
gdkdisplaylinksource.c | ||
gdkdisplaylinksource.h | ||
gdkmacos.h | ||
GdkMacosBaseView.c | ||
GdkMacosBaseView.h | ||
gdkmacoscairocontext-private.h | ||
gdkmacoscairocontext.c | ||
GdkMacosCairoSubview.c | ||
GdkMacosCairoSubview.h | ||
GdkMacosCairoView.c | ||
GdkMacosCairoView.h | ||
gdkmacosclipboard-private.h | ||
gdkmacosclipboard.c | ||
gdkmacoscursor-private.h | ||
gdkmacoscursor.c | ||
gdkmacosdevice-private.h | ||
gdkmacosdevice.c | ||
gdkmacosdevice.h | ||
gdkmacosdisplay-private.h | ||
gdkmacosdisplay-settings.c | ||
gdkmacosdisplay-translate.c | ||
gdkmacosdisplay.c | ||
gdkmacosdisplay.h | ||
gdkmacosdrag-private.h | ||
gdkmacosdrag.c | ||
gdkmacosdragsurface-private.h | ||
gdkmacosdragsurface.c | ||
gdkmacosdrop-private.h | ||
gdkmacosdrop.c | ||
gdkmacoseventsource-private.h | ||
gdkmacoseventsource.c | ||
gdkmacosglcontext-private.h | ||
gdkmacosglcontext.c | ||
gdkmacosglcontext.h | ||
GdkMacosGLView.c | ||
GdkMacosGLView.h | ||
gdkmacoskeymap-private.h | ||
gdkmacoskeymap.c | ||
gdkmacoskeymap.h | ||
gdkmacosmonitor-private.h | ||
gdkmacosmonitor.c | ||
gdkmacosmonitor.h | ||
gdkmacospopupsurface-private.h | ||
gdkmacospopupsurface.c | ||
gdkmacosseat-private.h | ||
gdkmacosseat.c | ||
gdkmacosseat.h | ||
gdkmacossurface-private.h | ||
gdkmacossurface.c | ||
gdkmacossurface.h | ||
gdkmacostoplevelsurface-private.h | ||
gdkmacostoplevelsurface.c | ||
gdkmacosutils-private.h | ||
GdkMacosWindow.c | ||
GdkMacosWindow.h | ||
meson.build |