@@ -561,16 +561,18 @@ class UTILS_PUBLIC Platform {
561561
562562 /* *
563563 * Sets the callback function that the backend can use to update backend-specific statistics
564- * to aid with debugging. This callback is guaranteed to be called on the Filament driver
565- * thread.
564+ * to aid with debugging. This callback can be called on either the Filament main thread or
565+ * the Filament driver thread.
566566 *
567567 * The callback signature is (key, intValue, stringValue). Note that for any given call,
568568 * only one of the value parameters (intValue or stringValue) will be meaningful, depending on
569569 * the specific key.
570570 *
571- * IMPORTANT_NOTE: because the callback is called on the driver thread, only quick, non-blocking
572- * work should be done inside it. Furthermore, no graphics API calls (such as GL calls) should
573- * be made, which could interfere with Filament's driver state.
571+ * IMPORTANT_NOTE: because the callback can be called on the driver thread, only quick,
572+ * non-blocking work should be done inside it. Furthermore, no graphics API calls (such as GL
573+ * calls) should be made, which could interfere with Filament's driver state. Lastly, the
574+ * callback implementation must be synchronized (thread-safe) since it can be called from
575+ * either thread.
574576 *
575577 * @param debugUpdateStat an Invocable that updates debug statistics
576578 */
@@ -587,8 +589,7 @@ class UTILS_PUBLIC Platform {
587589 * with a given key. It is possible for this function to be called multiple times with the
588590 * same key, in which case newer values should overwrite older values.
589591 *
590- * This function is guaranteed to be called only on a single thread, the Filament driver
591- * thread.
592+ * This function can be called on either the Filament main thread or the Filament driver thread.
592593 *
593594 * @param key a null-terminated C-string with the key of the debug statistic
594595 * @param intValue the updated integer value of key (the string value passed to the
@@ -602,8 +603,7 @@ class UTILS_PUBLIC Platform {
602603 * with a given key. It is possible for this function to be called multiple times with the
603604 * same key, in which case newer values should overwrite older values.
604605 *
605- * This function is guaranteed to be called only on a single thread, the Filament driver
606- * thread.
606+ * This function can be called on either the Filament main thread or the Filament driver thread.
607607 *
608608 * @param key a null-terminated C-string with the key of the debug statistic
609609 * @param stringValue the updated string value of key (the integer value passed to the
0 commit comments