Commit 056269fc authored by Moritz Lipp's avatar Moritz Lipp
Browse files

Renamed search to render

parent 93e2edf4
...@@ -64,7 +64,7 @@ cb_view_vadjustment_value_changed(GtkAdjustment *adjustment, gpointer data) ...@@ -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 >= lower) && (end <= upper) ) /* end of the page is in viewport */
|| ( (begin >= lower) && (end >= upper) && (begin <= upper) ) /* begin 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]);
} }
} }
} }
#include "render.h" #include "render.h"
#include "zathura.h" #include "zathura.h"
void* search(void* data); void* render_job(void* data);
bool render(zathura_page_t* page); bool render(zathura_page_t* page);
void* void*
search(void* data) render_job(void* data)
{ {
render_thread_t* render_thread = (render_thread_t*) data; render_thread_t* render_thread = (render_thread_t*) data;
...@@ -45,7 +45,7 @@ render_init(void) ...@@ -45,7 +45,7 @@ render_init(void)
goto error_free; 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) { if(!render_thread->thread) {
goto error_free; goto error_free;
...@@ -78,7 +78,7 @@ render_free(render_thread_t* render_thread) ...@@ -78,7 +78,7 @@ render_free(render_thread_t* render_thread)
bool bool
render_page(render_thread_t* render_thread, zathura_page_t* page) 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; return false;
} }
......
...@@ -157,7 +157,7 @@ page_blank(unsigned int width, unsigned int height) ...@@ -157,7 +157,7 @@ page_blank(unsigned int width, unsigned int height)
gtk_image_set_from_pixbuf(GTK_IMAGE(image), pixbuf); gtk_image_set_from_pixbuf(GTK_IMAGE(image), pixbuf);
gtk_widget_show(image); gtk_widget_show(image);
free(buffer); /*free(buffer);*/
g_object_unref(pixbuf); g_object_unref(pixbuf);
return image; return image;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment