[Mplayer-cvslog] CVS: main/libvo vo_quartz.c,1.5,1.6

Nicolas Plourde CVS syncmail at mplayerhq.hu
Wed May 5 04:38:38 CEST 2004


CVS change done by Nicolas Plourde CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv19320/libvo

Modified Files:
	vo_quartz.c 
Log Message:
Disable live resize for yuv - HW accel bug

Index: vo_quartz.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_quartz.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vo_quartz.c	5 May 2004 01:04:44 -0000	1.5
+++ vo_quartz.c	5 May 2004 02:38:35 -0000	1.6
@@ -334,6 +334,11 @@
 	windowAttrs =   kWindowStandardDocumentAttributes
 					| kWindowStandardHandlerAttribute
 					| kWindowLiveResizeAttribute;
+					
+	if (!(IMGFMT_IS_RGB(image_format)))
+	{
+		windowAttrs &= (~kWindowResizableAttribute);
+	}
 
 	SetRect(&winRect, 0, 0, d_width, d_height);
 	SetRect(&dstRect, 0, 0, d_width, d_height);
@@ -900,10 +905,10 @@
 	CreateCGContextForPort(GetWindowPort(theWindow),&context);
 
 	//fill background with black
-	//CGRect winBounds = CGRectMake( winRect.top, winRect.left, winRect.right, winRect.bottom);
-	//CGContextSetRGBFillColor(context, 0.0, 0.0, 0.0, 1.0);
-	//CGContextFillRect(context, winBounds);
-	//CGContextFlush(context);
+	CGRect winBounds = CGRectMake( winRect.top, winRect.left, winRect.right, winRect.bottom);
+	CGContextSetRGBFillColor(context, 0.0, 0.0, 0.0, 1.0);
+	CGContextFillRect(context, winBounds);
+	CGContextFlush(context);
 
 #ifdef QUARTZ_ENABLE_YUV
 	switch (image_format)
@@ -977,7 +982,9 @@
 		HideCursor();
 		
 		//go fullscreen
-		ChangeWindowAttributes(theWindow, 0, kWindowResizableAttribute);
+		if (IMGFMT_IS_RGB(image_format))
+			ChangeWindowAttributes(theWindow, 0, kWindowResizableAttribute);
+			
 		MoveWindow (theWindow, 0, 0, 1);		
 		SizeWindow(theWindow, device_width, device_height,1);
 
@@ -999,7 +1006,9 @@
 		ShowCursor();
 		
 		//revert window to previous setting
-		ChangeWindowAttributes(theWindow, kWindowResizableAttribute, 0);
+		if (IMGFMT_IS_RGB(image_format))
+			ChangeWindowAttributes(theWindow, kWindowResizableAttribute, 0);
+			
 		SizeWindow(theWindow, oldRect.right, oldRect.bottom,1);
 		RepositionWindow(theWindow, NULL, kWindowCascadeOnMainScreen);
 		




More information about the MPlayer-cvslog mailing list