mirror of
https://github.com/mpv-player/mpv
synced 2024-12-27 09:32:40 +00:00
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).
This commit is contained in:
parent
0b1ba577b1
commit
9cb036f297
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user