0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00

EMISSINGBRAIN: No, OSD objects of size 0 sure are _not_ visible.

Fixes massive slowdown after adding dvdnav highlight support, at least
with -vo xvmc, potentially others too.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21380 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-11-29 11:57:16 +00:00
parent cbe3bc8899
commit b2dce56aad

View File

@ -221,7 +221,9 @@ inline static void vo_update_nav (mp_osd_obj_t *obj, int dxs, int dys) {
len = obj->stride * (obj->bbox.y2 - obj->bbox.y1);
memset (obj->bitmap_buffer, OSD_NAV_BOX_ALPHA, len);
memset (obj->alpha_buffer, OSD_NAV_BOX_ALPHA, len);
obj->flags |= OSDFLAG_BBOX | OSDFLAG_VISIBLE | OSDFLAG_CHANGED;
obj->flags |= OSDFLAG_BBOX | OSDFLAG_CHANGED;
if (obj->bbox.y2 > obj->bbox.y1 && obj->bbox.x2 > obj->bbox.x1)
obj->flags |= OSDFLAG_VISIBLE;
}
#endif
@ -1003,7 +1005,9 @@ int vo_osd_check_range_update(int x1,int y1,int x2,int y2){
while(obj){
if(obj->flags&OSDFLAG_VISIBLE){
if( (obj->bbox.x1<=x2 && obj->bbox.x2>=x1) &&
(obj->bbox.y1<=y2 && obj->bbox.y2>=y1) ) return 1;
(obj->bbox.y1<=y2 && obj->bbox.y2>=y1) &&
obj->bbox.y2 > obj->bbox.y1 && obj->bbox.x1 > obj->bbox.x2
) return 1;
}
obj=obj->next;
}