changeset 12425:049136c501b2

Disable live resize for yuv - HW accel bug
author nplourde
date Wed, 05 May 2004 02:38:35 +0000
parents 09f8724dd0b0
children 01331483dbf4
files libvo/vo_quartz.c
diffstat 1 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_quartz.c	Wed May 05 01:04:44 2004 +0000
+++ b/libvo/vo_quartz.c	Wed May 05 02:38:35 2004 +0000
@@ -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);