Re: Patch for 78542 - change thumbnails to use a thread
- From: Alex Larsson <alexl redhat com>
- To: Damon Chaplin <damon ximian com>
- Cc: nautilus-list gnome org
- Subject: Re: Patch for 78542 - change thumbnails to use a thread
- Date: Wed, 22 May 2002 22:48:38 -0400 (EDT)
On 22 May 2002, Damon Chaplin wrote:
> I've updated the patch on the bug.
>
> http://bugzilla.gnome.org/show_bug.cgi?id=78542
I applied the patch and read the resulting file, so some of this may
not be your code really:
get_file_mtime() will return INVALID_MTIME for files on nfs (they are
!is_local). This may not be what you expected, although in the common case
we already have the mtime of the image.
The debug spew about the lock is at the wrong place, may be confusing:
pthread_mutex_lock (&thumbnails_mutex);
/*********************************
* MUTEX LOCKED
*********************************/
/* Check if it is already in the list of thumbnails to make. */
if (g_list_find_custom ((GList*) thumbnails_to_make, info,
compare_thumbnail_info) == NULL) {
#ifdef DEBUG_THUMBNAILS
g_message ("(Main Thread) Locking mutex\n");
#endif
This code will probably give a warning if the timeout happened:
/* Remove our timeout, if it still exists. */
g_source_remove (timeout_id);
This code may render the svg at a really high resolution:
if (eel_strcasecmp (info->mime_type, "image/svg") == 0) {
char *image_path = gnome_vfs_get_local_path_from_uri (info->image_uri);
if (image_path != NULL) {
full_size_image = rsvg_pixbuf_from_file (image_path,
NULL);
g_free (image_path);
}
Better use:
rsvg_pixbuf_from_file_at_size (image_path, 96, 96, NULL);
Otherwise it looks a lot better than the old code. Please commit.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a genetically engineered sweet-toothed farmboy from the 'hood. She's a
radical junkie vampire who hides her beauty behind a pair of thick-framed
spectacles. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]