summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-04-27 14:35:24 +0200
committerwm4 <wm4@nowhere>2016-04-27 14:35:24 +0200
commit9cb036f297d7a3f40aad5ccade182f5449ae7bf8 (patch)
treed72aaa496d013bce44863b614fc63291477e264f /video/out
parent0b1ba577b14387ca9547d8700203900e5b213dd3 (diff)
downloadmpv-9cb036f297d7a3f40aad5ccade182f5449ae7bf8.tar.bz2
mpv-9cb036f297d7a3f40aad5ccade182f5449ae7bf8.tar.xz
vo_opengl: d3d11egl: minor simplification
This should be ok. eglBindTexImage() just associates the texture, and does not make a copy (not even a conceptual one).
Diffstat (limited to 'video/out')
-rw-r--r--video/out/opengl/hwdec_d3d11egl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/video/out/opengl/hwdec_d3d11egl.c b/video/out/opengl/hwdec_d3d11egl.c
index a63707b887..66df9983d1 100644
--- a/video/out/opengl/hwdec_d3d11egl.c
+++ b/video/out/opengl/hwdec_d3d11egl.c
@@ -270,6 +270,7 @@ static int reinit(struct gl_hwdec *hw, struct mp_image_params *params)
gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ eglBindTexImage(p->egl_display, p->egl_surface, EGL_BACK_BUFFER);
gl->BindTexture(GL_TEXTURE_2D, 0);
return 0;
@@ -357,7 +358,6 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image,
GLuint *out_textures)
{
struct priv *p = hw->priv;
- GL *gl = hw->gl;
HRESULT hr;
ID3D11VideoProcessorInputView *in_view = NULL;
@@ -406,10 +406,6 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image,
return -1;
}
- gl->BindTexture(GL_TEXTURE_2D, p->gl_texture);
- eglBindTexImage(p->egl_display, p->egl_surface, EGL_BACK_BUFFER);
- gl->BindTexture(GL_TEXTURE_2D, 0);
-
out_textures[0] = p->gl_texture;
return 0;
}