Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • keshto/wlroots
  • markbolhuis/wlroots
  • joanbrugueram/wlroots
  • ammen99/wlroots
  • mfk530/wlroots
  • lovesegfault/wlroots
  • Programmerino/wlroots
  • wlroots/wlroots
  • mstoeckl/wlroots
  • emersion/wlroots
  • tadeokondrak/wlroots
  • MisterDA/wlroots
  • vyivel/wlroots
  • agx/wlroots
  • bl4ckb0ne/wlroots
  • ifreund/wlroots
  • Beryesa/wlroots
  • colemickens/wlroots
  • frog/wlroots
  • raphaelr/wlroots
  • etom/wlroots
  • Emantor/wlroots
  • romangg/wlroots
  • DemiMarie/wlroots
  • lilydjwg/wlroots
  • ashafer/wlroots
  • ericonr/wlroots
  • jlindgren90/wlroots
  • hurrdurr/wlroots
  • quantum/wlroots
  • alex-courtis/wlroots
  • zagursky/wlroots
  • zavorka/wlroots
  • nowrep/wlroots
  • StacyHarper/wlroots
  • valpackett/wlroots
  • nyorain/wlroots
  • kimhoai.nguyen123/wlroots
  • Nefsen402/wlroots
  • duncanm/wlroots
  • tchebb/wlroots
  • kennylevinsen/wlroots
  • demansanaa/wlroots
  • sjnewbury/wlroots
  • illiliti/wlroots
  • martinetd/wlroots
  • keithbowes/wlroots
  • 5l8yj2lv/wlroots
  • andri/wlroots
  • JoseExposito/wlroots
  • held-m/wlroots
  • dos/wlroots
  • OctopusET/wlroots
  • jide/wlroots
  • David96/wlroots
  • sammko/wlroots
  • wingdeans/wlroots
  • lostmythread/wlroots
  • sevz/wlroots
  • yrlf/wlroots
  • tmlind/wlroots
  • nagy/wlroots
  • brocellous/wlroots
  • kchibisov/wlroots
  • caseorum/wlroots
  • zsugabubus/wlroots
  • ptrcnull/wlroots
  • sktt/wlroots
  • yiqiang/wlroots
  • dzmien/wlroots
  • vaxerski/wlroots
  • Consolatis/wlroots
  • paraworker/wlroots
  • maccraft/wlroots
  • johanmalm/wlroots
  • bi4k8/wlroots
  • fakeczg/wlroots
  • stshine/wlroots
  • puckipedia/wlroots
  • vanfanel/wlroots
  • laxyy/wlroots
  • gabcoh/wlroots
  • lack/wlroots
  • shua/wlroots
  • xiliuya/wlroots
  • prehonor/wlroots
  • BBaoVanC/wlroots
  • qaqland/wlroots
  • llyyr/wlroots
  • clamps/wlroots
  • Woodpile37/wlroots
  • samuel/wlroots
  • eric/wlroots
  • vvavrychuk/wlroots
  • 9ary/wlroots
  • gvideo434/wlroots
  • alxu/wlroots
  • tobias.predel/wlroots
  • rosefromthedead/wlroots
  • philipp.kaeser/wlroots
  • phnaharris/wlroots
  • Drakulix/wlroots
  • Edgars-Cirulis/wlroots
  • EBADBEEF/wlroots
  • mainiomano/wlroots
  • gilvbp/wlroots
  • Leon-Plickat/wlroots
  • ghishadow/wlroots
  • evyatark2/wlroots
  • craftyguy/wlroots
  • mherrb/wlroots
  • Dudemanguy/wlroots
  • ErikReider/wlroots
  • wineee/wlroots
  • q234rty/wlroots
  • maaarghk/wlroots
  • saihaze/wlroots
  • wingedcutter/wlroots
  • YellowOnion/wlroots
  • jdtatz/wlroots
  • aadi58002/wlroots
  • leoli/wlroots-output-layers
  • MoetaYuko/wlroots
  • SergioGDR/wlroots
  • kelnos/wlroots
  • kode54/wlroots
  • navi_desu/wlroots
  • eerii/wlroots
  • sunzhguy/wlroots
  • zorowk/wlroots
  • dkondor1/wlroots
  • lahavts/wlroots
  • bwhmather/wlroots
  • mcoffin/wlroots
  • praschke/wlroots
  • trofi/wlroots
  • MaxVerevkin/wlroots
  • 6by9/wlroots
  • svalaskevicius/wlroots
  • Rui511/wlroots
  • fpoisot/wlroots
  • danieldg/wlroots
  • grisha128/wlroots
  • serebit/wlrplus
  • david.turner/wlroots
  • pcercuei/wlroots
  • columbarius/wlroots-tmp
  • sleirsgoevy/wlroots
  • HeYong/wlroots
  • Louis_Goyard/wlroots
  • iforbes/wlroots
  • vimproved/wlroots
  • toast/wlroots
  • shadowgamer67890/wlroots-rhpd
  • tomenglund26/wlroots
  • WhyNotHugo/wlroots
  • Groveer/wlroots
  • luyn/wlroots
  • n3rdopolis/wlroots
  • amfcosta13/wlroots
  • BiRD04/wlroots
  • Billli11/wlroots
  • chenyongxing/wlroots
  • sewn/wlroots
  • kkartaltepe/wlroots
  • furball/wlroots
  • carbonXIII/wlroots
  • ali1234/wlroots
  • project-repo/wlroots
  • garlett/wlroots-lease-multiseat
  • C0rn3j/wlroots
  • arun-mani-j/wlroots
  • liup/wlroots
  • qyliss/wlroots
  • tatokis/wlroots
  • masiukiewicz.michal/wlroots
  • asterwyx/wlroots
  • tokyo4j/wlroots
  • tych0/wlroots
  • james.jehiel.ramsey/wlroots
  • zzxyb/wlroots
  • iv.dovg/wlroots
