]> git.cworth.org Git - fips/blobdiff - context.h
Add per-frame time and latency measurements
[fips] / context.h
index cbfd6b48f0dbc315f824a28255f8ddf7960c48c3..70e24981024367b6ec54392ba3abdb4629f8bca3 100644 (file)
--- a/context.h
+++ b/context.h
@@ -77,13 +77,21 @@ context_set_current_op (metrics_op_t op);
 metrics_op_t
 context_get_current_op (void);
 
-/* Should be called at the end of every function wrapper for a
- * function that ends a frame, (glXSwapBuffers and similar).
+/* This pair of functions can be used to indicate a frame end.
  *
- * This function performs whatever bookkeeping is necessary to
- * generate a timing report, then emits that report.
+ * Both functions should be by every function wrapper for a function
+ * that ends a frame, (glXSwapBuffers and similar). The pre_swap
+ * before the call to the underlying swap function, and post_swap
+ * after.
+ *
+ * These functions trigger whatever bookkeeping is necessary to
+ * generate a timing report, (such as collecting any outstanding timer
+ * query values), and will also emit those reports when necessary.
  */
 void
-context_end_frame (void);
+context_end_frame_pre_swap (void);
+
+void
+context_end_frame_post_swap (void);
 
 #endif