[gtk+] wayland: Scale up wl_egl_window according to window scale
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Scale up wl_egl_window according to window scale
- Date: Wed, 25 Feb 2015 01:28:04 +0000 (UTC)
commit aa81262f116d32936abc62324e170ade1fc68578
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Feb 24 17:20:22 2015 +0800
wayland: Scale up wl_egl_window according to window scale
In order to support window scales for EGL windows, resize the
wl_egl_window to the window dimension multiplied with the window scale,
just as with SHM window buffers.
https://bugzilla.gnome.org/show_bug.cgi?id=745076
gdk/wayland/gdkwindow-wayland.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 547aca5..b5f048a 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -181,7 +181,13 @@ gdk_wayland_window_update_size (GdkWindow *window,
impl->scale = scale;
if (impl->egl_window)
- wl_egl_window_resize (impl->egl_window, width, height, 0, 0);
+ {
+ wl_egl_window_resize (impl->egl_window,
+ width * scale,
+ height * scale,
+ 0, 0);
+ wl_surface_set_buffer_scale (impl->surface, scale);
+ }
area.x = 0;
area.y = 0;
@@ -2262,8 +2268,9 @@ gdk_wayland_window_get_wl_egl_window (GdkWindow *window)
{
impl->egl_window =
wl_egl_window_create(impl->surface,
- impl->wrapper->width,
- impl->wrapper->height);
+ impl->wrapper->width * impl->scale,
+ impl->wrapper->height * impl->scale);
+ wl_surface_set_buffer_scale (impl->surface, impl->scale);
}
return impl->egl_window;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]