| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of creating a dummy framebuffer allocation just so we can setup
crtc modes during display_setup we now wait until the first swap_buffers
request before setting up the crtc modes.
This patch also adds a cogl_kms_display_queue_modes_reset() function
that allows developers to explicitly queue a reset of the crtc modes.
The idea is that applications that handle VT switching can use this for
VT enter events to explicitly ensure their mode is restored since modes
are often not automatically restored correctly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for mirroring the display output on two KMS
connectors.
This patch also checks for a number of environment variables that can
influence how KMS is configured. The following variables can be set:
COGL_KMS_MIRROR: If this is set to anything then Cogl will try and setup
two connectors with the same resolution so that onscreen frame buffers
can be mirrored.
COGL_KMS_CONNECTOR0: This can be set to an integer identifier for a
specific KMS connector id to use for the first output.
COGL_KMS_CONNECTOR0_MODE: Can be set to a mode name like "1024x768"
explicitly select what mode should be used for the first output.
If COGL_KMS_MIRROR is set then COGL_KMS_CONNECTOR1 and
COGL_KMS_CONNECTOR1_MODE can optionally be set to specify a connector id
and mode name for the second output.
|
|
|
|
|
| |
If we failed to save any crtc state then we skip trying to restore the
old state at cleanup.
|
|
|
|
|
|
| |
This adds a cogl_kms_renderer_get_drm_fd() function that lets developers
access the drm file descriptor being used for controlling the kernel
mode setting.
|
|
|
|
|
| |
The recent patch to add an api for explicitly constraining how a
renderer backend is chosen had a typo which this patch fixes.
|
|
|
|
|
|
|
|
| |
When creating a texture from a wayland buffer we create an intermediate
EGLImage that we then create a GL texture from, but we were never
destroying that EGLImage. This patch ensures we destroy the image right
after we've created the texture so we don't leak a reference to the
underlying buffer.
|
|
|
|
|
|
| |
until we have a mechanism to determine if a buffer has an alpha
component we consider all buffers to be RGB otherwise RGBX buffers with
a junk X component can cause blending artefacts.
|
|
|
|
|
|
|
|
| |
The KMS EGL platform now notifies when a swap is complete. The
notification is delayed until the application calls
cogl_context_dispatch. The GLX backend doesn't currently do this but I
think that is how it should behave to make it easier for the
application to handle locks and such.
|
|
|
|
|
|
|
|
|
|
| |
Instead of having each winsys implement its own list of callbacks the
list is now just attached directly to the CoglOnscreen using code in
cogl-onscreen.c. The winsys's can invoke this list of callbacks by
calling _cogl_onscreen_notify_swap_buffers(). All of the winsys's
would probably have a very similar implementation for this anyway and
I don't think it makes much sense to try and save the cost of a list
pointer in the CoglOnscreen struct.
|
|
|
|
|
|
|
|
| |
The KMS platform now uses drmModePageFlip to present the buffer. The
main loop mechanism is used to poll for events on the DRM file
descriptor so that we notice when the page flip is complete. The
swap_buffers is throttled so that if there is a pending flip it will
block until it is complete before starting another flip.
|
|
|
|
|
|
|
|
| |
Instead of creating FBOs on the GL side, the KMS EGL platform uses the
latest changes to Mesa to create an EGL surface using a GBM surface as
the native surface type. This removes some of the special vtable hooks
that the KMS platform needed because it is now much more similar to
the other platforms.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This updates the make release-message rule to include the latest NEWS
section at the top of the release message. The release messages
currently contain a lot of boring boilerplate that I imagine very few
people are really be interested in. For someone idly following Cogl
development though it's quite possible they'd like to see a digestible
summary of what has changed in this release which is what the NEWS
section provides.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Cogl depends on glib 2.28 for g_source_get_time() so this updates the
glib dependency listed in configure.ac
|
|
|
|
|
|
| |
Cogl depends on glib 2.28 for g_source_get_time() so this patch updates
the mingw-fetch-dependencies.sh helper script to fetch the 2.28.8-1
win32 glib binaries.
|
|
|
|
|
|
|
|
|
| |
Previously we had functions named like
cogl_primitive_new_with_xyz_attributes() but at some point we renamed
them all to functions named like cogl_primitive_new_xyz() instead. This
updates the -sections.txt symbol listing to list the new names.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
|
|
|
|
|
|
| |
g_atexit has been deprecated so we simply use atexit instead now.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Resizing a wayland client framebuffer should not affect the viewport
of additional primitives drawn to that framebuffer before the next swap
buffers request nor should querying the framebuffer's width and height
be affected until the next swap buffers request completes.
This patch changes cogl_wayland_onscreen_resize() so it only saves the
new geometry as "pending" state internal to the given CoglOnscreen. Only
when cogl_framebuffer_swap_buffers() is next called will the pending
size be flushed to the wayland egl api.
|
|
|
|
|
|
| |
We've avoiding using the redundant glib typedefs such as guint, gint
gpointer etc and prefer to use the equivalent C types so this patch
removes a few uses of gint that slipped past review.
|
|
|
|
|
|
|
|
|
|
| |
This adds cogl_onscreen_template_set_swap_throttled() api that allows
developers to specify their preference for swap buffer throttling
up-front as part of the onscreen template that is used to create a
CoglDisplay when initializing Cogl. This is desirable because some
platforms may not support configuring swap throttling on a per
framebuffer basis and also since applications often want to apply the
same policy to all onscreen framebuffers anyway.
|
|
|
|
|
|
|
|
| |
We are in the process of removing all _EXP suffix mangling for
experimental APIs (Ref: c6528c4b6c3c34) and adding missing gtk-doc
comments so that we can instead rely on the "Stability: unstable"
markers in the gtk-doc comments. This patch tackles the matrix api
symbols.
|
|
|
|
|
|
|
|
| |
We are in the process of removing all _EXP suffix mangling for
experimental APIs (Ref: c6528c4b6c3c34) and adding missing gtk-doc
comments so that we can instead rely on the "Stability: unstable"
markers in the gtk-doc comments. This patch tackles the snippet api
symbols.
|
|
|
|
|
|
|
|
| |
We are in the process of removing all _EXP suffix mangling for
experimental APIs (Ref: c6528c4b6c3c34) and adding missing gtk-doc
comments so that we can instead rely on the "Stability: unstable"
markers in the gtk-doc comments. This patch tackles the cogl framebuffer
symbols.
|
|
|
|
|
|
|
| |
We are in the process of removing all _EXP suffix mangling for
experimental APIs (Ref: c6528c4b6c3c34) and adding missing gtk-doc
comments so that we can instead rely on the "Stability: unstable"
markers in the gtk-doc comments. This patch tackles the cogl.h symbols.
|
|
|
|
|
|
|
|
| |
We are in the process of removing all _EXP suffix mangling for
experimental APIs (Ref: c6528c4b6c3c34) and adding missing gtk-doc
comments so that we can instead rely on the "Stability: unstable"
markers in the gtk-doc comments. This patch tackles the onscreen
framebuffer api symbols.
|
|
|
|
|
|
|
|
| |
We are in the process of removing all _EXP suffix mangling for
experimental APIs (Ref: c6528c4b6c3c34) and adding missing gtk-doc
comments so that we can instead rely on the "Stability: unstable"
markers in the gtk-doc comments. This patch tackles the cogl-pipeline
symbols.
|
|
|
|
|
|
|
|
| |
It proved to be inconvenient that we had a special CoglVector3 typedef
for vectors instead of just accepting pointers to float arrays because
you'd so often end up having to make awkward casts from another vector
type into a CoglVector3 and then cast back again. We're hoping that
taking float pointers instead will lead to less unnecessary casting.
|
|
|
|
|
|
|
|
| |
We are in the process of removing all _EXP suffix mangling for
experimental APIs (Ref: c6528c4b6c3c34) and adding missing gtk-doc
comments so that we can instead rely on the "Stability: unstable"
markers in the gtk-doc comments. This patch tackles the symbols in
cogl-renderer.h.
|
|
|
|
|
|
|
| |
This allows applications to specify certain constraints that feed into
the process of selecting a CoglRenderer backend. For example
applications might depend on x11 for handling input and so they require
a backend that's also based on x11.
|
|
|
|
|
| |
This updates cogl-info to use cogl_renderer_get_winsys_id() so it can
print out the name of the chosen renderer winsys.
|
|
|
|
|
|
| |
The shm buffer format enum values were renamed and the explicitly
premultiplied format was dropped since it's now assumed if the buffer
has an alpha component then it's premultiplied.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This function will call into the Wayland EGL platform API and resize the
surface that the window is using and update the internal dimensions for
framebuffer and viewport to reflect the change.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
If the swap buffers notify mechanism is advertised then the crate
example will now register a callback for it and call g_poll with the
proper timeout from cogl_context_begin_idle instead of trying to
repaint continuously.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Previously the swap event notification feature was only accessible as
a winsys feature using the semi-internal
cogl_clutter_winsys_has_feature. This just adds a feature ID for it so
it can also be accessed via cogl_has_feature.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
| |
"Install" the "new" cogl-glib-source.h and cogl-poll.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Originally we decided to use #define tricks to rename all experimental
symbols so that they had an _EXP suffix so it would be a bit clearer for
those wanting to check for ABI changes that they shouldn't worry about
these experimental symbols.
We feel now though that the defines are a bit more hassle than they are
really worth, since they are one extra thing to remember when coding,
they make using gdb slightly more awkward since you have to use the real
symbol name to set breakpoints and we already have a mechanism for
declaring symbols as experimental via gtk-doc that can be used by anyone
wanting to check for ABI changes.
Instead of just using a script to remove all the #defines we are going
to go through them manually because we need to make sure the symbols
are marked as unstable via gtk-doc. This patch does a first batch of
define removals and in fact some of the symbols didn't have any
documentation at all so that needed to be added too.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
|
|
|
|
|
|
|
| |
This adds a cogl_sub_texture_get_parent getter for the parent of a
CoglSubTexture.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This workaround code has just been incrementally carried forward since
Cogl was integrated with Clutter but really we have no idea when this
code path was ever tested. Since the work around is from before the time
of the current Cogl developers we don't know anything about the
circumstances which led to this extreme workaround instead of pushing to
fix a driver.
It seems pretty likely we can push to fix any drm based drivers so
we're removing the workaround.
https://bugzilla.gnome.org/show_bug.cgi?id=667009
Reviewed-by: Neil Roberts <neil@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC will define __ARM_ARCH_4T__ when building with "-march=armv4t" so we
can check this to turn off the use of 'clz' instructions, which
otherwise would cause compile errors like "selected processor does not
support ARM mode `clz r3,r0'".
Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The aim is that it should be a requirement that all Cogl applications
hook their mainloops into Cogl so we should lead by examples. Most of
the examples now just call cogl_poll_get_info and then g_poll with a
zero timeout so that they can continue to constantly redraw.
The SDL example is a bit special because SDL makes it very difficult
to wait on either a timeout or any file descriptors. The SDL winsys is
documented not to require blocking on any file descriptors so we can
ignore that. It implements the timeout by adding an SDL timer which
pushes an event to the queue to wake up SDL_GetEvent.
The Cogland example was already using the glib main loop so that one
has been updated to add the CoglGLibSource to it.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The GSource is created using cogl_glib_source_new which takes a
pointer to a CoglContext. The source calls cogl_poll_get_info() in its
prepare function and cogl_poll_dispatch() in its dispatch
function. The poll FDs on the source are updated according to what
Cogl reports.
The header is only included and the source only compiled if Cogl is
configured with GLib support.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we relied on the application to send all X events through
Cogl using cogl_xlib_renderer_handle_event. This breaks the
abstraction that an application shouldn't need to know what winsys
Cogl is using. Now that we have main loop integreation in Cogl, the
Xlib-based winsys's can report that Cogl needs to block on the file
descriptor of the X connection and it can manually handle the
events.
The event retrieval can be disabled by an application if it calls the
new cogl_xlib_renderer_set_event_retrieval_enabled() function. The
event retrieval will also automatically be disabled if the application
sets a foreign display.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds two new functions:
void
cogl_poll_get_info (CoglContext *context,
CoglPollFD **poll_fds,
int *n_poll_fds,
gint64 *timeout);
void
cogl_poll_dispatch (CoglContext *context,
const CoglPollFD *poll_fds,
int n_poll_fds);
The application is expected to call the first function whenever it is
about to block to go idle, and the second function whenever it comes
out of idle. This gives Cogl winsys's the ability poll file
descriptors for events. For example when handing swap complete
notifications, it can report that it needs to block on a file
descriptor.
The two functions are backed by winsys virtual functions. There are
currently no implementations. The default handler for get_info just
reports no file descriptors and an infinite timeout.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
|
|
| |
This was missing from the CoglContext header.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|