182 results
Show changes
Commits on Source (2)
......@@ -151,6 +151,8 @@ struct wlr_client_buffer {
// private state
struct wl_listener source_destroy;
size_t n_ignore_locks;
};
/**
......
......@@ -6,6 +6,11 @@
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif
/*
* NOTE: wlr/types/wlr_output_damage.h is deprecated and will be removed in
* the next release. Use wlr/types/wlr_damage_ring.h instead.
*/
#ifndef WLR_TYPES_WLR_OUTPUT_DAMAGE_H
#define WLR_TYPES_WLR_OUTPUT_DAMAGE_H
......
......@@ -84,7 +84,7 @@ struct wlr_client_buffer *wlr_client_buffer_create(struct wlr_buffer *buffer,
bool wlr_client_buffer_apply_damage(struct wlr_client_buffer *client_buffer,
struct wlr_buffer *next, pixman_region32_t *damage) {
if (client_buffer->base.n_locks > 1) {
if (client_buffer->base.n_locks - client_buffer->n_ignore_locks > 1) {
// Someone else still has a reference to the buffer
return false;
}
......
#include <assert.h>
#include <stdlib.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_presentation_time.h>
......@@ -55,6 +56,28 @@ static void scene_surface_handle_surface_destroy(
wlr_scene_node_destroy(&surface->buffer->node);
}
// This is used for wlr_scene where it unconditionally locks buffers preventing
// reuse of the existing texture for shm clients. With the usage pattern of
// wlr_scene surface handling, we can mark its locked buffer as safe
// for mutation.
static void client_buffer_mark_next_can_damage(struct wlr_client_buffer *buffer) {
buffer->n_ignore_locks++;
}
static void scene_buffer_unmark_client_buffer(struct wlr_scene_buffer *scene_buffer) {
if (!scene_buffer->buffer) {
return;
}
struct wlr_client_buffer *buffer = wlr_client_buffer_get(scene_buffer->buffer);
if (!buffer) {
return;
}
assert(buffer->n_ignore_locks > 0);
buffer->n_ignore_locks--;
}
static void set_buffer_with_surface_state(struct wlr_scene_buffer *scene_buffer,
struct wlr_surface *surface) {
struct wlr_surface_state *state = &surface->current;
......@@ -68,7 +91,11 @@ static void set_buffer_with_surface_state(struct wlr_scene_buffer *scene_buffer,
wlr_scene_buffer_set_dest_size(scene_buffer, state->width, state->height);
wlr_scene_buffer_set_transform(scene_buffer, state->transform);
scene_buffer_unmark_client_buffer(scene_buffer);
if (surface->buffer) {
client_buffer_mark_next_can_damage(surface->buffer);
wlr_scene_buffer_set_buffer_with_damage(scene_buffer,
&surface->buffer->base, &surface->buffer_damage);
} else {
......@@ -109,6 +136,8 @@ static bool scene_buffer_point_accepts_input(struct wlr_scene_buffer *scene_buff
static void surface_addon_destroy(struct wlr_addon *addon) {
struct wlr_scene_surface *surface = wl_container_of(addon, surface, addon);
scene_buffer_unmark_client_buffer(surface->buffer);
wlr_addon_finish(&surface->addon);
wl_list_remove(&surface->output_enter.link);
......