| 1639 | CallbackHandlers::func_AChoreographer_postFrameCallbackDelayed64 AChoreographer_postFrameCallbackDelayed64_; |
| 1640 | |
| 1641 | void CallbackHandlers::PostCallback(const FunctionCallbackInfo<v8::Value> &args, CallbackHandlers::FrameCallbackCacheEntry* entry, v8::Local<v8::Context> context){ |
| 1642 | ALooper_prepare(0); |
| 1643 | auto instance = AChoreographer_getInstance_(); |
| 1644 | auto delay = args[1]; |
| 1645 | if(android_get_device_api_level() >= 29){ |
| 1646 | if(!delay.IsEmpty() && delay->IsNumber()){ |
| 1647 | AChoreographer_postFrameCallbackDelayed64_(instance, entry->frameCallback64_, entry, delay->Uint32Value(context).FromMaybe(0)); |
| 1648 | }else { |
| 1649 | AChoreographer_postFrameCallback64_(instance, entry->frameCallback64_, entry); |
| 1650 | } |
| 1651 | }else { |
| 1652 | if(!delay.IsEmpty() && delay->IsNumber()){ |
| 1653 | AChoreographer_postFrameCallbackDelayed_(instance, entry->frameCallback_, entry, (long)delay->IntegerValue(context).FromMaybe(0)); |
| 1654 | }else { |
| 1655 | AChoreographer_postFrameCallback_(instance, entry->frameCallback_, entry); |
| 1656 | } |
| 1657 | } |
| 1658 | } |
| 1659 | |
| 1660 | |
| 1661 | void CallbackHandlers::PostFrameCallback(const FunctionCallbackInfo<v8::Value> &args) { |