diff options
author | Niklas Haas <git@haasn.dev> | 2022-01-11 21:03:27 +0100 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2022-01-11 23:45:08 +0200 |
commit | 9e2c0b8baa3f9ccba997129a1c1023f61611e4dd (patch) | |
tree | fff3693f77deeef422f91fb817c028ef54f76e63 /video/out/gpu/osd.c | |
parent | 429402cb087f3a052cb9645af1e42156fd413c6c (diff) | |
download | mpv-9e2c0b8baa3f9ccba997129a1c1023f61611e4dd.tar.bz2 mpv-9e2c0b8baa3f9ccba997129a1c1023f61611e4dd.tar.xz |
sub: rename SUBBITMAP_RGBA to SUBBITMAP_BGRA
This was a misnomer, the actual channel order is IMGFMT_BGRA (as the
comment explicitly point out). Rename the enum for consistency.
Diffstat (limited to 'video/out/gpu/osd.c')
-rw-r--r-- | video/out/gpu/osd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/gpu/osd.c b/video/out/gpu/osd.c index 63a04481d2..75538dbdf4 100644 --- a/video/out/gpu/osd.c +++ b/video/out/gpu/osd.c @@ -31,7 +31,7 @@ static const int blend_factors[SUBBITMAP_COUNT][4] = { [SUBBITMAP_LIBASS] = {RA_BLEND_SRC_ALPHA, RA_BLEND_ONE_MINUS_SRC_ALPHA, RA_BLEND_ONE, RA_BLEND_ONE_MINUS_SRC_ALPHA}, - [SUBBITMAP_RGBA] = {RA_BLEND_ONE, RA_BLEND_ONE_MINUS_SRC_ALPHA, + [SUBBITMAP_BGRA] = {RA_BLEND_ONE, RA_BLEND_ONE_MINUS_SRC_ALPHA, RA_BLEND_ONE, RA_BLEND_ONE_MINUS_SRC_ALPHA}, }; @@ -86,7 +86,7 @@ struct mpgl_osd *mpgl_osd_init(struct ra *ra, struct mp_log *log, }; ctx->fmt_table[SUBBITMAP_LIBASS] = ra_find_unorm_format(ra, 1, 1); - ctx->fmt_table[SUBBITMAP_RGBA] = ra_find_unorm_format(ra, 1, 4); + ctx->fmt_table[SUBBITMAP_BGRA] = ra_find_unorm_format(ra, 1, 4); for (int n = 0; n < MAX_OSD_PARTS; n++) ctx->parts[n] = talloc_zero(ctx, struct mpgl_osd_part); @@ -215,7 +215,7 @@ bool mpgl_osd_draw_prepare(struct mpgl_osd *ctx, int index, gl_sc_uniform_texture(sc, "osdtex", part->texture); switch (fmt) { - case SUBBITMAP_RGBA: { + case SUBBITMAP_BGRA: { GLSL(color = texture(osdtex, texcoord).bgra;) break; } |