summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/entry.c7
-rw-r--r--src/image.h1
-rw-r--r--src/main.c5
-rw-r--r--src/surface.c3
-rw-r--r--src/surface.h3
5 files changed, 6 insertions, 13 deletions
diff --git a/src/entry.c b/src/entry.c
index 464c225..6b7c9e7 100644
--- a/src/entry.c
+++ b/src/entry.c
@@ -88,11 +88,10 @@ void entry_init(struct entry *entry, uint32_t width, uint32_t height, uint32_t s
entry->cairo.surface = surface;
entry->cairo.cr = cr;
+ entry->image.buffer = cairo_image_surface_get_data(surface);
/* Setup the backend. */
entry_backend_init(entry, width, height, scale);
-
- entry->image.buffer = cairo_image_surface_get_data(surface);
}
void entry_destroy(struct entry *entry)
@@ -104,11 +103,10 @@ void entry_destroy(struct entry *entry)
void entry_update(struct entry *entry)
{
+ log_debug("Start rendering entry.\n");
cairo_t *cr = entry->cairo.cr;
cairo_save(cr);
- entry->image.redraw = true;
-
/* Clear the image. */
struct color color = entry->background_color;
cairo_set_source_rgba(cr, color.r, color.g, color.b, color.a);
@@ -121,6 +119,7 @@ void entry_update(struct entry *entry)
entry_backend_update(entry);
cairo_restore(cr);
+ log_debug("Finish rendering entry.\n");
}
void entry_set_scale(struct entry *entry, uint32_t scale)
diff --git a/src/image.h b/src/image.h
index a366e59..81cb66a 100644
--- a/src/image.h
+++ b/src/image.h
@@ -9,7 +9,6 @@ struct image {
uint32_t width;
uint32_t height;
uint32_t scale;
- bool redraw;
struct {
uint32_t x;
uint32_t y;
diff --git a/src/main.c b/src/main.c
index 3bfb5a7..39da872 100644
--- a/src/main.c
+++ b/src/main.c
@@ -809,10 +809,7 @@ int main(int argc, char *argv[])
*/
log_debug("Initialising main window surface.\n");
- surface_initialise(
- &tofi.window.surface,
- tofi.wl_shm,
- &tofi.window.entry.image);
+ surface_initialise(&tofi.window.surface, tofi.wl_shm);
surface_draw(
&tofi.window.surface,
&tofi.window.entry.background_color,
diff --git a/src/surface.c b/src/surface.c
index 90e7bb0..d02fd4f 100644
--- a/src/surface.c
+++ b/src/surface.c
@@ -10,8 +10,7 @@
void surface_initialise(
struct surface *surface,
- struct wl_shm *wl_shm,
- struct image *texture)
+ struct wl_shm *wl_shm)
{
const int height = surface->height;
diff --git a/src/surface.h b/src/surface.h
index 8abd1e1..6016551 100644
--- a/src/surface.h
+++ b/src/surface.h
@@ -24,8 +24,7 @@ struct surface {
void surface_initialise(
struct surface *surface,
- struct wl_shm *wl_shm,
- struct image *texture);
+ struct wl_shm *wl_shm);
void surface_destroy(struct surface *surface);
void surface_draw(
struct surface *surface,