commit 6fef8ee
Michael Forney
·
2014-02-23 21:51:29 +0000 UTC
parent f3b4691
compositor: Rename view -> compositor_view
1 files changed,
+23,
-21
+23,
-21
1@@ -61,7 +61,7 @@ struct target
2 struct wl_listener screen_listener;
3 };
4
5-struct view
6+struct compositor_view
7 {
8 struct swc_view base;
9 struct wl_listener event_listener;
10@@ -154,7 +154,7 @@ static void handle_screen_view_event(struct wl_listener * listener, void * data)
11 struct screen * screen = CONTAINER_OF
12 (event_data->view, typeof(*screen), planes.framebuffer.view);
13 struct target * target;
14- struct view * view;
15+ struct compositor_view * view;
16
17 if (!(target = target_get(screen)))
18 return;
19@@ -230,7 +230,7 @@ error0:
20
21 /* Rendering {{{ */
22
23-static void repaint_view(struct target * target, struct view * view,
24+static void repaint_view(struct target * target, struct compositor_view * view,
25 pixman_region32_t * damage)
26 {
27 pixman_region32_t view_region, view_damage, border_damage;
28@@ -280,7 +280,7 @@ static void renderer_repaint(struct target * target,
29 pixman_region32_t * base_damage,
30 struct wl_list * views)
31 {
32- struct view * view;
33+ struct compositor_view * view;
34
35 DEBUG("Rendering to target { x: %d, y: %d, w: %u, h: %u }\n",
36 target->view->geometry.x, target->view->geometry.y,
37@@ -306,7 +306,8 @@ static void renderer_repaint(struct target * target,
38 wld_flush(swc.drm->renderer);
39 }
40
41-static bool renderer_attach(struct view * view, struct wld_buffer * client_buffer)
42+static bool renderer_attach(struct compositor_view * view,
43+ struct wld_buffer * client_buffer)
44 {
45 struct wld_buffer * buffer;
46 bool was_proxy = view->buffer != view->base.buffer;
47@@ -359,7 +360,7 @@ static bool renderer_attach(struct view * view, struct wld_buffer * client_buffe
48 return true;
49 }
50
51-static void renderer_flush_view(struct view * view)
52+static void renderer_flush_view(struct compositor_view * view)
53 {
54 if (view->buffer == view->base.buffer)
55 return;
56@@ -378,7 +379,7 @@ static void renderer_flush_view(struct view * view)
57 * Adds damage from the region below a view, taking into account it's clip
58 * region, to the region specified by `damage'.
59 */
60-static void damage_below_view(struct view * view)
61+static void damage_below_view(struct compositor_view * view)
62 {
63 pixman_region32_t damage_below;
64
65@@ -392,13 +393,13 @@ static void damage_below_view(struct view * view)
66 /**
67 * Completely damages the surface and its border.
68 */
69-static void damage_view(struct view * view)
70+static void damage_view(struct compositor_view * view)
71 {
72 damage_below_view(view);
73 view->border.damaged = true;
74 }
75
76-static void update_extents(struct view * view)
77+static void update_extents(struct compositor_view * view)
78 {
79 view->extents.x1 = view->base.geometry.x - view->border.width;
80 view->extents.y1 = view->base.geometry.y - view->border.width;
81@@ -430,7 +431,7 @@ static void schedule_updates(uint32_t screens)
82
83 static bool update(struct swc_view * base)
84 {
85- struct view * view = (void *) base;
86+ struct compositor_view * view = (void *) base;
87
88 if (!compositor.active || !view->visible)
89 return false;
90@@ -442,7 +443,7 @@ static bool update(struct swc_view * base)
91
92 static bool attach(struct swc_view * base, struct wld_buffer * buffer)
93 {
94- struct view * view = (void *) base;
95+ struct compositor_view * view = (void *) base;
96
97 if (!renderer_attach(view, buffer))
98 return false;
99@@ -460,7 +461,7 @@ static bool attach(struct swc_view * base, struct wld_buffer * buffer)
100
101 static bool move(struct swc_view * base, int32_t x, int32_t y)
102 {
103- struct view * view = (void *) base;
104+ struct compositor_view * view = (void *) base;
105
106 if (view->visible)
107 {
108@@ -481,7 +482,8 @@ const static struct swc_view_impl view_impl = {
109
110 static void handle_view_event(struct wl_listener * listener, void * data)
111 {
112- struct view * view = CONTAINER_OF(listener, typeof(*view), event_listener);
113+ struct compositor_view * view
114+ = CONTAINER_OF(listener, typeof(*view), event_listener);
115 struct swc_event * event = data;
116
117 switch (event->type)
118@@ -515,7 +517,7 @@ static void handle_view_event(struct wl_listener * listener, void * data)
119
120 struct swc_view * swc_compositor_create_view(struct swc_surface * surface)
121 {
122- struct view * view;
123+ struct compositor_view * view;
124
125 view = malloc(sizeof *view);
126
127@@ -543,7 +545,7 @@ struct swc_view * swc_compositor_create_view(struct swc_surface * surface)
128
129 void compositor_view_destroy(struct swc_view * base)
130 {
131- struct view * view = (void *) base;
132+ struct compositor_view * view = (void *) base;
133
134 assert(view->base.impl == &view_impl);
135
136@@ -556,7 +558,7 @@ void compositor_view_destroy(struct swc_view * base)
137
138 void compositor_view_show(struct swc_view * base)
139 {
140- struct view * view = (void *) base;
141+ struct compositor_view * view = (void *) base;
142
143 assert(view->base.impl == &view_impl);
144
145@@ -577,7 +579,7 @@ void compositor_view_show(struct swc_view * base)
146
147 void compositor_view_hide(struct swc_view * base)
148 {
149- struct view * view = (void *) base;
150+ struct compositor_view * view = (void *) base;
151
152 assert(view->base.impl == &view_impl);
153
154@@ -595,7 +597,7 @@ void compositor_view_hide(struct swc_view * base)
155
156 void compositor_view_set_border_width(struct swc_view * base, uint32_t width)
157 {
158- struct view * view = (void *) base;
159+ struct compositor_view * view = (void *) base;
160
161 assert(view->base.impl == &view_impl);
162
163@@ -613,7 +615,7 @@ void compositor_view_set_border_width(struct swc_view * base, uint32_t width)
164
165 void compositor_view_set_border_color(struct swc_view * base, uint32_t color)
166 {
167- struct view * view = (void *) base;
168+ struct compositor_view * view = (void *) base;
169
170 assert(view->base.impl == &view_impl);
171
172@@ -632,7 +634,7 @@ void compositor_view_set_border_color(struct swc_view * base, uint32_t color)
173
174 static void calculate_damage()
175 {
176- struct view * view;
177+ struct compositor_view * view;
178 pixman_region32_t surface_opaque, * surface_damage;
179
180 pixman_region32_clear(&compositor.opaque);
181@@ -759,7 +761,7 @@ static void perform_update(void * data)
182 bool handle_motion(struct pointer_handler * handler, uint32_t time,
183 wl_fixed_t fx, wl_fixed_t fy)
184 {
185- struct view * view;
186+ struct compositor_view * view;
187 struct swc_surface * surface = NULL;
188 int32_t x, y;
189