Lines Matching refs:cb
143 void Choreographer::postFrameCallbackDelayed(AChoreographer_frameCallback cb, in postFrameCallbackDelayed() argument
148 FrameCallback callback{cb, cb64, vsyncCallback, data, now + delay, callbackType}; in postFrameCallbackDelayed()
174 void Choreographer::registerRefreshRateCallback(AChoreographer_refreshRateCallback cb, void* data) { in registerRefreshRateCallback() argument
178 if (cb == callback.callback && data == callback.data) { in registerRefreshRateCallback()
183 RefreshRateCallback{.callback = cb, .data = data, .firstCallbackFired = false}); in registerRefreshRateCallback()
216 void Choreographer::unregisterRefreshRateCallback(AChoreographer_refreshRateCallback cb, in unregisterRefreshRateCallback() argument
222 return cb == callback.callback && in unregisterRefreshRateCallback()
275 for (auto& cb : mRefreshRateCallbacks) { in handleRefreshRateUpdates() local
276 callbacks.push_back(cb); in handleRefreshRateUpdates()
277 cb.firstCallbackFired = true; in handleRefreshRateUpdates()
281 for (auto& cb : callbacks) { in handleRefreshRateUpdates() local
282 if (!cb.firstCallbackFired || (pendingPeriod > 0 && pendingPeriod != lastPeriod)) { in handleRefreshRateUpdates()
283 cb.callback(pendingPeriod, cb.data); in handleRefreshRateUpdates()
290 for (const auto& cb : callbacks) { in dispatchCallbacks() local
291 if (cb.vsyncCallback != nullptr) { in dispatchCallbacks()
298 cb.vsyncCallback(reinterpret_cast<const AChoreographerFrameCallbackData*>( in dispatchCallbacks()
300 cb.data); in dispatchCallbacks()
302 } else if (cb.callback64 != nullptr) { in dispatchCallbacks()
304 cb.callback64(timestamp, cb.data); in dispatchCallbacks()
305 } else if (cb.callback != nullptr) { in dispatchCallbacks()
307 cb.callback(timestamp, cb.data); in dispatchCallbacks()