aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorAlan Third2021-05-29 09:48:51 +0100
committerAlan Third2021-05-31 17:09:42 +0100
commit784ec4b75221e254d2d434578be04466d7ef8786 (patch)
treefd27b889b8e02a4be1a6c8fed77c6beaff86ab5e /configure.ac
parent6bf76258161ca724a87fab2066c1c862ee61cf88 (diff)
downloademacs-scratch/ns/surface-stuff.tar.gz
emacs-scratch/ns/surface-stuff.zip
Simplify macOS drawing codescratch/ns/surface-stuff
Convert EmacsSurface into a CALayer subclass so we can use the built-in relationships. Also simplify the macOS versioning code. This will result in more warnings on older versions of macOS but makes reading the code easier. * configure.ac: Add QuartzCore framework. * src/nsterm.h (NS_DRAW_TO_BUFFER): Remove define and all references. (EmacsSurface, EmacsLayer): Rename EmacsSurface to EmacsLayer and modify the definition to fit the new function. * src/nsterm.m (ns_update_begin): (ns_update_end): (ns_focus): (ns_unfocus): Use the new overridden lockFocus and unlockFocus and simplify the frame management. ([EmacsView dealloc]): ([EmacsView viewDidResize:]):Don't explicitly release surfaces. ([EmacsView initFrameFromEmacs:]): Move the layer code to after the NSWindow has been created as creating the layer now relies on some of it's properties. ([EmacsView makeBackingLayer]): New function. ([EmacsView lockFocus]): ([EmacsView focusOnDrawingBuffer]): Rename to lockFocus. ([EmacsView unlockFocus]): ([EmacsView unfocusDrawingBuffer]): Rename to unlockFocus. ([EmacsView windowDidChangeBackingProperties]): Don't explicitly release surfaces but reset EmacsLayer properties. ([EmacsView layout]): ([EmacsView viewWillDraw]): Rename to layout. ([EmacsView wantsUpdateLayer]): Remove function and change all callers to [EmacsView wantsLayer]. (EmacsSurface, EmacsLayer): Rename to EmacsLayer. ([EmacsSurface getSize]): ([EmacsSurface initWithSize:ColorSpace:Scale:]): Remove methods. ([EmacsSurface initWithColorSpace:]): ([EmacsLayer checkDimensions]): ([EmacsLayer releaseSurfaces]): ([EmacsLayer display]): New functions. * src/nsterm.m ([EmacsLayer dealloc]): Use releaseSurfaces. ([EmacsSurface getContext]): Automatically detect frame property changes and clear the cache if required. Use built-in CALayer properties where available. ([EmacsLayer copyContentsTo:]): Use [CALayer contents] as source.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index d99e5395d35..e83ee47e256 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5647,7 +5647,8 @@ case "$opsys" in
5647 if test "$HAVE_NS" = "yes"; then 5647 if test "$HAVE_NS" = "yes"; then
5648 libs_nsgui="-framework AppKit" 5648 libs_nsgui="-framework AppKit"
5649 if test "$NS_IMPL_COCOA" = "yes"; then 5649 if test "$NS_IMPL_COCOA" = "yes"; then
5650 libs_nsgui="$libs_nsgui -framework IOKit -framework Carbon -framework IOSurface" 5650 libs_nsgui="$libs_nsgui -framework IOKit -framework Carbon \
5651 -framework IOSurface -framework QuartzCore"
5651 fi 5652 fi
5652 else 5653 else
5653 libs_nsgui= 5654 libs_nsgui=