Lines Matching defs:image

1057             struct x11_image *image = &chain->images[i];
1058 if (image->present_queued && image->serial == complete->serial)
1059 image->present_queued = false;
1110 * Acquire a ready-to-use image directly from our swapchain. If all images are
1123 /* We found a non-busy image */
1179 * Acquire a ready-to-use image from the acquire-queue. Only relevant in fifo
1210 * Send image to X server via Present extension.
1216 struct x11_image *image = &chain->images[image_index];
1255 xshmfence_reset(image->shm_fence);
1261 image->present_queued = true;
1262 image->serial = (uint32_t) chain->send_sbc;
1267 image->pixmap,
1268 image->serial,
1270 image->update_area, /* update */
1275 image->sync_fence,
1290 * Send image to X server unaccelerated (software drivers).
1296 struct x11_image *image = &chain->images[image_index];
1299 void *myptr = image->base.cpu_map;
1301 int stride_b = image->base.row_pitches[0];
1310 image->base.row_pitches[0] / 4,
1313 image->base.row_pitches[0] * chain->extent.height,
1314 image->base.cpu_map);
1325 image->base.row_pitches[0] / 4,
1341 * Send image to the X server for presentation at target_msc.
1353 * Acquire a ready-to-use image from the swapchain.
1355 * This means usually that the image is not waiting on presentation and that the
1356 * image has been released by the X server to be used again by the consumer.
1405 * Queue a new presentation of an image that was previously acquired by the
1452 * - Mailbox mode, as otherwise the latest image in the queue might not be fully rendered at
1456 * compositor miss a frame when compositing the final image with this buffer.
1503 * sending the image to the X server we wait until the image either has been
1504 * presented or released and only then pull a new image from the present-queue.
1519 /* We can block here unconditionally because after an image was sent to
1520 * the server (later on in this loop) we ensure at least one image is
1581 * image that can be acquired by the client afterwards. This ensures we
1619 struct x11_image *image = (struct x11_image *)imagew;
1620 image->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT | 0600);
1621 if (image->shmid < 0)
1624 uint8_t *addr = (uint8_t *)shmat(image->shmid, 0, 0);
1626 shmctl(image->shmid, IPC_RMID, 0);
1631 image->shmaddr = addr;
1642 struct x11_image *image)
1650 &image->base);
1654 image->update_region = xcb_generate_id(chain->conn);
1655 xcb_xfixes_create_region(chain->conn, image->update_region, 0, NULL);
1659 image->busy = false;
1663 image->shmseg = xcb_generate_id(chain->conn);
1666 image->shmseg,
1667 image->shmid,
1669 image->pixmap = xcb_generate_id(chain->conn);
1671 image->pixmap,
1673 image->base.row_pitches[0] / 4,
1676 image->shmseg, 0);
1680 image->pixmap = xcb_generate_id(chain->conn);
1683 if (image->base.drm_modifier != DRM_FORMAT_MOD_INVALID) {
1684 /* If the image has a modifier, we must have DRI3 v1.2. */
1689 for (int i = 0; i < image->base.num_planes; i++) {
1690 fds[i] = os_dupfd_cloexec(image->base.dma_buf_fd);
1701 image->pixmap,
1703 image->base.num_planes,
1706 image->base.row_pitches[0],
1707 image->base.offsets[0],
1708 image->base.row_pitches[1],
1709 image->base.offsets[1],
1710 image->base.row_pitches[2],
1711 image->base.offsets[2],
1712 image->base.row_pitches[3],
1713 image->base.offsets[3],
1715 image->base.drm_modifier,
1721 assert(image->base.num_planes == 1);
1724 int fd = os_dupfd_cloexec(image->base.dma_buf_fd);
1730 image->pixmap,
1732 image->base.sizes[0],
1735 image->base.row_pitches[0],
1746 image->shm_fence = xshmfence_map_shm(fence_fd);
1747 if (image->shm_fence == NULL)
1750 image->sync_fence = xcb_generate_id(chain->conn);
1752 image->pixmap,
1753 image->sync_fence,
1757 image->busy = false;
1758 xshmfence_trigger(image->shm_fence);
1766 cookie = xcb_free_pixmap(chain->conn, image->pixmap);
1769 wsi_destroy_image(&chain->base, &image->base);
1777 struct x11_image *image)
1782 cookie = xcb_sync_destroy_fence(chain->conn, image->sync_fence);
1784 xshmfence_unmap_shm(image->shm_fence);
1786 cookie = xcb_free_pixmap(chain->conn, image->pixmap);
1789 cookie = xcb_xfixes_destroy_region(chain->conn, image->update_region);
1793 wsi_destroy_image(&chain->base, &image->base);
1795 if (image->shmaddr)
1796 shmdt(image->shmaddr);
1969 * - requested minimal image count
1996 /* Allocate the actual swapchain. The size depends on image count. */
2064 * - Complete: An image from our swapchain was presented on the output.
2065 * - Idle: An image from our swapchain is not anymore accessed by the X
2123 uint32_t image = 0;
2124 for (; image < chain->base.image_count; image++) {
2126 &chain->images[image]);
2200 for (uint32_t j = 0; j < image; j++)