[Rawstudio-commit] r1653 - trunk/src

Anders Brander anders at brander.dk
Sun Mar 9 16:25:50 CET 2008


Author: abrander
Date: 2008-03-09 16:25:49 +0100 (Sun, 09 Mar 2008)
New Revision: 1653

Modified:
   trunk/src/rs-preview-widget.c
Log:
Now displays image before queueing demosaic in rs_preview_widget_set_photo().

Modified: trunk/src/rs-preview-widget.c
===================================================================
--- trunk/src/rs-preview-widget.c	2008-03-08 09:31:24 UTC (rev 1652)
+++ trunk/src/rs-preview-widget.c	2008-03-09 15:25:49 UTC (rev 1653)
@@ -543,8 +543,6 @@
 	RS_IMAGE16 *image = (RS_IMAGE16 *) data;
 	RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data);
 
-	g_usleep(100000); /* Wait a second before starting! */
-
 	/* Check if this is still relevant */
 	if ((preview->photo && (image == preview->photo->input)) && (image->filters != 0) && (image->fourColorFilters != 0))
 		rs_image16_demosaic(image, RS_DEMOSAIC_PPG);
@@ -565,25 +563,28 @@
 	g_return_if_fail (RS_IS_PREVIEW_WIDGET(preview));
 
 	preview->photo = photo;
+	DIRTY(preview->dirty, SCALE);
+
+	if (preview->photo)
+	{
+		g_signal_connect(G_OBJECT(preview->photo), "settings-changed", G_CALLBACK(settings_changed), preview);
+		g_signal_connect(G_OBJECT(preview->photo), "spatial-changed", G_CALLBACK(spatial_changed), preview);
+	}
+
 	if (preview->photo && preview->photo->input->filters && preview->photo->input->fourColorFilters)
 	{
 		photo->input->preview = TRUE;
+		rs_preview_widget_update(preview);
+		GUI_CATCHUP();
 		rs_image16_ref(photo->input); /* The thread will unref */
-		g_thread_pool_push(pool, photo->input, NULL);
 
 		/* Start demosaic */
+		g_thread_pool_push(pool, photo->input, NULL);
 
 		g_signal_connect(G_OBJECT(photo->input), "pixeldata-changed", G_CALLBACK(input_changed), preview);
 	}
-	DIRTY(preview->dirty, SCALE);
-
-	if (preview->photo)
-	{
-		g_signal_connect(G_OBJECT(preview->photo), "settings-changed", G_CALLBACK(settings_changed), preview);
-		g_signal_connect(G_OBJECT(preview->photo), "spatial-changed", G_CALLBACK(spatial_changed), preview);
-	}
-
-	rs_preview_widget_update(preview);
+	else
+		rs_preview_widget_update(preview);
 }
 
 /**




More information about the Rawstudio-commit mailing list