mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-06-29 06:15:29 +00:00
Compare commits
4 Commits
e2dd400034
...
d3d99d3471
Author | SHA1 | Date | |
---|---|---|---|
|
d3d99d3471 | ||
|
de669aeb60 | ||
|
f843ba34d1 | ||
|
81a1b99e2c |
|
@ -621,7 +621,7 @@ static int
|
|||
shm_pool_init(struct shm_pool *pool, size_t size, struct wl_shm *wl_shm)
|
||||
{
|
||||
size_t pool_size = size * ARRAY_LENGTH(pool->buffers);
|
||||
int fd = os_create_anonymous_file(pool_size);
|
||||
int fd = weston_os_create_anonymous_file(pool_size);
|
||||
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "creating a buffer file for %zu B failed: %s\n",
|
||||
|
|
|
@ -805,7 +805,7 @@ createShmBuffer(struct wlContextStruct *p_wlCtx)
|
|||
|
||||
size = stride * height;
|
||||
|
||||
fd = os_create_anonymous_file(size);
|
||||
fd = weston_os_create_anonymous_file(size);
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "creating a buffer file for %d B failed: %s\n",
|
||||
size, strerror(errno));
|
||||
|
|
|
@ -102,7 +102,7 @@ attach_buffer(struct window *window, int width, int height)
|
|||
stride = width * 4;
|
||||
size = stride * height;
|
||||
|
||||
fd = os_create_anonymous_file(size);
|
||||
fd = weston_os_create_anonymous_file(size);
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "creating a buffer file for %d B failed: %s\n",
|
||||
size, strerror(errno));
|
||||
|
|
|
@ -143,7 +143,7 @@ create_shm_buffers(struct display *display, struct buffer **buffers,
|
|||
stride = width * 4;
|
||||
size = stride * height * num_buffers;
|
||||
|
||||
fd = os_create_anonymous_file(size);
|
||||
fd = weston_os_create_anonymous_file(size);
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "creating a buffer file for %d B failed: %s\n",
|
||||
size, strerror(errno));
|
||||
|
|
|
@ -112,7 +112,7 @@ screenshot_create_shm_buffer(struct screenshooter_app *app,
|
|||
assert(width == stride / bytes_pp);
|
||||
assert(height == buffer->len / stride);
|
||||
|
||||
fd = os_create_anonymous_file(buffer->len);
|
||||
fd = weston_os_create_anonymous_file(buffer->len);
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "creating a buffer file for %zd B failed: %s\n",
|
||||
buffer->len, strerror(errno));
|
||||
|
|
|
@ -120,7 +120,7 @@ create_shm_buffer(struct display *display, struct buffer *buffer,
|
|||
pitch = width * 4;
|
||||
size = pitch * height;
|
||||
|
||||
fd = os_create_anonymous_file(size);
|
||||
fd = weston_os_create_anonymous_file(size);
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "creating a buffer file for %d B failed: %s\n",
|
||||
size, strerror(errno));
|
||||
|
|
|
@ -165,7 +165,7 @@ create_shm_buffer(struct window *window, struct buffer *buffer, uint32_t format)
|
|||
size = stride * height;
|
||||
display = window->display;
|
||||
|
||||
fd = os_create_anonymous_file(size);
|
||||
fd = weston_os_create_anonymous_file(size);
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "creating a buffer file for %d B failed: %s\n",
|
||||
size, strerror(errno));
|
||||
|
|
|
@ -86,7 +86,7 @@ create_shm_buffer(struct touch *touch)
|
|||
stride = touch->width * 4;
|
||||
size = stride * touch->height;
|
||||
|
||||
fd = os_create_anonymous_file(size);
|
||||
fd = weston_os_create_anonymous_file(size);
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "creating a buffer file for %d B failed: %s\n",
|
||||
size, strerror(errno));
|
||||
|
|
|
@ -781,7 +781,7 @@ make_shm_pool(struct display *display, int size, void **data)
|
|||
struct wl_shm_pool *pool;
|
||||
int fd;
|
||||
|
||||
fd = os_create_anonymous_file(size);
|
||||
fd = weston_os_create_anonymous_file(size);
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "creating a buffer file for %d B failed: %s\n",
|
||||
size, strerror(errno));
|
||||
|
|
|
@ -55,6 +55,7 @@ script_data.set('DOCTREES_DIR', meson.current_build_dir() + '/doctrees')
|
|||
|
||||
script_data.set('DOXYGEN_CONF', meson.current_build_dir() + '/doxygen.ini')
|
||||
script_data.set('DOXYGEN_CMD', doxygen.full_path())
|
||||
script_data.set('MESON_WERROR', get_option('werror') == true ? 'YES' : 'NO')
|
||||
script_data.set('SPHINX_CMD', sphinx.full_path())
|
||||
script_doxy_sphinx = configure_file(
|
||||
input: 'run_doxygen_sphinx.sh.in',
|
||||
|
|
|
@ -1,2 +1,9 @@
|
|||
#!/bin/sh
|
||||
@DOXYGEN_CMD@ @DOXYGEN_CONF@ && @SPHINX_CMD@ -E -W -q -j auto -d @DOCTREES_DIR@ @SRCDIR@ @OUTDIR@
|
||||
|
||||
if [ "@MESON_WERROR@" = "YES" ]; then
|
||||
SPHINX_WERROR="-W"
|
||||
else
|
||||
SPHINX_WERROR=""
|
||||
fi
|
||||
|
||||
@DOXYGEN_CMD@ @DOXYGEN_CONF@ && @SPHINX_CMD@ $SPHINX_WERROR -E -q -j auto -d @DOCTREES_DIR@ @SRCDIR@ @OUTDIR@
|
||||
|
|
|
@ -470,9 +470,9 @@ shared_output_get_shm_buffer(struct shared_output *so)
|
|||
return sb;
|
||||
}
|
||||
|
||||
fd = os_create_anonymous_file(height * stride);
|
||||
fd = weston_os_create_anonymous_file(height * stride);
|
||||
if (fd < 0) {
|
||||
weston_log("os_create_anonymous_file: %s\n", strerror(errno));
|
||||
weston_log("weston_os_create_anonymous_file: %s\n", strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -946,7 +946,7 @@ drm_repaint_flush_device(struct drm_device *device)
|
|||
{
|
||||
struct drm_backend *b = device->backend;
|
||||
struct drm_pending_state *pending_state;
|
||||
struct weston_output *base;
|
||||
struct drm_output_state *output_state;
|
||||
int ret;
|
||||
|
||||
pending_state = device->repaint_data;
|
||||
|
@ -964,15 +964,13 @@ drm_repaint_flush_device(struct drm_device *device)
|
|||
if (ret == 0)
|
||||
return;
|
||||
|
||||
wl_list_for_each(base, &b->compositor->output_list, link) {
|
||||
struct drm_output *tmp = to_drm_output(base);
|
||||
if (!tmp || tmp->device != device)
|
||||
continue;
|
||||
wl_list_for_each(output_state, &pending_state->output_list, link) {
|
||||
struct drm_output *tmp = output_state->output;
|
||||
|
||||
if (ret == -EBUSY)
|
||||
weston_output_schedule_repaint_restart(base);
|
||||
weston_output_schedule_repaint_restart(&tmp->base);
|
||||
else
|
||||
weston_output_schedule_repaint_reset(base);
|
||||
weston_output_schedule_repaint_reset(&tmp->base);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ wayland_output_get_shm_buffer(struct wayland_output *output)
|
|||
|
||||
stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width);
|
||||
|
||||
fd = os_create_anonymous_file(height * stride);
|
||||
fd = weston_os_create_anonymous_file(height * stride);
|
||||
if (fd < 0) {
|
||||
weston_log("could not create an anonymous file buffer: %s\n",
|
||||
strerror(errno));
|
||||
|
|
|
@ -542,7 +542,7 @@ weston_dmabuf_feedback_format_table_create(const struct weston_drm_format_array
|
|||
/* Creates formats file table and mmap it */
|
||||
format_table->size = weston_drm_format_array_count_pairs(renderer_formats) *
|
||||
sizeof(*format_table->data);
|
||||
format_table->fd = os_create_anonymous_file(format_table->size);
|
||||
format_table->fd = weston_os_create_anonymous_file(format_table->size);
|
||||
if (format_table->fd < 0) {
|
||||
weston_log("error: failed to create format table file: %s\n",
|
||||
strerror(errno));
|
||||
|
|
|
@ -180,7 +180,7 @@ create_tmpfile_cloexec(char *tmpname)
|
|||
* XDG_RUNTIME_DIR.
|
||||
*/
|
||||
int
|
||||
os_create_anonymous_file(off_t size)
|
||||
weston_os_create_anonymous_file(off_t size)
|
||||
{
|
||||
static const char template[] = "/weston-shared-XXXXXX";
|
||||
const char *path;
|
||||
|
@ -297,7 +297,7 @@ os_ro_anonymous_file_create(size_t size,
|
|||
}
|
||||
|
||||
file->size = size;
|
||||
file->fd = os_create_anonymous_file(size);
|
||||
file->fd = weston_os_create_anonymous_file(size);
|
||||
if (file->fd == -1)
|
||||
goto err_free;
|
||||
|
||||
|
@ -388,7 +388,7 @@ os_ro_anonymous_file_get_fd(struct ro_anonymous_file *file,
|
|||
/* for all other cases we create a new anonymous file that can be mapped
|
||||
* with MAP_SHARED and copy the contents to it and return that instead
|
||||
*/
|
||||
fd = os_create_anonymous_file(file->size);
|
||||
fd = weston_os_create_anonymous_file(file->size);
|
||||
if (fd == -1)
|
||||
return fd;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ int
|
|||
os_epoll_create_cloexec(void);
|
||||
|
||||
int
|
||||
os_create_anonymous_file(off_t size);
|
||||
weston_os_create_anonymous_file(off_t size);
|
||||
|
||||
#ifndef HAVE_STRCHRNUL
|
||||
char *
|
||||
|
|
|
@ -53,7 +53,7 @@ DECLARE_FIXTURE_SETUP(fixture_setup);
|
|||
* behave like older clients, and allow ftruncate() to shrink the file’s size,
|
||||
* so SIGBUS can still happen.
|
||||
*
|
||||
* There is no reason not to use os_create_anonymous_file() otherwise. */
|
||||
* There is no reason not to use weston_os_create_anonymous_file() otherwise. */
|
||||
|
||||
#ifndef HAVE_MKOSTEMP
|
||||
static int
|
||||
|
|
|
@ -503,7 +503,7 @@ create_shm_buffer(struct client *client, int width, int height,
|
|||
buf->len = stride_bytes * height;
|
||||
assert(buf->len / stride_bytes == (unsigned)height);
|
||||
|
||||
fd = os_create_anonymous_file(buf->len);
|
||||
fd = weston_os_create_anonymous_file(buf->len);
|
||||
assert(fd >= 0);
|
||||
|
||||
data = mmap(NULL, buf->len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
|
|
|
@ -88,7 +88,7 @@ yuv_buffer_create(struct client *client,
|
|||
buf->width = width;
|
||||
buf->height = height;
|
||||
|
||||
fd = os_create_anonymous_file(buf->bytes);
|
||||
fd = weston_os_create_anonymous_file(buf->bytes);
|
||||
assert(fd >= 0);
|
||||
|
||||
buf->data = mmap(NULL, buf->bytes,
|
||||
|
|
Loading…
Reference in New Issue
Block a user