Commit Graph

10 Commits

Author SHA1 Message Date
Owen W. Taylor
b248941af5 Add clutter_stage_set_sync_delay()
New experimental API is added to allow changing the way that redraws
are timed for a stage to include a "sync delay" - a period after
the vertical blanking period where Clutter simply waits for updates.

In detail, the algorithm is that when the master clock is restarted
after drawing a frame (in the case where there are timelines running)
or started fresh in response to a queued redraw or relayout, the
start is scheduled at the next sync point (sync_delay ms after the
predicted vblank period) rather than done immediately.

https://bugzilla.gnome.org/show_bug.cgi?id=692901
2013-02-13 09:27:17 -05:00
Adel Gadllah
b9ad93ad8d stage-cogl: Reuse backbuffer contents
Use the buffer_age extension when available to recycle backbuffer contents
instead of blitting from the back to front buffer when doing clipped redraws.

The picking is now done in a pixel that is going to be repaired during the next
redraw cycle for non static scences.

This should improve performance and avoid tearing.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=669122
2013-02-06 18:21:27 +01:00
Adel Gadllah
60f20e8a7e stage-window: make it possible to damage the back buffer
This allows us to report to the backend that the stage's back buffer has been trashed
while handling picking. If the backend is keeping track of the contents of back buffers
so it can minimize how much of the stage is redrawn then it needs to know when we do pick
renders so it can invalidate the back buffer.

Based on patch from Robert Bragg <robert@linux.intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=669122
2013-02-06 18:20:49 +01:00
Emmanuele Bassi
5c9cafb411 cogl/backend: Remove the ClutterBackendCogl class
All the functionality that ClutterBackendCogl provided has been moved
into ClutterBackend itself, so there is no need to have this class
around in the source.

Cogl-based backends can derive directly from ClutterBackend.
2011-11-10 14:55:03 +00:00
Emmanuele Bassi
405e72f2e4 egl: First attempt at cleaning up the EGL native backend
At least, let's make it compile when built along with the other
backends. In reality, it still needs to be verified as working.
2011-11-03 13:45:20 +00:00
Giovanni Campagna
9c102b7c51 Rework the interaction between the Cogl and GDK / X11 backends.
Previously, the Cogl backend was at times a subclass of the X11
backend, and at times a standalone one. Now it is the other way
round, with GDK and X11 backends providing the concrete classes,
layered on top of the generic Cogl backend. A new EglNative backend
was introduced for direct to framebuffer rendering. This greatly
simplifies the API design (at the expense of some casts needed)
and reduces the amount of #ifdefs, without duplicating code.

https://bugzilla.gnome.org/show_bug.cgi?id=657434
2011-11-03 13:45:17 +00:00
Giovanni Campagna
610a9c17ba Add a new GDK backend
This commit introduces a new flavour for Clutter, that uses GDK
for handling all window system specific interactions (except for
creating the cogl context, as cogl does not know about GDK), including
in particular events. This is not compatible with the X11 (glx)
flavour, and this is reflected by the different soname (libclutter-gdk-1.0.so),
as all X11 specific functions and classes are not available. If you
wish to be compatible, you should check for CLUTTER_WINDOWING_X11.
Other than that, this backend should be on feature parity with X11,
including XInput 2, XSettings and EMWH (with much, much less code)

https://bugzilla.gnome.org/show_bug.cgi?id=657434
2011-11-03 13:42:13 +00:00
Emmanuele Bassi
1776ac8ed5 Remove internal usage of ClutterGeometry in StageWindow
The ClutterGeometry type is a poor substitute of cairo_rectangle_int_t,
with unsigned integers for width and height to complicate matters.

Let's remove the internal usage of ClutterGeometry and switch to the
rectangle type from Cairo.

https://bugzilla.gnome.org/show_bug.cgi?id=656663
2011-09-26 12:05:55 +01:00
Neil Roberts
a72237b876 clutter-stage: Add clutter_stage_get_redraw_clip_bounds
This adds a public function to get the bounds of the current clipped
redraw on a stage. This should only be called while the stage is being
painted. The function diverts to a virtual function on the
ClutterStageWindow implementation. If the function isn't implemented
or it returns FALSE then the entire stage is reported. The clip bounds
are in integer pixel coordinates in the stage's coordinate space.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2421
2011-07-13 13:54:50 +01:00
Robert Bragg
2d8083bab8 unify egl and glx backends as "cogl" backend
Since GLX and EGL are abstracted by Cogl the two backends are both
implementing everything using the Cogl API and they are almost
identical.

This updates the egl backend to support everything that the glx backend
supports. Now that EGL and GLX are abstracted by Cogl, the plan is that
we will squash the clutter-egl/glx backends into one. Since the EGL
backend in clutter can conditionally not depend on X11 we will use the
EGL backend as the starting point of our common backend.

https://bugzilla.gnome.org/show_bug.cgi?id=649826
2011-06-14 20:35:18 +01:00