~glmark2-dev/glmark2/trunk

« back to all changes in this revision

Viewing changes to src/native-state-wayland.cpp

  • Committer: Alexandros Frantzis
  • Author(s): Rafał Mielniczuk, Rafal Mielniczuk
  • Date: 2013-09-04 16:42:26 UTC
  • Revision ID: alexandros.frantzis@canonical.com-20130904164226-dapyxh1xyjnihd4f
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

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
    if (window_) {
55
55
        if (window_->shell_surface)
56
56
            wl_shell_surface_destroy(window_->shell_surface);
 
57
        if (window_->opaque_reqion)
 
58
            wl_region_destroy(window_->opaque_reqion);
57
59
        if (window_->surface)
58
60
            wl_surface_destroy(window_->surface);
59
61
        if (window_->native)
233
235
        window_->native = wl_egl_window_create(window_->surface,
234
236
                                               properties.width, properties.height);
235
237
    }
 
238
 
 
239
    window_->opaque_reqion = wl_compositor_create_region(display_->compositor);
 
240
    wl_region_add(window_->opaque_reqion, 0, 0,
 
241
                  window_->properties.width,
 
242
                  window_->properties.height);
 
243
    wl_surface_set_opaque_region(window_->surface, window_->opaque_reqion);
 
244
 
236
245
    window_->shell_surface = wl_shell_get_shell_surface(display_->shell,
237
246
                                                        window_->surface);
238
247