summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/utils.h
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-08-05 18:20:45 +0200
committerNiklas Haas <git@haasn.xyz>2017-08-06 00:10:20 +0200
commitf2298f394ec1688e9a02483b15902de24bda403e (patch)
tree9a0c4594a5edab8d8cb5c7f4a8d4d8d5f3aa8999 /video/out/opengl/utils.h
parenta680c643ebb124195fb30619a7e37246660fac7e (diff)
downloadmpv-f2298f394ec1688e9a02483b15902de24bda403e.tar.bz2
mpv-f2298f394ec1688e9a02483b15902de24bda403e.tar.xz
vo_opengl: move timers to struct ra
In order to prevent code duplication and keep the ra abstraction as small as possible, `ra` only implements the actual timer queries, it does not do pooling/averaging of the results. This is instead moved to a ra-neutral struct timer_pool in utils.c.
Diffstat (limited to 'video/out/opengl/utils.h')
-rw-r--r--video/out/opengl/utils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/out/opengl/utils.h b/video/out/opengl/utils.h
index c133480667..7ffffa6547 100644
--- a/video/out/opengl/utils.h
+++ b/video/out/opengl/utils.h
@@ -77,3 +77,12 @@ bool fbotex_change(struct fbotex *fbo, struct ra *ra, struct mp_log *log,
#define FBOTEX_FUZZY_W 1
#define FBOTEX_FUZZY_H 2
#define FBOTEX_FUZZY (FBOTEX_FUZZY_W | FBOTEX_FUZZY_H)
+
+// A wrapper around ra_timer that does result pooling, averaging etc.
+struct timer_pool;
+
+struct timer_pool *timer_pool_create(struct ra *ra);
+void timer_pool_destroy(struct timer_pool *pool);
+void timer_pool_start(struct timer_pool *pool);
+void timer_pool_stop(struct timer_pool *pool);
+struct mp_pass_perf timer_pool_measure(struct timer_pool *pool);