Skip to content

1.3.0

Latest

Choose a tag to compare

@nothingsh nothingsh released this 01 Nov 09:12

CutawayServer now speaks Cutaway protocol 1.3. Cutaway can refresh faster by skipping images it already has, learns when the app's hierarchy changes without asking, and shows group images closer to what is on screen. Clients of protocol 1.0 to 1.2 keep working, and the server sends them only what their version defines.

What's new

Image digests

  • Every layer image carries a digest of its content. Images with the same content have the same digest, whichever layer they belong to.
  • Cutaway can send back the digests it holds. An image that has not changed comes back as a short "unchanged" answer: no pixels are compressed or sent, so refreshing a screen that barely changed is much cheaper.

Hierarchy change notifications

  • Cutaway can ask to be told when the hierarchy changes. Each notification names the subtrees that changed, or the whole hierarchy when a window changed.
  • Notifications are off until Cutaway turns them on, for each connection. While they are off, nothing runs.
  • Checks follow the app's activity: a check runs once the app has held still for 0.3 seconds, or every 2 seconds when it never does. An idle app costs nothing.
  • Checks wait while the person scrolls, so they do not cost frames, and stop while the app is not active. Activity causes at most one check a second, and notifications are at least a second apart. Changes are merged, not lost.
  • Attribute edits made from Cutaway are normally not reported back as changes.

Group images closer to the screen

  • Windows, and views whose subtree has effects such as UIVisualEffectView, filters or compositing filters, now take their group image from what the system composites. Effects that rendering layer by layer cannot show now appear, and these images are marked as composited.
  • Taking these images does not trigger layout or redraw anything, and changes not yet committed are included.
  • Other group images, and every solo image, are still rendered layer by layer. So are views that are hidden or not fully opaque, and windows that show content excluded from images, so excluded content never appears.
  • A view's composited image has very faint pure black pixels cleared, because the system's shadows are cut off at the view's edge and would otherwise show as a gray rectangle in 3D. Real content that faint and black is cleared too.

cutaway-probe

  • Checks digests, unchanged images and composited images.
  • --watch SECONDS prints each hierarchy change notification as it arrives, with its time.

Compatibility

  • Works with Cutaway apps of protocol 1.0, 1.1, 1.2 and 1.3.
  • The public API is unchanged, and so are the requirements: iOS 13 or later (iOS 15 or later when built with Xcode 27); Xcode 16.3 or later, Swift 6.1 or later, Swift Package Manager.

Installation

.package(url: "https://github.com/nothingsh/CutawayServer", from: "1.3.0")

Full changes: 1.2.0...1.3.0