mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05: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-texture-pixmap-x11-private.h | ||
cogl-texture-pixmap-x11.c | ||
cogl-texture-pixmap-x11.h | ||
cogl-winsys-egl-android-private.h | ||
cogl-winsys-egl-android.c | ||
cogl-winsys-egl-feature-functions.h | ||
cogl-winsys-egl-gdl-private.h | ||
cogl-winsys-egl-gdl.c | ||
cogl-winsys-egl-kms-private.h | ||
cogl-winsys-egl-kms.c | ||
cogl-winsys-egl-null-private.h | ||
cogl-winsys-egl-null.c | ||
cogl-winsys-egl-private.h | ||
cogl-winsys-egl-wayland-private.h | ||
cogl-winsys-egl-wayland.c | ||
cogl-winsys-egl-x11-private.h | ||
cogl-winsys-egl-x11.c | ||
cogl-winsys-egl.c | ||
cogl-winsys-glx-feature-functions.h | ||
cogl-winsys-glx-private.h | ||
cogl-winsys-glx.c | ||
cogl-winsys-private.h | ||
cogl-winsys-sdl2.c | ||
cogl-winsys-sdl-private.h | ||
cogl-winsys-sdl.c | ||
cogl-winsys-stub-private.h | ||
cogl-winsys-stub.c | ||
cogl-winsys-wgl-feature-functions.h | ||
cogl-winsys-wgl-private.h | ||
cogl-winsys-wgl.c | ||
cogl-winsys.c |