[MPlayer-dev-eng] [PATCH] - No Reset of D3D device on resize

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Dec 20 16:50:16 CET 2008


On Wed, Dec 17, 2008 at 05:09:23PM +0200, Georgi Petrov wrote:
> Hey, did you forget the patch. Just checking :)

No, but I had not much time and there were places that looked very
suspicious.
You are duplicating the handling of d3d_surface and d3d_backbuf
deallocation in three places which is already quite ugly.
But in addition you do not release them at all in the configure()
function any more, and you do not release the backbuffer
in the reconfigure function.
Now, I think there is no need to release them, since the whole
d3d_device is released but then
1) should that be changed in a different patch
2) there is no reason to release the surface/osd textures either

Lastly, in resize_d3d you would first call
check_d3d_backbuffer_dimensions which may do a Reset and then destroy
and reallocate the OSD textures. I would have to re-read the Reset
description to see if that is ok, but it sure seems ugly to me,
IMO it should be a simple
if (vo_dwidth > priv->cur_backbuf_width || vo_dheight ...) {
  update cur_backbuf_*
  same code as the current one
} else {
  destroy_d3d_osd_textures();
  create_d3d_osd_textures();
}



More information about the MPlayer-dev-eng mailing list