mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
d0944b8fbd
This adds a callback that can be registered with cogl_onscreen_add_dirty_callback which will get called whenever the window system determines that the contents of the window is dirty and needs to be redrawn. Under the two X-based winsys's, this is reported off the back of the Expose events, under SDL it is reported from SDL_VIDEOEXPOSE or SDL_WINDOWEVENT_EXPOSED and under Windows from the WM_PAINT messages. The Wayland winsys doesn't really have the concept of dirtying the buffer but in order to allow applications to work the same way on all platforms it will emit the event when the surface is first shown and whenever it is resized. There is a private feature flag to specify whether dirty events are supported. If the winsys does not set this then Cogl will simulate dirty events by emitting one when the window is first allocated and when it is resized. The only winsys's that don't set this flag are things like KMS or the EGL null winsys where there is no windowing system and showing and hiding the onscreen doesn't really make any sense. In that case Cogl can assume the buffer will only become dirty once when it is first allocated. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 85c5a9ba419b2247bd768284c79ee69164a0c098) Conflicts: cogl/cogl-private.h |
||
---|---|---|
.. | ||
cogl | ||
cogl-2.0-experimental | ||
Makefile.am |