aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/allocator/allocator.c1
-rw-r--r--render/wlr_renderer.c2
-rw-r--r--render/wlr_texture.c2
3 files changed, 5 insertions, 0 deletions
diff --git a/render/allocator/allocator.c b/render/allocator/allocator.c
index 2c75421f..83e836ae 100644
--- a/render/allocator/allocator.c
+++ b/render/allocator/allocator.c
@@ -18,6 +18,7 @@
void wlr_allocator_init(struct wlr_allocator *alloc,
const struct wlr_allocator_interface *impl, uint32_t buffer_caps) {
assert(impl && impl->destroy && impl->create_buffer);
+ memset(alloc, 0, sizeof(*alloc));
alloc->impl = impl;
alloc->buffer_caps = buffer_caps;
wl_signal_init(&alloc->events.destroy);
diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c
index 2b5cf994..478db745 100644
--- a/render/wlr_renderer.c
+++ b/render/wlr_renderer.c
@@ -39,6 +39,8 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
assert(impl->render_quad_with_matrix);
assert(impl->get_shm_texture_formats);
assert(impl->get_render_buffer_caps);
+
+ memset(renderer, 0, sizeof(*renderer));
renderer->impl = impl;
wl_signal_init(&renderer->events.destroy);
diff --git a/render/wlr_texture.c b/render/wlr_texture.c
index 2cdf08c5..36cbf136 100644
--- a/render/wlr_texture.c
+++ b/render/wlr_texture.c
@@ -1,12 +1,14 @@
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
+#include <string.h>
#include <wlr/render/interface.h>
#include <wlr/render/wlr_texture.h>
#include "types/wlr_buffer.h"
void wlr_texture_init(struct wlr_texture *texture,
const struct wlr_texture_impl *impl, uint32_t width, uint32_t height) {
+ memset(texture, 0, sizeof(*texture));
texture->impl = impl;
texture->width = width;
texture->height = height;