Package apple.metal.protocol
Interface MTLDrawable
-
- All Known Subinterfaces:
CAMetalDrawable
public interface MTLDrawable[@protocol] MTLDrawable All "drawable" objects (such as those coming from CAMetalLayer) are expected to conform to this protocol
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceMTLDrawable.Block_addPresentedHandler
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPresentedHandler(MTLDrawable.Block_addPresentedHandler block)addPresentedHandler Add a block to be called when this drawable is presented on screen.longdrawableID()[@property] drawableID The monotonically incremented ID for all MTLDrawable objects created from the same CAMetalLayer object.voidpresent()Present this drawable as soon as possiblevoidpresentAfterMinimumDuration(double duration)presentAfterMinimumDuration Present this drawable while setting a minimum duration in seconds before allowing this drawable to appear on the display.voidpresentAtTime(double presentationTime)Present this drawable at the given host timedoublepresentedTime()[@property] presentedTime The host time that this drawable was presented on screen.
-
-
-
Method Detail
-
present
void present()
Present this drawable as soon as possible
-
presentAtTime
void presentAtTime(double presentationTime)
Present this drawable at the given host time
-
addPresentedHandler
void addPresentedHandler(MTLDrawable.Block_addPresentedHandler block)
addPresentedHandler Add a block to be called when this drawable is presented on screen.
-
drawableID
long drawableID()
[@property] drawableID The monotonically incremented ID for all MTLDrawable objects created from the same CAMetalLayer object. The value starts from 0.
-
presentAfterMinimumDuration
void presentAfterMinimumDuration(double duration)
presentAfterMinimumDuration Present this drawable while setting a minimum duration in seconds before allowing this drawable to appear on the display.- Parameters:
duration- Duration in seconds before this drawable is allowed to appear on the display
-
presentedTime
double presentedTime()
[@property] presentedTime The host time that this drawable was presented on screen. Returns 0 if a frame has not been presented or has been skipped.
-
-