mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1890074 [Wayland] Set client wayland buffer size r=emilio
With wayland protocol 1.23 we can incerease buffer for wayland events on client side as a counterpart of wl_display_set_default_max_buffer_size() on server side. Let's use the same values as mutter uses, i.e. 1M buffer size for events. Differential Revision: https://phabricator.services.mozilla.com/D224739
This commit is contained in:
parent
c3156846d5
commit
3f9cb0ceab
@ -230,6 +230,9 @@ MOZ_EXPORT struct wl_display* gdk_wayland_display_get_wl_display(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MOZ_EXPORT void wl_display_set_max_buffer_size(struct wl_display* display,
|
||||
size_t max_buffer_size) {}
|
||||
|
||||
MOZ_EXPORT struct xkb_context* xkb_context_new(enum xkb_context_flags flags) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -38,6 +38,8 @@ MOZ_EXPORT struct wl_proxy* wl_proxy_marshal_flags(
|
||||
MOZ_EXPORT void wl_proxy_destroy(struct wl_proxy* proxy);
|
||||
MOZ_EXPORT void* wl_proxy_create_wrapper(void* proxy);
|
||||
MOZ_EXPORT void wl_proxy_wrapper_destroy(void* proxy_wrapper);
|
||||
MOZ_EXPORT void wl_display_set_max_buffer_size(struct wl_display* display,
|
||||
size_t max_buffer_size);
|
||||
|
||||
#ifndef WL_MARSHAL_FLAG_DESTROY
|
||||
# define WL_MARSHAL_FLAG_DESTROY (1 << 0)
|
||||
|
@ -51,6 +51,11 @@ nsWaylandDisplay* WaylandDisplayGet() {
|
||||
if (!waylandDisplay) {
|
||||
return nullptr;
|
||||
}
|
||||
// We're setting Wayland client buffer size here (i.e. our write buffer).
|
||||
// Server buffer size is set by compositor and we may use the same buffer
|
||||
// sizes on both sides. Mutter uses 1024 * 1024 (1M) so let's use the same
|
||||
// value.
|
||||
wl_display_set_max_buffer_size(waylandDisplay, 1024 * 1024);
|
||||
gWaylandDisplay = new nsWaylandDisplay(waylandDisplay);
|
||||
}
|
||||
return gWaylandDisplay;
|
||||
|
Loading…
Reference in New Issue
Block a user