mirror of
https://github.com/mpv-player/mpv
synced 2025-01-20 21:07:29 +01:00
some bug fix, and sub window render speed up.. 10l kola ? :)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2026 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
14768c4b7a
commit
8fde780d46
@ -12,6 +12,9 @@ INCDIR = -I. -I./event -I./wm -I./skin $(GTKINC)
|
||||
|
||||
OPTIMIZE = $(OPTFLAGS) -fomit-frame-pointer \
|
||||
-fexpensive-optimizations -fschedule-insns2 -Wall
|
||||
ifeq ($(TARGET_ARCH_X86),yes)
|
||||
OPTIMIZE += -malign-double
|
||||
endif
|
||||
|
||||
CFLAGS = $(OPTIMIZE) $(INCDIR) $(DEBUG)
|
||||
|
||||
|
@ -11,6 +11,9 @@ INCDIR = -I. -I../event -I../wm -I../skin $(GTKINC)
|
||||
|
||||
OPTIMIZE = $(OPTFLAGS) -fomit-frame-pointer \
|
||||
-fexpensive-optimizations -fschedule-insns2 -Wall
|
||||
ifeq ($(TARGET_ARCH_X86),yes)
|
||||
OPTIMIZE += -malign-double
|
||||
endif
|
||||
|
||||
CFLAGS = $(OPTIMIZE) $(INCDIR) $(DEBUG)
|
||||
|
||||
|
@ -104,6 +104,8 @@ void mplInit( int argc,char* argv[], char *envp[], void* disp )
|
||||
appMPlayer.subWindow.KeyHandler=mplMainKeyHandle;
|
||||
appMPlayer.subWindow.ReSize=mplResize;
|
||||
|
||||
if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
|
||||
|
||||
wsPostRedisplay( &appMPlayer.mainWindow );
|
||||
wsPostRedisplay( &appMPlayer.subWindow );
|
||||
|
||||
|
@ -53,8 +53,8 @@ void mplStop()
|
||||
// if ( !mplShMem->Playing ) return;
|
||||
if ( !appMPlayer.subWindow.isFullScreen )
|
||||
{
|
||||
wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
|
||||
wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
|
||||
wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
|
||||
}
|
||||
mplSubRender=1;
|
||||
wsClearWindow( appMPlayer.subWindow );
|
||||
@ -174,6 +174,7 @@ void ChangeSkin( void )
|
||||
}
|
||||
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
||||
wsClearWindow( appMPlayer.subWindow );
|
||||
if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
|
||||
mplSubRender=1; wsPostRedisplay( &appMPlayer.subWindow );
|
||||
}
|
||||
|
||||
@ -203,5 +204,8 @@ void EventHandling( void )
|
||||
void mplResizeToMovieSize( unsigned int width,unsigned int height )
|
||||
{
|
||||
if ( !appMPlayer.subWindow.isFullScreen )
|
||||
{
|
||||
wsResizeWindow( &appMPlayer.subWindow,width,height );
|
||||
wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
|
||||
}
|
||||
}
|
||||
|
@ -21,13 +21,13 @@ void mplSubDraw( wsParamDisplay )
|
||||
|
||||
if ( mplSubRender )
|
||||
{
|
||||
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
||||
// wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
||||
if ( appMPlayer.sub.Bitmap.Image )
|
||||
{
|
||||
wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
|
||||
// wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
|
||||
wsPutImage( &appMPlayer.subWindow );
|
||||
}
|
||||
XFlush( wsDisplay );
|
||||
// XFlush( wsDisplay );
|
||||
}
|
||||
appMPlayer.subWindow.State=0;
|
||||
}
|
||||
|
@ -162,15 +162,15 @@ int __base( char * in )
|
||||
}
|
||||
if ( !strcmp( winList,"sub" ) )
|
||||
{
|
||||
defList->sub.x=x;
|
||||
defList->sub.y=y;
|
||||
defList->sub.type=itBase;
|
||||
strcpy( tmp,path ); strcat( tmp,fname );
|
||||
if ( skinBPRead( tmp,&defList->sub.Bitmap ) ) return 1;
|
||||
defList->sub.x=x;
|
||||
defList->sub.y=y;
|
||||
defList->sub.width=defList->sub.Bitmap.Width;
|
||||
defList->sub.height=defList->sub.Bitmap.Height;
|
||||
#ifdef DEBUG
|
||||
dbprintf( 3,"[skin] width: %d height: %d\n",defList->sub.width,defList->sub.height );
|
||||
dbprintf( 3,"[skin] %d,%d %dx%d\n",defList->sub.x,defList->sub.y,defList->sub.width,defList->sub.height );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user