Fix indentation all through the project
Fixes a “regression” from 04918f3b0b, but
also other missed pieces.
This commit is contained in:
committed by
Link Mauve
parent
48cd15ed44
commit
eff793ab46
@@ -458,15 +458,15 @@ move_frame(struct weston_view_animation *animation)
|
||||
progress = 1.0 - progress;
|
||||
|
||||
scale = animation->start +
|
||||
(animation->stop - animation->start) *
|
||||
progress;
|
||||
(animation->stop - animation->start) *
|
||||
progress;
|
||||
weston_matrix_init(&animation->transform.matrix);
|
||||
if (move->scale)
|
||||
weston_matrix_scale(&animation->transform.matrix, scale, scale,
|
||||
1.0f);
|
||||
weston_matrix_translate(&animation->transform.matrix,
|
||||
move->dx * progress, move->dy * progress,
|
||||
0);
|
||||
move->dx * progress, move->dy * progress,
|
||||
0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -62,8 +62,8 @@ drm_virtual_crtc_create(struct drm_backend *b, struct drm_output *output)
|
||||
crtc->pipe = 0;
|
||||
|
||||
/* Poisoning the pointers as CRTC's of virtual outputs should not be
|
||||
* added to the DRM-backend CRTC list. With this we can assure (in
|
||||
* function drm_virtual_crtc_destroy()) that this did not happen. */
|
||||
* added to the DRM-backend CRTC list. With this we can assure (in
|
||||
* function drm_virtual_crtc_destroy()) that this did not happen. */
|
||||
crtc->link.prev = POISON_PTR;
|
||||
crtc->link.next = POISON_PTR;
|
||||
|
||||
|
||||
@@ -238,13 +238,13 @@ drm_fb_get_from_dmabuf(struct linux_dmabuf_buffer *dmabuf,
|
||||
.modifier = dmabuf->attributes.modifier[0],
|
||||
};
|
||||
|
||||
/* We should not import to KMS a buffer that has been allocated using no
|
||||
* modifiers. Usually drivers use linear layouts to allocate with no
|
||||
* modifiers, but this is not a rule. The driver could use, for
|
||||
* instance, a tiling layout under the hood - and both Weston and the
|
||||
* KMS driver can't know. So giving the buffer to KMS is not safe, as
|
||||
* not knowing its layout can result in garbage being displayed. In
|
||||
* short, importing a buffer to KMS requires explicit modifiers. */
|
||||
/* We should not import to KMS a buffer that has been allocated using no
|
||||
* modifiers. Usually drivers use linear layouts to allocate with no
|
||||
* modifiers, but this is not a rule. The driver could use, for
|
||||
* instance, a tiling layout under the hood - and both Weston and the
|
||||
* KMS driver can't know. So giving the buffer to KMS is not safe, as
|
||||
* not knowing its layout can result in garbage being displayed. In
|
||||
* short, importing a buffer to KMS requires explicit modifiers. */
|
||||
if (dmabuf->attributes.modifier[0] == DRM_FORMAT_MOD_INVALID)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ drm_output_destroy_zpos_plane(struct drm_plane_zpos *plane_zpos)
|
||||
|
||||
static bool
|
||||
drm_output_check_plane_has_view_assigned(struct drm_plane *plane,
|
||||
struct drm_output_state *output_state)
|
||||
struct drm_output_state *output_state)
|
||||
{
|
||||
struct drm_plane_state *ps;
|
||||
wl_list_for_each(ps, &output_state->plane_list, link) {
|
||||
@@ -140,12 +140,12 @@ drm_output_plane_has_valid_format(struct drm_plane *plane,
|
||||
fb->format->format);
|
||||
if (fmt) {
|
||||
/* We never try to promote a dmabuf with DRM_FORMAT_MOD_INVALID
|
||||
* to a KMS plane (see drm_fb_get_from_dmabuf() for more details).
|
||||
* So if fb->modifier == DRM_FORMAT_MOD_INVALID, we are sure
|
||||
* that this is for the legacy GBM import path, in which a
|
||||
* wl_drm is being used for scanout. Mesa is the only user we
|
||||
* care in this case (even though recent versions are also using
|
||||
* dmabufs), and it should know better what works or not. */
|
||||
* to a KMS plane (see drm_fb_get_from_dmabuf() for more details).
|
||||
* So if fb->modifier == DRM_FORMAT_MOD_INVALID, we are sure
|
||||
* that this is for the legacy GBM import path, in which a
|
||||
* wl_drm is being used for scanout. Mesa is the only user we
|
||||
* care in this case (even though recent versions are also using
|
||||
* dmabufs), and it should know better what works or not. */
|
||||
if (fb->modifier == DRM_FORMAT_MOD_INVALID)
|
||||
return true;
|
||||
|
||||
|
||||
@@ -2212,8 +2212,8 @@ input_handle_touch_up(void *data, struct wl_touch *wl_touch,
|
||||
|
||||
static void
|
||||
input_handle_touch_motion(void *data, struct wl_touch *wl_touch,
|
||||
uint32_t time, int32_t id,
|
||||
wl_fixed_t fixed_x, wl_fixed_t fixed_y)
|
||||
uint32_t time, int32_t id,
|
||||
wl_fixed_t fixed_x, wl_fixed_t fixed_y)
|
||||
{
|
||||
struct wayland_input *input = data;
|
||||
struct wayland_output *output = input->touch_focus;
|
||||
|
||||
@@ -807,14 +807,14 @@ x11_output_switch_mode(struct weston_output *base, struct weston_mode *mode)
|
||||
static uint32_t values[2];
|
||||
int ret;
|
||||
|
||||
b = to_x11_backend(base->compositor);
|
||||
output = to_x11_output(base);
|
||||
b = to_x11_backend(base->compositor);
|
||||
output = to_x11_output(base);
|
||||
|
||||
if (mode->width == output->mode.width &&
|
||||
if (mode->width == output->mode.width &&
|
||||
mode->height == output->mode.height)
|
||||
return 0;
|
||||
return 0;
|
||||
|
||||
if (mode->width < WINDOW_MIN_WIDTH || mode->width > WINDOW_MAX_WIDTH)
|
||||
if (mode->width < WINDOW_MIN_WIDTH || mode->width > WINDOW_MAX_WIDTH)
|
||||
return -1;
|
||||
|
||||
if (mode->height < WINDOW_MIN_HEIGHT || mode->height > WINDOW_MAX_HEIGHT)
|
||||
|
||||
@@ -4927,9 +4927,9 @@ static void
|
||||
weston_compositor_dpms(struct weston_compositor *compositor,
|
||||
enum dpms_enum state)
|
||||
{
|
||||
struct weston_output *output;
|
||||
struct weston_output *output;
|
||||
|
||||
wl_list_for_each(output, &compositor->output_list, link)
|
||||
wl_list_for_each(output, &compositor->output_list, link)
|
||||
if (output->set_dpms)
|
||||
output->set_dpms(output, state);
|
||||
}
|
||||
|
||||
+8
-8
@@ -523,8 +523,8 @@ pointer_send_motion(struct weston_pointer *pointer,
|
||||
msecs = timespec_to_msec(time);
|
||||
wl_resource_for_each(resource, resource_list) {
|
||||
send_timestamps_for_input_resource(resource,
|
||||
&pointer->timestamps_list,
|
||||
time);
|
||||
&pointer->timestamps_list,
|
||||
time);
|
||||
wl_pointer_send_motion(resource, msecs, sx, sy);
|
||||
}
|
||||
}
|
||||
@@ -609,8 +609,8 @@ weston_pointer_send_button(struct weston_pointer *pointer,
|
||||
msecs = timespec_to_msec(time);
|
||||
wl_resource_for_each(resource, resource_list) {
|
||||
send_timestamps_for_input_resource(resource,
|
||||
&pointer->timestamps_list,
|
||||
time);
|
||||
&pointer->timestamps_list,
|
||||
time);
|
||||
wl_pointer_send_button(resource, serial, msecs, button, state);
|
||||
}
|
||||
}
|
||||
@@ -1965,7 +1965,7 @@ weston_keyboard_set_locks(struct weston_keyboard *keyboard,
|
||||
mods_locked = xkb_state_serialize_mods(keyboard->xkb_state.state,
|
||||
XKB_STATE_LOCKED);
|
||||
group = xkb_state_serialize_group(keyboard->xkb_state.state,
|
||||
XKB_STATE_EFFECTIVE);
|
||||
XKB_STATE_EFFECTIVE);
|
||||
|
||||
num = (1 << keyboard->xkb_info->mod2_mod);
|
||||
caps = (1 << keyboard->xkb_info->caps_mod);
|
||||
@@ -2783,7 +2783,7 @@ seat_get_pointer(struct wl_client *client, struct wl_resource *resource,
|
||||
struct wl_resource *cr;
|
||||
struct weston_pointer_client *pointer_client;
|
||||
|
||||
cr = wl_resource_create(client, &wl_pointer_interface,
|
||||
cr = wl_resource_create(client, &wl_pointer_interface,
|
||||
wl_resource_get_version(resource), id);
|
||||
if (cr == NULL) {
|
||||
wl_client_post_no_memory(client);
|
||||
@@ -2864,7 +2864,7 @@ seat_get_keyboard(struct wl_client *client, struct wl_resource *resource,
|
||||
struct weston_keyboard *keyboard = seat ? seat->keyboard_state : NULL;
|
||||
struct wl_resource *cr;
|
||||
|
||||
cr = wl_resource_create(client, &wl_keyboard_interface,
|
||||
cr = wl_resource_create(client, &wl_keyboard_interface,
|
||||
wl_resource_get_version(resource), id);
|
||||
if (cr == NULL) {
|
||||
wl_client_post_no_memory(client);
|
||||
@@ -2957,7 +2957,7 @@ seat_get_touch(struct wl_client *client, struct wl_resource *resource,
|
||||
struct weston_touch *touch = seat ? seat->touch_state : NULL;
|
||||
struct wl_resource *cr;
|
||||
|
||||
cr = wl_resource_create(client, &wl_touch_interface,
|
||||
cr = wl_resource_create(client, &wl_touch_interface,
|
||||
wl_resource_get_version(resource), id);
|
||||
if (cr == NULL) {
|
||||
wl_client_post_no_memory(client);
|
||||
|
||||
@@ -192,8 +192,8 @@ handle_pointer_button(struct libinput_device *libinput_device,
|
||||
libinput_event_pointer_get_time_usec(pointer_event));
|
||||
|
||||
notify_button(device->seat, &time,
|
||||
libinput_event_pointer_get_button(pointer_event),
|
||||
button_state);
|
||||
libinput_event_pointer_get_button(pointer_event),
|
||||
button_state);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
-2
@@ -71,8 +71,8 @@ static log_func_t log_continue_handler = default_log_handler;
|
||||
static int
|
||||
default_log_handler(const char *fmt, va_list ap)
|
||||
{
|
||||
fprintf(stderr, "weston_log_set_handler() must be called before using of weston_log().\n");
|
||||
abort();
|
||||
fprintf(stderr, "weston_log_set_handler() must be called before using of weston_log().\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
/** Install the log handler
|
||||
|
||||
@@ -669,7 +669,7 @@ pixman_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
|
||||
wl_shm_buffer_get_format(shm_buffer));
|
||||
weston_buffer_reference(&ps->buffer_ref, NULL);
|
||||
weston_buffer_release_reference(&ps->buffer_release_ref, NULL);
|
||||
weston_buffer_send_server_error(buffer,
|
||||
weston_buffer_send_server_error(buffer,
|
||||
"disconnecting due to unhandled buffer type");
|
||||
return;
|
||||
break;
|
||||
|
||||
@@ -593,7 +593,7 @@ texture_region(struct weston_view *ev,
|
||||
vtxcnt = wl_array_add(&gr->vtxcnt, nrects * nsurf * sizeof *vtxcnt);
|
||||
|
||||
inv_width = 1.0 / gs->pitch;
|
||||
inv_height = 1.0 / gs->height;
|
||||
inv_height = 1.0 / gs->height;
|
||||
|
||||
for (i = 0; i < nrects; i++) {
|
||||
pixman_box32_t *rect = &rects[i];
|
||||
@@ -2960,7 +2960,7 @@ gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
|
||||
gs->buffer_type = BUFFER_TYPE_NULL;
|
||||
gs->y_inverted = true;
|
||||
es->is_opaque = false;
|
||||
weston_buffer_send_server_error(buffer,
|
||||
weston_buffer_send_server_error(buffer,
|
||||
"disconnecting due to unhandled buffer type");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ struct weston_log_debug_wayland {
|
||||
static struct weston_log_debug_wayland *
|
||||
to_weston_log_debug_wayland(struct weston_log_subscriber *sub)
|
||||
{
|
||||
return container_of(sub, struct weston_log_debug_wayland, base);
|
||||
return container_of(sub, struct weston_log_debug_wayland, base);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user