1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
The new-style ("SimScreen") display-callback surface vended by CoreSimDeviceIO. The IO-port display
descriptor conforms to this at runtime in addition to SimDisplayRenderable /
SimDisplayIOSurfaceRenderable; Framebuffer resolves it via -conformsToProtocol: and prefers it
over the old-style damageRectanglesCallback (which the render server itself brands "old-style").
- frameCallback fires once per presented frame — the per-frame change signal a variable-frame-rate
consumer needs, without the legacy damage-rect shape.
- surfacesChangedCallback fires on surface (re)mount — a surface-identity change, and once at
registration if a surface already exists — not per present. Its two args are the current
(framebufferSurface, maskedFramebufferSurface): arg 0 is the primary surface to render; arg 1 is
the notch/corner-masked variant, which we ignore (mirrors SimDisplayIOSurfaceRenderable's
framebufferSurface / maskedFramebufferSurface). Both are IOSurfaceRef (toll-free bridged to
IOSurface) and may be nil.
- propertiesChangedCallback delivers an id<SimScreenProperties> (a CoreSimDeviceIO protocol);
Framebuffer does not consume it.
The block args are typed `id` rather than IOSurface / SimScreenProperties: the descriptor is a
ROCKRemoteProxy (untyped remoting — see SimDisplayIOSurfaceRenderable-Protocol.h), so the seam
confirms each value with a defensive runtime cast rather than trusting an unsound bridge. All three
callbacks are delivered on callbackQueue.
*/