Renamed search to render

This commit is contained in:
Moritz Lipp 2011-01-24 20:10:06 +08:00
parent 93e2edf4c9
commit 056269fcae
3 changed files with 6 additions and 6 deletions

View File

@ -64,7 +64,7 @@ cb_view_vadjustment_value_changed(GtkAdjustment *adjustment, gpointer data)
|| ( (begin <= lower) && (end >= lower) && (end <= upper) ) /* end of the page is in viewport */
|| ( (begin >= lower) && (end >= upper) && (begin <= upper) ) /* begin of the page is in viewport */
) {
render_page(Zathura.Sync.render_thread, Zathura.document->pages[page_id]);
render_page(Zathura.Sync.render_thread, Zathura.document->pages[page_id]);
}
}
}

View File

@ -1,11 +1,11 @@
#include "render.h"
#include "zathura.h"
void* search(void* data);
void* render_job(void* data);
bool render(zathura_page_t* page);
void*
search(void* data)
render_job(void* data)
{
render_thread_t* render_thread = (render_thread_t*) data;
@ -45,7 +45,7 @@ render_init(void)
goto error_free;
}
render_thread->thread = g_thread_create(search, render_thread, TRUE, NULL);
render_thread->thread = g_thread_create(render_job, render_thread, TRUE, NULL);
if(!render_thread->thread) {
goto error_free;
@ -78,7 +78,7 @@ render_free(render_thread_t* render_thread)
bool
render_page(render_thread_t* render_thread, zathura_page_t* page)
{
if(!render_thread || !page || !render_thread->list) {
if(!render_thread || !page || !render_thread->list || page->rendered) {
return false;
}

View File

@ -157,7 +157,7 @@ page_blank(unsigned int width, unsigned int height)
gtk_image_set_from_pixbuf(GTK_IMAGE(image), pixbuf);
gtk_widget_show(image);
free(buffer);
/*free(buffer);*/
g_object_unref(pixbuf);
return image;