Instance Method


Informs Xcode about when GPU Frame Capture starts and stops.



func insertDebugCaptureBoundary()


When GPU Frame Capture is enabled, a frame can be defined as the code executed between calls to the insertDebugCaptureBoundary() method, where each call is a frame boundary. If your app does not call this method, a frame boundary is instead defined by a call to the present(_:) or present(_:atTime:) method. If both methods are called, Xcode captures only the frame between insertDebugCaptureBoundary() calls.

The insertDebugCaptureBoundary() method is useful for defining your own frame boundaries. For example, an app with a single drawable and implicit frame boundaries may not need this method; however, an app with multiple drawables may benefit from explicit frame boundaries.

Figure 1

Implicit frame boundaries defined by a drawable's present method

A single drawable is presented four times. Implicit frame boundaries are defined by the drawable's present method.

Figure 2

Explicit frame boundaries defined by the insertDebugCaptureBoundary method

Multiple drawables are presented at different times. Explicit frame boundaries are defined by the insertDebugCaptureBoundary method, thus overriding the implicit frame boundaries of each drawable.