Commit b00c79b5 authored by Pekka Paalanen's avatar Pekka Paalanen

protocol: migrate to stable presentation-time.xml

Remove the unstable presentation_timing.xml file, and use
presentation-time.xml from wayland-protocols instead to generate all the
Presentation extension bindings.

The following renames are done according to the XML changes:
- generated header includes
- enum constants and macros prefixed with WP_
- interface symbol names prefixed with wp_
- protocol API calls prefixed with wp_

Clients use wp_presentation_interface.name rather than hardcoding the
global interface name: presentation-shm, weston-info, presentation-test.
Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: default avatarBryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl's avatarJonas Ådahl <jadahl@gmail.com>
[Pekka: updated wayland-protocols dependency to 1.2]
parent 16d1fa15
......@@ -121,8 +121,8 @@ nodist_weston_SOURCES = \
protocol/text-input-unstable-v1-server-protocol.h \
protocol/input-method-unstable-v1-protocol.c \
protocol/input-method-unstable-v1-server-protocol.h \
protocol/presentation_timing-protocol.c \
protocol/presentation_timing-server-protocol.h \
protocol/presentation-time-protocol.c \
protocol/presentation-time-server-protocol.h \
protocol/scaler-protocol.c \
protocol/scaler-server-protocol.h \
protocol/linux-dmabuf-unstable-v1-protocol.c \
......@@ -501,8 +501,8 @@ weston_presentation_shm_SOURCES = \
clients/presentation-shm.c \
shared/helpers.h
nodist_weston_presentation_shm_SOURCES = \
protocol/presentation_timing-protocol.c \
protocol/presentation_timing-client-protocol.h
protocol/presentation-time-protocol.c \
protocol/presentation-time-client-protocol.h
weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm -lrt
......@@ -721,8 +721,8 @@ weston_info_SOURCES = \
clients/weston-info.c \
shared/helpers.h
nodist_weston_info_SOURCES = \
protocol/presentation_timing-protocol.c \
protocol/presentation_timing-client-protocol.h
protocol/presentation-time-protocol.c \
protocol/presentation-time-client-protocol.h
weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
......@@ -770,8 +770,8 @@ BUILT_SOURCES += \
protocol/weston-desktop-shell-protocol.c \
protocol/scaler-client-protocol.h \
protocol/scaler-protocol.c \
protocol/presentation_timing-protocol.c \
protocol/presentation_timing-client-protocol.h \
protocol/presentation-time-protocol.c \
protocol/presentation-time-client-protocol.h \
protocol/fullscreen-shell-unstable-v1-protocol.c \
protocol/fullscreen-shell-unstable-v1-client-protocol.h \
protocol/xdg-shell-unstable-v5-protocol.c \
......@@ -1234,8 +1234,8 @@ presentation_weston_SOURCES = \
tests/presentation-test.c \
shared/helpers.h
nodist_presentation_weston_SOURCES = \
protocol/presentation_timing-protocol.c \
protocol/presentation_timing-client-protocol.h
protocol/presentation-time-protocol.c \
protocol/presentation-time-client-protocol.h
presentation_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
presentation_weston_LDADD = libtest-client.la
......@@ -1353,7 +1353,6 @@ EXTRA_DIST += \
protocol/weston-screenshooter.xml \
protocol/text-cursor-position.xml \
protocol/weston-test.xml \
protocol/presentation_timing.xml \
protocol/scaler.xml \
protocol/ivi-application.xml \
protocol/ivi-hmi-controller.xml
......
......@@ -38,7 +38,7 @@
#include <wayland-client.h>
#include "shared/helpers.h"
#include "shared/os-compatibility.h"
#include "presentation_timing-client-protocol.h"
#include "presentation-time-client-protocol.h"
enum run_mode {
RUN_MODE_FEEDBACK,
......@@ -67,7 +67,7 @@ struct display {
struct wl_shm *shm;
uint32_t formats;
struct presentation *presentation;
struct wp_presentation *presentation;
clockid_t clk_id;
struct wl_list output_list; /* struct output::link */
......@@ -76,7 +76,7 @@ struct display {
struct feedback {
struct window *window;
unsigned frame_no;
struct presentation_feedback *feedback;
struct wp_presentation_feedback *feedback;
struct timespec commit;
struct timespec target;
uint32_t frame_stamp;
......@@ -251,7 +251,7 @@ static void
destroy_feedback(struct feedback *feedback)
{
if (feedback->feedback)
presentation_feedback_destroy(feedback->feedback);
wp_presentation_feedback_destroy(feedback->feedback);
wl_list_remove(&feedback->link);
free(feedback);
......@@ -344,7 +344,7 @@ paint_pixels(void *image, int width, int height, uint32_t phase)
static void
feedback_sync_output(void *data,
struct presentation_feedback *presentation_feedback,
struct wp_presentation_feedback *presentation_feedback,
struct wl_output *output)
{
/* not interested */
......@@ -357,10 +357,10 @@ pflags_to_str(uint32_t flags, char *str, unsigned len)
uint32_t flag;
char sym;
} desc[] = {
{ PRESENTATION_FEEDBACK_KIND_VSYNC, 's' },
{ PRESENTATION_FEEDBACK_KIND_HW_CLOCK, 'c' },
{ PRESENTATION_FEEDBACK_KIND_HW_COMPLETION, 'e' },
{ PRESENTATION_FEEDBACK_KIND_ZERO_COPY, 'z' },
{ WP_PRESENTATION_FEEDBACK_KIND_VSYNC, 's' },
{ WP_PRESENTATION_FEEDBACK_KIND_HW_CLOCK, 'c' },
{ WP_PRESENTATION_FEEDBACK_KIND_HW_COMPLETION, 'e' },
{ WP_PRESENTATION_FEEDBACK_KIND_ZERO_COPY, 'z' },
};
unsigned i;
......@@ -400,7 +400,7 @@ timespec_diff_to_usec(const struct timespec *a, const struct timespec *b)
static void
feedback_presented(void *data,
struct presentation_feedback *presentation_feedback,
struct wp_presentation_feedback *presentation_feedback,
uint32_t tv_sec_hi,
uint32_t tv_sec_lo,
uint32_t tv_nsec,
......@@ -456,7 +456,7 @@ feedback_presented(void *data,
static void
feedback_discarded(void *data,
struct presentation_feedback *presentation_feedback)
struct wp_presentation_feedback *presentation_feedback)
{
struct feedback *feedback = data;
......@@ -465,7 +465,7 @@ feedback_discarded(void *data,
destroy_feedback(feedback);
}
static const struct presentation_feedback_listener feedback_listener = {
static const struct wp_presentation_feedback_listener feedback_listener = {
feedback_sync_output,
feedback_presented,
feedback_discarded
......@@ -492,7 +492,7 @@ static void
window_create_feedback(struct window *window, uint32_t frame_stamp)
{
static unsigned seq;
struct presentation *pres = window->display->presentation;
struct wp_presentation *pres = window->display->presentation;
struct feedback *feedback;
seq++;
......@@ -505,9 +505,9 @@ window_create_feedback(struct window *window, uint32_t frame_stamp)
return;
feedback->window = window;
feedback->feedback = presentation_feedback(pres, window->surface);
presentation_feedback_add_listener(feedback->feedback,
&feedback_listener, feedback);
feedback->feedback = wp_presentation_feedback(pres, window->surface);
wp_presentation_feedback_add_listener(feedback->feedback,
&feedback_listener, feedback);
feedback->frame_no = seq;
......@@ -559,21 +559,22 @@ static const struct wl_callback_listener frame_listener_mode_feedback = {
redraw_mode_feedback
};
static const struct presentation_feedback_listener feedkick_listener;
static const struct wp_presentation_feedback_listener feedkick_listener;
static void
window_feedkick(struct window *window)
{
struct presentation *pres = window->display->presentation;
struct presentation_feedback *fback;
struct wp_presentation *pres = window->display->presentation;
struct wp_presentation_feedback *fback;
fback = presentation_feedback(pres, window->surface);
presentation_feedback_add_listener(fback, &feedkick_listener, window);
fback = wp_presentation_feedback(pres, window->surface);
wp_presentation_feedback_add_listener(fback, &feedkick_listener,
window);
}
static void
feedkick_presented(void *data,
struct presentation_feedback *presentation_feedback,
struct wp_presentation_feedback *presentation_feedback,
uint32_t tv_sec_hi,
uint32_t tv_sec_lo,
uint32_t tv_nsec,
......@@ -584,7 +585,7 @@ feedkick_presented(void *data,
{
struct window *window = data;
presentation_feedback_destroy(presentation_feedback);
wp_presentation_feedback_destroy(presentation_feedback);
window->refresh_nsec = refresh_nsec;
switch (window->mode) {
......@@ -602,11 +603,11 @@ feedkick_presented(void *data,
static void
feedkick_discarded(void *data,
struct presentation_feedback *presentation_feedback)
struct wp_presentation_feedback *presentation_feedback)
{
struct window *window = data;
presentation_feedback_destroy(presentation_feedback);
wp_presentation_feedback_destroy(presentation_feedback);
switch (window->mode) {
case RUN_MODE_PRESENT:
......@@ -621,7 +622,7 @@ feedkick_discarded(void *data,
}
}
static const struct presentation_feedback_listener feedkick_listener = {
static const struct wp_presentation_feedback_listener feedkick_listener = {
feedback_sync_output,
feedkick_presented,
feedkick_discarded
......@@ -687,7 +688,7 @@ display_add_output(struct display *d, uint32_t name, uint32_t version)
}
static void
presentation_clock_id(void *data, struct presentation *presentation,
presentation_clock_id(void *data, struct wp_presentation *presentation,
uint32_t clk_id)
{
struct display *d = data;
......@@ -695,7 +696,7 @@ presentation_clock_id(void *data, struct presentation *presentation,
d->clk_id = clk_id;
}
static const struct presentation_listener presentation_listener = {
static const struct wp_presentation_listener presentation_listener = {
presentation_clock_id
};
......@@ -730,12 +731,12 @@ registry_handle_global(void *data, struct wl_registry *registry,
wl_shm_add_listener(d->shm, &shm_listener, d);
} else if (strcmp(interface, "wl_output") == 0) {
display_add_output(d, name, version);
} else if (strcmp(interface, "presentation") == 0) {
} else if (strcmp(interface, wp_presentation_interface.name) == 0) {
d->presentation =
wl_registry_bind(registry,
name, &presentation_interface, 1);
presentation_add_listener(d->presentation,
&presentation_listener, d);
name, &wp_presentation_interface, 1);
wp_presentation_add_listener(d->presentation,
&presentation_listener, d);
}
}
......
......@@ -34,7 +34,7 @@
#include "shared/helpers.h"
#include "shared/os-compatibility.h"
#include "presentation_timing-client-protocol.h"
#include "presentation-time-client-protocol.h"
typedef void (*print_info_t)(void *info);
typedef void (*destroy_info_t)(void *info);
......@@ -105,7 +105,7 @@ struct seat_info {
struct presentation_info {
struct global_info global;
struct presentation *presentation;
struct wp_presentation *presentation;
clockid_t clk_id;
};
......@@ -595,7 +595,7 @@ destroy_presentation_info(void *info)
{
struct presentation_info *prinfo = info;
presentation_destroy(prinfo->presentation);
wp_presentation_destroy(prinfo->presentation);
}
static const char *
......@@ -630,7 +630,7 @@ print_presentation_info(void *info)
}
static void
presentation_handle_clock_id(void *data, struct presentation *presentation,
presentation_handle_clock_id(void *data, struct wp_presentation *presentation,
uint32_t clk_id)
{
struct presentation_info *prinfo = data;
......@@ -638,7 +638,7 @@ presentation_handle_clock_id(void *data, struct presentation *presentation,
prinfo->clk_id = clk_id;
}
static const struct presentation_listener presentation_listener = {
static const struct wp_presentation_listener presentation_listener = {
presentation_handle_clock_id
};
......@@ -647,15 +647,16 @@ add_presentation_info(struct weston_info *info, uint32_t id, uint32_t version)
{
struct presentation_info *prinfo = xzalloc(sizeof *prinfo);
init_global_info(info, &prinfo->global, id, "presentation", version);
init_global_info(info, &prinfo->global, id,
wp_presentation_interface.name, version);
prinfo->global.print = print_presentation_info;
prinfo->global.destroy = destroy_presentation_info;
prinfo->clk_id = -1;
prinfo->presentation = wl_registry_bind(info->registry, id,
&presentation_interface, 1);
presentation_add_listener(prinfo->presentation, &presentation_listener,
prinfo);
&wp_presentation_interface, 1);
wp_presentation_add_listener(prinfo->presentation,
&presentation_listener, prinfo);
info->roundtrip_needed = true;
}
......
......@@ -181,7 +181,7 @@ fi
PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.8.0])
PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.0],
PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.2],
[ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
......
This diff is collapsed.
......@@ -55,7 +55,7 @@
#include "libinput-seat.h"
#include "launcher-util.h"
#include "vaapi-recorder.h"
#include "presentation_timing-server-protocol.h"
#include "presentation-time-server-protocol.h"
#include "linux-dmabuf.h"
#ifndef DRM_CAP_TIMESTAMP_MONOTONIC
......@@ -608,13 +608,13 @@ drm_output_set_gamma(struct weston_output *output_base,
}
/* Determine the type of vblank synchronization to use for the output.
*
*
* The pipe parameter indicates which CRTC is in use. Knowing this, we
* can determine which vblank sequence type to use for it. Traditional
* cards had only two CRTCs, with CRTC 0 using no special flags, and
* CRTC 1 using DRM_VBLANK_SECONDARY. The first bit of the pipe
* parameter indicates this.
*
*
* Bits 1-5 of the pipe parameter are 5 bit wide pipe number between
* 0-31. If this is non-zero it indicates we're dealing with a
* multi-gpu situation and we need to calculate the vblank sync
......@@ -778,7 +778,7 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
if (timespec_to_nsec(&vbl2now) < refresh_nsec) {
drm_output_update_msc(output, vbl.reply.sequence);
weston_output_finish_frame(output_base, &ts,
PRESENTATION_FEEDBACK_INVALID);
WP_PRESENTATION_FEEDBACK_INVALID);
return;
}
}
......@@ -800,7 +800,7 @@ finish_frame:
/* if we cannot page-flip, immediately finish frame */
weston_compositor_read_presentation_clock(output_base->compositor, &ts);
weston_output_finish_frame(output_base, &ts,
PRESENTATION_FEEDBACK_INVALID);
WP_PRESENTATION_FEEDBACK_INVALID);
}
static void
......@@ -821,8 +821,8 @@ vblank_handler(int fd, unsigned int frame, unsigned int sec, unsigned int usec,
struct drm_sprite *s = (struct drm_sprite *)data;
struct drm_output *output = s->output;
struct timespec ts;
uint32_t flags = PRESENTATION_FEEDBACK_KIND_HW_COMPLETION |
PRESENTATION_FEEDBACK_KIND_HW_CLOCK;
uint32_t flags = WP_PRESENTATION_FEEDBACK_KIND_HW_COMPLETION |
WP_PRESENTATION_FEEDBACK_KIND_HW_CLOCK;
drm_output_update_msc(output, frame);
output->vblank_pending = 0;
......@@ -847,9 +847,9 @@ page_flip_handler(int fd, unsigned int frame,
{
struct drm_output *output = (struct drm_output *) data;
struct timespec ts;
uint32_t flags = PRESENTATION_FEEDBACK_KIND_VSYNC |
PRESENTATION_FEEDBACK_KIND_HW_COMPLETION |
PRESENTATION_FEEDBACK_KIND_HW_CLOCK;
uint32_t flags = WP_PRESENTATION_FEEDBACK_KIND_VSYNC |
WP_PRESENTATION_FEEDBACK_KIND_HW_COMPLETION |
WP_PRESENTATION_FEEDBACK_KIND_HW_CLOCK;
drm_output_update_msc(output, frame);
......@@ -1298,7 +1298,7 @@ drm_assign_planes(struct weston_output *output_base)
/* All other planes are a direct scanout of a
* single client buffer.
*/
ev->psf_flags = PRESENTATION_FEEDBACK_KIND_ZERO_COPY;
ev->psf_flags = WP_PRESENTATION_FEEDBACK_KIND_ZERO_COPY;
}
pixman_region32_fini(&surface_overlap);
......
......@@ -48,7 +48,7 @@
#include "pixman-renderer.h"
#include "libinput-seat.h"
#include "gl-renderer.h"
#include "presentation_timing-server-protocol.h"
#include "presentation-time-server-protocol.h"
struct fbdev_backend {
struct weston_backend base;
......@@ -121,7 +121,7 @@ fbdev_output_start_repaint_loop(struct weston_output *output)
struct timespec ts;
weston_compositor_read_presentation_clock(output->compositor, &ts);
weston_output_finish_frame(output, &ts, PRESENTATION_FEEDBACK_INVALID);
weston_output_finish_frame(output, &ts, WP_PRESENTATION_FEEDBACK_INVALID);
}
static void
......
......@@ -34,7 +34,7 @@
#include "shared/helpers.h"
#include "compositor.h"
#include "pixman-renderer.h"
#include "presentation_timing-server-protocol.h"
#include "presentation-time-server-protocol.h"
struct headless_backend {
struct weston_backend base;
......@@ -64,7 +64,7 @@ headless_output_start_repaint_loop(struct weston_output *output)
struct timespec ts;
weston_compositor_read_presentation_clock(output->compositor, &ts);
weston_output_finish_frame(output, &ts, PRESENTATION_FEEDBACK_INVALID);
weston_output_finish_frame(output, &ts, WP_PRESENTATION_FEEDBACK_INVALID);
}
static int
......
......@@ -343,7 +343,7 @@ rdp_output_start_repaint_loop(struct weston_output *output)
struct timespec ts;
weston_compositor_read_presentation_clock(output->compositor, &ts);
weston_output_finish_frame(output, &ts, PRESENTATION_FEEDBACK_INVALID);
weston_output_finish_frame(output, &ts, WP_PRESENTATION_FEEDBACK_INVALID);
}
static int
......
......@@ -50,7 +50,7 @@
#include "rpi-renderer.h"
#include "launcher-util.h"
#include "libinput-seat.h"
#include "presentation_timing-server-protocol.h"
#include "presentation-time-server-protocol.h"
#if 0
#define DBG(...) \
......@@ -223,7 +223,7 @@ rpi_output_start_repaint_loop(struct weston_output *output)
/* XXX: do a phony dispmanx update and trigger on its completion? */
weston_compositor_read_presentation_clock(output->compositor, &ts);
weston_output_finish_frame(output, &ts, PRESENTATION_FEEDBACK_INVALID);
weston_output_finish_frame(output, &ts, WP_PRESENTATION_FEEDBACK_INVALID);
}
static int
......@@ -257,8 +257,8 @@ static void
rpi_output_update_complete(struct rpi_output *output,
const struct timespec *stamp)
{
uint32_t flags = PRESENTATION_FEEDBACK_KIND_VSYNC |
PRESENTATION_FEEDBACK_KIND_HW_COMPLETION;
uint32_t flags = WP_PRESENTATION_FEEDBACK_KIND_VSYNC |
WP_PRESENTATION_FEEDBACK_KIND_HW_COMPLETION;
DBG("frame update complete(%ld.%09ld)\n",
(long)stamp->tv_sec, (long)stamp->tv_nsec);
......
......@@ -47,7 +47,7 @@
#include "shared/os-compatibility.h"
#include "shared/cairo-util.h"
#include "fullscreen-shell-unstable-v1-client-protocol.h"
#include "presentation_timing-server-protocol.h"
#include "presentation-time-server-protocol.h"
#include "linux-dmabuf.h"
#define WINDOW_TITLE "Weston Compositor"
......
......@@ -55,7 +55,7 @@
#include "shared/config-parser.h"
#include "shared/helpers.h"
#include "shared/image-loader.h"
#include "presentation_timing-server-protocol.h"
#include "presentation-time-server-protocol.h"
#include "linux-dmabuf.h"
#define DEFAULT_AXIS_STEP_DISTANCE wl_fixed_from_int(10)
......@@ -371,7 +371,7 @@ x11_output_start_repaint_loop(struct weston_output *output)
struct timespec ts;
weston_compositor_read_presentation_clock(output->compositor, &ts);
weston_output_finish_frame(output, &ts, PRESENTATION_FEEDBACK_INVALID);
weston_output_finish_frame(output, &ts, WP_PRESENTATION_FEEDBACK_INVALID);
}
static int
......
......@@ -55,7 +55,7 @@
#include "compositor.h"
#include "scaler-server-protocol.h"
#include "presentation_timing-server-protocol.h"
#include "presentation-time-server-protocol.h"
#include "shared/helpers.h"
#include "shared/os-compatibility.h"
#include "shared/timespec-util.h"
......@@ -443,7 +443,7 @@ static void
weston_presentation_feedback_discard(
struct weston_presentation_feedback *feedback)
{
presentation_feedback_send_discarded(feedback->resource);
wp_presentation_feedback_send_discarded(feedback->resource);
wl_resource_destroy(feedback->resource);
}
......@@ -473,16 +473,16 @@ weston_presentation_feedback_present(
if (wl_resource_get_client(o) != client)
continue;
presentation_feedback_send_sync_output(feedback->resource, o);
wp_presentation_feedback_send_sync_output(feedback->resource, o);
}
secs = ts->tv_sec;
presentation_feedback_send_presented(feedback->resource,
secs >> 32, secs & 0xffffffff,
ts->tv_nsec,
refresh_nsec,
seq >> 32, seq & 0xffffffff,
flags | feedback->psf_flags);
wp_presentation_feedback_send_presented(feedback->resource,
secs >> 32, secs & 0xffffffff,
ts->tv_nsec,
refresh_nsec,
seq >> 32, seq & 0xffffffff,
flags | feedback->psf_flags);
wl_resource_destroy(feedback->resource);
}
......@@ -496,7 +496,7 @@ weston_presentation_feedback_present_list(struct wl_list *list,
{
struct weston_presentation_feedback *feedback, *tmp;
assert(!(flags & PRESENTATION_FEEDBACK_INVALID) ||
assert(!(flags & WP_PRESENTATION_FEEDBACK_INVALID) ||
wl_list_empty(list));
wl_list_for_each_safe(feedback, tmp, list, link)
......@@ -2489,7 +2489,7 @@ weston_output_finish_frame(struct weston_output *output,
* the deadline given by repaint_msec? In that case we delay until
* the deadline of the next frame, to give clients a more predictable
* timing of the repaint cycle to lock on. */
if (presented_flags == PRESENTATION_FEEDBACK_INVALID && msec < 0)
if (presented_flags == WP_PRESENTATION_FEEDBACK_INVALID && msec < 0)
msec += refresh_nsec / 1000000;
if (msec < 1)
......@@ -4605,7 +4605,7 @@ presentation_feedback(struct wl_client *client,
goto err_calloc;
feedback->resource = wl_resource_create(client,
&presentation_feedback_interface,
&wp_presentation_feedback_interface,
1, callback);
if (!feedback->resource)
goto err_create;
......@@ -4624,7 +4624,7 @@ err_calloc:
wl_client_post_no_memory(client);
}
static const struct presentation_interface presentation_implementation = {
static const struct wp_presentation_interface presentation_implementation = {
presentation_destroy,
presentation_feedback
};
......@@ -4636,7 +4636,7 @@ bind_presentation(struct wl_client *client,
struct weston_compositor *compositor = data;
struct wl_resource *resource;
resource = wl_resource_create(client, &presentation_interface,
resource = wl_resource_create(client, &wp_presentation_interface,
version, id);
if (resource == NULL) {
wl_client_post_no_memory(client);
......@@ -4645,7 +4645,7 @@ bind_presentation(struct wl_client *client,
wl_resource_set_implementation(resource, &presentation_implementation,
compositor, NULL);
presentation_send_clock_id(resource, compositor->presentation_clock);
wp_presentation_send_clock_id(resource, compositor->presentation_clock);
}
static void
......@@ -4754,7 +4754,7 @@ weston_compositor_create(struct wl_display *display, void *user_data)
ec, bind_scaler))
goto fail;
if (!wl_global_create(ec->wl_display, &presentation_interface, 1,
if (!wl_global_create(ec->wl_display, &wp_presentation_interface, 1,
ec, bind_presentation))
goto fail;
......
......@@ -1221,7 +1221,7 @@ weston_compositor_stack_plane(struct weston_compositor *ec,
struct weston_plane *above);
/* An invalid flag in presented_flags to catch logic errors. */
#define PRESENTATION_FEEDBACK_INVALID (1U << 31)
#define WP_PRESENTATION_FEEDBACK_INVALID (1U << 31)
void
weston_output_finish_frame(struct weston_output *output,
......
......@@ -33,20 +33,20 @@
#include "shared/helpers.h"
#include "weston-test-client-helper.h"
#include "presentation_timing-client-protocol.h"
#include "presentation-time-client-protocol.h"
static struct presentation *
static struct wp_presentation *
get_presentation(struct client *client)
{
struct global *g;
struct global *global_pres = NULL;
static struct presentation *pres;
static struct wp_presentation *pres;
if (pres)
return pres;
wl_list_for_each(g, &client->global_list, link) {
if (strcmp(g->interface, "presentation"))
if (strcmp(g->interface, wp_presentation_interface.name))
continue;
if (global_pres)
......@@ -60,7 +60,7 @@ get_presentation(struct client *client)
assert(global_pres->version == 1);
pres = wl_registry_bind(client->wl_registry, global_pres->name,
&presentation_interface, 1);
&wp_presentation_interface, 1);
assert(pres);
return pres;
......@@ -68,7 +68,7 @@ get_presentation(struct client *client)
struct feedback {
struct client *client;
struct presentation_feedback *obj;
struct wp_presentation_feedback *obj;
enum {
FB_PENDING = 0,
......@@ -93,7 +93,7 @@ timespec_from_proto(struct timespec *tm, uint32_t tv_sec_hi,
static void
feedback_sync_output(void *data,
struct presentation_feedback *presentation_feedback,
struct wp_presentation_feedback *presentation_feedback,
struct wl_output *output)
{
struct feedback *fb = data;
......@@ -106,7 +106,7 @@ feedback_sync_output(void *data,
static void
feedback_presented(void *data,
struct presentation_feedback *presentation_feedback,
struct wp_presentation_feedback *presentation_feedback,
uint32_t tv_sec_hi,
uint32_t tv_sec_lo,
uint32_t tv_nsec,
......@@ -127,7 +127,7 @@ feedback_presented(void *data,
static void
feedback_discarded(void *data,
struct presentation_feedback *presentation_feedback)
struct wp_presentation_feedback *presentation_feedback)
{
struct feedback *fb = data;
......@@ -135,7 +135,7 @@ feedback_discarded(void *data,
fb->result = FB_DISCARDED;
}
static const struct presentation_feedback_listener feedback_listener = {
static const struct wp_presentation_feedback_listener feedback_listener = {
feedback_sync_output,
feedback_presented,
feedback_discarded
......@@ -148,8 +148,8 @@ feedback_create(struct client *client, struct wl_surface *surface)
fb = xzalloc(sizeof *fb);
fb->client = client;
fb->obj = presentation_feedback(get_presentation(client), surface);
presentation_feedback_add_listener(fb->obj, &feedback_listener, fb);
fb->obj = wp_presentation_feedback(get_presentation(client), surface);
wp_presentation_feedback_add_listener(fb->obj, &feedback_listener, fb);
return fb;
}
......@@ -169,10 +169,10 @@ pflags_to_str(uint32_t flags, char *str, unsigned len)
uint32_t flag;
char sym;
} desc[] = {
{ PRESENTATION_FEEDBACK_KIND_VSYNC, 's' },
{ PRESENTATION_FEEDBACK_KIND_HW_CLOCK, 'c' },
{ PRESENTATION_FEEDBACK_KIND_HW_COMPLETION, 'e' },
{ PRESENTATION_FEEDBACK_KIND_ZERO_COPY, 'z' },
{ WP_PRESENTATION_FEEDBACK_KIND_VSYNC, 's' },
{ WP_PRESENTATION_FEEDBACK_KIND_HW_CLOCK, 'c' },
{ WP_PRESENTATION_FEEDBACK_KIND_HW_COMPLETION, 'e' },
{ WP_PRESENTATION_FEEDBACK_KIND_ZERO_COPY, 'z' },
};
unsigned i;
......@@ -212,7 +212,7 @@ feedback_print(struct feedback *fb)
static void
feedback_destroy(struct feedback *fb)
{
presentation_feedback_destroy(fb->obj);
wp_presentation_feedback_destroy(fb->obj);
free(fb);
}
......
Markdown is supported
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