public interface MTLDrawable
All "drawable" objects (such as those coming from CAMetalLayer) are expected to conform to this protocol
| Modifier and Type | Interface and Description |
|---|---|
static interface |
MTLDrawable.Block_addPresentedHandler |
| Modifier and Type | Method and Description |
|---|---|
void |
addPresentedHandler(MTLDrawable.Block_addPresentedHandler block)
addPresentedHandler
|
long |
drawableID()
[@property] drawableID
|
void |
present()
Present this drawable as soon as possible
|
void |
presentAfterMinimumDuration(double duration)
presentAfterMinimumDuration
|
void |
presentAtTime(double presentationTime)
Present this drawable at the given host time
|
double |
presentedTime()
[@property] presentedTime
|
void present()
void presentAtTime(double presentationTime)
void addPresentedHandler(MTLDrawable.Block_addPresentedHandler block)
Add a block to be called when this drawable is presented on screen.
long drawableID()
The monotonically incremented ID for all MTLDrawable objects created from the same CAMetalLayer object.
The value starts from 0.
void presentAfterMinimumDuration(double duration)
Present this drawable while setting a minimum duration in seconds before allowing this drawable to appear on the display.
duration - Duration in seconds before this drawable is allowed to appear on the displaydouble presentedTime()
The host time that this drawable was presented on screen.
Returns 0 if a frame has not been presented or has been skipped.