diff options
author | James Ross-Gowan <rossy@jrg.systems> | 2017-10-11 18:10:39 +1100 |
---|---|---|
committer | James Ross-Gowan <rossy@jrg.systems> | 2017-11-07 20:27:13 +1100 |
commit | 4b014b3a8125de22350748d97171c63041256d7b (patch) | |
tree | aeb0b408a3cc6792fb92d6c6a697f98937499dbf /video/out/d3d11/context.c | |
parent | 9b2dae79b1be1f57e7b6bcf80d500ab4190aa3d3 (diff) | |
download | mpv-4b014b3a8125de22350748d97171c63041256d7b.tar.bz2 mpv-4b014b3a8125de22350748d97171c63041256d7b.tar.xz |
vo_gpu: move d3d11_screenshot to shared code
This can be used by the ANGLE backend and ra_d3d11.
Diffstat (limited to 'video/out/d3d11/context.c')
-rw-r--r-- | video/out/d3d11/context.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/video/out/d3d11/context.c b/video/out/d3d11/context.c index 018fd99934..b02d2e80ce 100644 --- a/video/out/d3d11/context.c +++ b/video/out/d3d11/context.c @@ -70,6 +70,14 @@ struct priv { IDXGISwapChain *swapchain; }; +static struct mp_image *d3d11_screenshot(struct ra_swapchain *sw) +{ + struct priv *p = sw->ctx->priv; + if (!p->swapchain) + return NULL; + return mp_d3d11_screenshot(p->swapchain); +} + static struct ra_tex *get_backbuffer(struct ra_ctx *ctx) { struct priv *p = ctx->priv; @@ -169,6 +177,7 @@ static void d3d11_uninit(struct ra_ctx *ctx) static const struct ra_swapchain_fns d3d11_swapchain = { .color_depth = d3d11_color_depth, + .screenshot = d3d11_screenshot, .start_frame = d3d11_start_frame, .submit_frame = d3d11_submit_frame, .swap_buffers = d3d11_swap_buffers, |