[f-spot: 11/41] no longer unsafe



commit 2a10df5b7b700068a2236f1fed61971eef5bd691
Author: Stephane Delcroix <stephane delcroix org>
Date:   Mon Jun 8 20:40:25 2009 +0200

    no longer unsafe

 src/Makefile.am          |    2 +-
 src/Widgets/ImageView.cs |    8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 6d9d4aa..acb1395 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -460,7 +460,7 @@ FSpot.JobScheduler.dll: $(JOBSCHEDULER_CSFILES) FSpot.Utils.dll
 
 FSpot.Widgets.dll: $(WIDGETS_CSFILES) FSpot.Utils.dll FSpot.Core.dll
 	@echo -e "\n*** Compiling $@"
-	$(CSC_LIB) -out:$@ -unsafe $(EXTRAFLAGS) $(WIDGETS_CSFILES) $(WIDGETS_ASSEMBLIES)
+	$(CSC_LIB) -out:$@ $(EXTRAFLAGS) $(WIDGETS_CSFILES) $(WIDGETS_ASSEMBLIES)
 
 PLATFORM_CSFILES = $(GNOME_PLATFORM_CSFILES)
 PLATFORM_ASSEMBLIES = $(GNOME_PLATFORM_ASSEMBLIES)
diff --git a/src/Widgets/ImageView.cs b/src/Widgets/ImageView.cs
index fa63a39..a98f077 100644
--- a/src/Widgets/ImageView.cs
+++ b/src/Widgets/ImageView.cs
@@ -220,7 +220,7 @@ namespace FSpot.Widgets
 		{
 		}
 
-		unsafe void PaintRectangle (Rectangle area, InterpType interpolation)
+		void PaintRectangle (Rectangle area, InterpType interpolation)
 		{
 			int scaled_width, scaled_height;
 			if (Pixbuf != null) {
@@ -246,11 +246,9 @@ namespace FSpot.Widgets
 			
 			area.Intersect (new Rectangle (x_offset, y_offset, scaled_width, scaled_height));
 
-			//Short circuit
+			//Short circuit for 1:1 zoom
 //			if (zoom == 1.0 &&
-//			    Pixbuf != null &&
-//			    !Pixbuf.HasAlpha &&
-//			    Pixbuf.BitsPerSample == 8) {
+//			    Pixbuf != null) {
 			if (Pixbuf != null) {
 				BinWindow.DrawPixbuf (Style.BlackGC,
 						      Pixbuf,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]