pub fn swap_buffers_with_damage(&self, rectangles: &[i32], n_rectangles: i32) {
        unsafe {
            ffi::cogl_onscreen_swap_buffers_with_damage(
                self.to_glib_none().0,
                rectangles.as_ptr(),
                n_rectangles,
            );
        }
    }
/// Swaps the current back buffer being rendered too, to the front for
/// display and provides information to any system compositor about
/// what regions of the buffer have changed (damage) with respect to
/// the last swapped buffer.
///
/// This function has the same semantics as
/// `cogl_framebuffer_swap_buffers` except that it additionally allows
/// applications to pass a list of damaged rectangles which may be
/// passed on to a compositor so that it can minimize how much of the
/// screen is redrawn in response to this applications newly swapped
/// front buffer.
///
/// For example if your application is only animating a small object in
/// the corner of the screen and everything else is remaining static
/// then it can help the compositor to know that only the bottom right
/// corner of your newly swapped buffer has really changed with respect
/// to your previously swapped front buffer.
///
/// If `n_rectangles` is 0 then the whole buffer will implicitly be
/// reported as damaged as if `Onscreen::swap_buffers` had been
/// called.
///
/// This function also implicitly discards the contents of the color,
/// depth and stencil buffers as if `Framebuffer::discard_buffers`
/// were used. The significance of the discard is that you should not
/// expect to be able to start a new frame that incrementally builds on
/// the contents of the previous frame. If you want to perform
/// incremental updates to older back buffers then please refer to the
/// `Onscreen::get_buffer_age` api.
///
/// Whenever possible it is recommended that applications use this
/// function instead of `Onscreen::swap_buffers` to improve
/// performance when running under a compositor.
///
/// `<note>`It is highly recommended to use this API in conjunction with
/// the `Onscreen::get_buffer_age` api so that your application can
/// perform incremental rendering based on old back buffers.`</note>`
/// ## `rectangles`
/// An array of integer 4-tuples representing damaged
///  rectangles as (x, y, width, height) tuples.
/// ## `n_rectangles`
/// The number of 4-tuples to be read from `rectangles`
Swaps the current back buffer being rendered too, to the front for
display and provides information to any system compositor about
what regions of the buffer have changed (damage) with respect to
the last swapped buffer.

This function has the same semantics as
`cogl_framebuffer_swap_buffers` except that it additionally allows
applications to pass a list of damaged rectangles which may be
passed on to a compositor so that it can minimize how much of the
screen is redrawn in response to this applications newly swapped
front buffer.

For example if your application is only animating a small object in
the corner of the screen and everything else is remaining static
then it can help the compositor to know that only the bottom right
corner of your newly swapped buffer has really changed with respect
to your previously swapped front buffer.

If `n_rectangles` is 0 then the whole buffer will implicitly be
reported as damaged as if `Onscreen::swap_buffers` had been
called.

This function also implicitly discards the contents of the color,
depth and stencil buffers as if `Framebuffer::discard_buffers`
were used. The significance of the discard is that you should not
expect to be able to start a new frame that incrementally builds on
the contents of the previous frame. If you want to perform
incremental updates to older back buffers then please refer to the
`Onscreen::get_buffer_age` api.

Whenever possible it is recommended that applications use this
function instead of `Onscreen::swap_buffers` to improve
performance when running under a compositor.


Swaps the current back buffer being rendered too to the front for display and provides information to any system compositor about what regions of the buffer have changed ( damage ) with respect to the last swapped buffer . This function has the same semantics as ` cogl_framebuffer_swap_buffers ` except that it additionally allows applications to pass a list of damaged rectangles which may be passed on to a compositor so that it can minimize how much of the screen is redrawn in response to this applications newly swapped front buffer . For example if your application is only animating a small object in the corner of the screen and everything else is remaining static then it can help the compositor to know that only the bottom right corner of your newly swapped buffer has really changed with respect to your previously swapped front buffer . If ` n_rectangles ` is 0 then the whole buffer will implicitly be reported as damaged as if ` Onscreen :: swap_buffers ` had been called . This function also implicitly discards the contents of the color depth and stencil buffers as if ` Framebuffer :: discard_buffers ` were used . The significance of the discard is that you should not expect to be able to start a new frame that incrementally builds on the contents of the previous frame . If you want to perform incremental updates to older back buffers then please refer to the ` Onscreen :: get_buffer_age ` api . Whenever possible it is recommended that applications use this function instead of ` Onscreen :: swap_buffers ` to improve performance when running under a compositor .
pub fn swap_buffers_with_damage(&self, rectangles: &[i32], n_rectangles: i32) {
        unsafe {
            ffi::cogl_onscreen_swap_buffers_with_damage(
                self.to_glib_none().0,
                rectangles.as_ptr(),
                n_rectangles,
            );
        }
    }
pub fn swap_buffers_with_damage ( & self , rectangles : & [ i32 ] , n_rectangles : i32 ) { unsafe { ffi :: cogl_onscreen_swap_buffers_with_damage ( self . to_glib_none ( ) . 0 , rectangles . as_ptr ( ) , n_rectangles , ) ; } }
Swaps the current back buffer being rendered too, to the front for
display and provides information to any system compositor about
what regions of the buffer have changed (damage) with respect to
the last swapped buffer.
Swaps the current back buffer being rendered too to the front for display and provides information to any system compositor about what regions of the buffer have changed ( damage ) with respect to the last swapped buffer .
&self
rectangles
&[i32]
n_rectangles
i32
&self
rectangles
&[i32]
n_rectangles
i32
`rectangles`
An array of integer 4-tuples representing damaged
rectangles as (x, y, width, height) tuples.
An array of integer 4 - tuples representing damaged rectangles as ( x y width height ) tuples .
`n_rectangles`
The number of 4-tuples to be read from `rectangles`
The number of 4 - tuples to be read from ` rectangles `