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
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addPresentedHandler​(MTLDrawable.Block_addPresentedHandler block)
      addPresentedHandler Add a block to be called when this drawable is presented on screen.
      long drawableID()
      [@property] drawableID The monotonically incremented ID for all MTLDrawable objects created from the same CAMetalLayer object.
      void present()
      Present this drawable as soon as possible
      void presentAfterMinimumDuration​(double duration)
      presentAfterMinimumDuration Present this drawable while setting a minimum duration in seconds before allowing this drawable to appear on the display.
      void presentAtTime​(double presentationTime)
      Present this drawable at the given host time
      double presentedTime()
      [@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
      • 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.