Merge lp:~kruk87/glmark2/wayland-opaque-region into lp:glmark2/2011.11

Proposed by Rafal Mielniczuk
Status: Merged
Merged at revision: 283
Proposed branch: lp:~kruk87/glmark2/wayland-opaque-region
Merge into: lp:glmark2/2011.11
Diff against target: 38 lines (+10/-0)
2 files modified
src/native-state-wayland.cpp (+9/-0)
src/native-state-wayland.h (+1/-0)
To merge this branch: bzr merge lp:~kruk87/glmark2/wayland-opaque-region
Reviewer Review Type Date Requested Status
Alexandros Frantzis Approve
Review via email: mp+183931@code.launchpad.net

Description of the change

NativeStateWayland: make wayland window opaque

We need to make window opaque in order to prevent redrawing background
behind it in some of the benchmarks, eg. jellyfish.

https://bugs.launchpad.net/glmark2/+bug/1219764

To post a comment you must log in.
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Applied in lp:glmark2 r283.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/native-state-wayland.cpp'
2--- src/native-state-wayland.cpp 2013-08-06 22:18:53 +0000
3+++ src/native-state-wayland.cpp 2013-09-04 16:59:03 +0000
4@@ -54,6 +54,8 @@
5 if (window_) {
6 if (window_->shell_surface)
7 wl_shell_surface_destroy(window_->shell_surface);
8+ if (window_->opaque_reqion)
9+ wl_region_destroy(window_->opaque_reqion);
10 if (window_->surface)
11 wl_surface_destroy(window_->surface);
12 if (window_->native)
13@@ -233,6 +235,13 @@
14 window_->native = wl_egl_window_create(window_->surface,
15 properties.width, properties.height);
16 }
17+
18+ window_->opaque_reqion = wl_compositor_create_region(display_->compositor);
19+ wl_region_add(window_->opaque_reqion, 0, 0,
20+ window_->properties.width,
21+ window_->properties.height);
22+ wl_surface_set_opaque_region(window_->surface, window_->opaque_reqion);
23+
24 window_->shell_surface = wl_shell_get_shell_surface(display_->shell,
25 window_->surface);
26
27
28=== modified file 'src/native-state-wayland.h'
29--- src/native-state-wayland.h 2013-08-06 22:18:53 +0000
30+++ src/native-state-wayland.h 2013-09-04 16:59:03 +0000
31@@ -106,6 +106,7 @@
32 struct my_window {
33 WindowProperties properties;
34 struct wl_surface *surface;
35+ struct wl_region *opaque_reqion;
36 struct wl_egl_window *native;
37 struct wl_shell_surface *shell_surface;
38 } *window_;

Subscribers

People subscribed via source and target branches