diff options
author | Niklas Haas <git@haasn.xyz> | 2017-08-05 19:38:43 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-08-06 00:10:22 +0200 |
commit | 988d188d96d48ce7c78c09276982edb3c481b123 (patch) | |
tree | f4b29914b23dd09663e85449ccfd4877021c0f48 /video/out/opengl/utils.c | |
parent | e5748e891f36a740faf39d7f9af799123d0e4388 (diff) | |
download | mpv-988d188d96d48ce7c78c09276982edb3c481b123.tar.bz2 mpv-988d188d96d48ce7c78c09276982edb3c481b123.tar.xz |
vo_opengl: drop ra_gl.h from shader_cache.c
Since the GL *gl is no longer needed for the timers, we can get rid of
the sc->gl dependency. This requires moving a utility function (which is
not GL-specific anyway) out of gl_utils.h and into utils.h
Diffstat (limited to 'video/out/opengl/utils.c')
-rw-r--r-- | video/out/opengl/utils.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/video/out/opengl/utils.c b/video/out/opengl/utils.c index 097970890f..f4ea3d5472 100644 --- a/video/out/opengl/utils.c +++ b/video/out/opengl/utils.c @@ -221,3 +221,19 @@ struct mp_pass_perf timer_pool_measure(struct timer_pool *pool) return res; } + +void mp_log_source(struct mp_log *log, int lev, const char *src) +{ + int line = 1; + if (!src) + return; + while (*src) { + const char *end = strchr(src, '\n'); + const char *next = end + 1; + if (!end) + next = end = src + strlen(src); + mp_msg(log, lev, "[%3d] %.*s\n", line, (int)(end - src), src); + line++; + src = next; + } +} |