From 9cb036f297d7a3f40aad5ccade182f5449ae7bf8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 27 Apr 2016 14:35:24 +0200 Subject: 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). --- video/out/opengl/hwdec_d3d11egl.c | 6 +----- 1 file changed, 1 insertion(+), 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; } -- cgit v1.2.3