Robert Bragg [Wed, 30 Jun 2010 10:23:16 +0000 (11:23 +0100)]
backend: fix double free of priv->font_name
If the backend was disposed then priv->font_name would be freed but not
set to NULL and so if clutter_backend_get_font_name was then called it
would double free priv->font_name.
Emmanuele Bassi [Wed, 30 Jun 2010 12:26:32 +0000 (13:26 +0100)]
build: Redirect xsltproc to a directory
Apparently, xsltproc recognizes a directory if it has a '/' at the end
of its path, and not by doing the sensible thing and stat()'ing the
argument for the --output option.
Emmanuele Bassi [Wed, 30 Jun 2010 11:53:20 +0000 (12:53 +0100)]
Post-release version bump to 1.3.7
Emmanuele Bassi [Wed, 30 Jun 2010 10:18:36 +0000 (11:18 +0100)]
Release 1.3.6
Emmanuele Bassi [Wed, 30 Jun 2010 11:40:38 +0000 (12:40 +0100)]
Revert "build: Enable the cookbook on distcheck"
The cookbook fails the distcheck phase, so we'll need to investigate
this a little bit more.
This reverts commit
f2361a65de090dfe8aa05534cb9bc1c760555084.
Emmanuele Bassi [Wed, 30 Jun 2010 10:55:52 +0000 (11:55 +0100)]
build: Distcheck fixes
Emmanuele Bassi [Wed, 30 Jun 2010 10:55:16 +0000 (11:55 +0100)]
docs: Disable manual
The manual never really took off, so we just ship it in the tarballs but
we don't build it.
Emmanuele Bassi [Wed, 30 Jun 2010 10:30:45 +0000 (11:30 +0100)]
docs: Various fixes
Neil Roberts [Wed, 23 Jun 2010 16:17:40 +0000 (17:17 +0100)]
test-cogl-path: Add tests for changing the fill rule
This creates a path with an outer clockwise and two internal sub
paths, one clockwise and one counter-clockwise. The path is then
painted twice, once with each fill rule.
Neil Roberts [Wed, 23 Jun 2010 12:40:43 +0000 (13:40 +0100)]
cogl-path: Allow changing the fill rule
This adds two new API calls- cogl_path_set_fill_rule and
cogl_path_get_fill_rule. This allows modifying the fill rule of the
current path. In addition to the previous default fill rule of
'even-odd' it now supports the 'non-zero' rule. The fill rule is a
property of the path (not the Cogl context) so creating a new path or
preserving a path with cogl_path_get_handle affects the fill rule.
Neil Roberts [Mon, 19 Apr 2010 10:24:24 +0000 (11:24 +0100)]
cogl-debug: Remove the force-scanline-paths option
The scanline path rasterizer has been removed because the paths can be
drawn with the tesselator instead. The option therefore no longer does
anything.
Neil Roberts [Thu, 15 Apr 2010 22:56:46 +0000 (23:56 +0100)]
cogl-path: Use the GLU tesselator to draw paths
Instead of drawing paths using the stencil buffer trick, it now
tesselates the path into triangles using the GLU tesselator and
renders them directly. A vbo is created with one vertex for each node
on the path. The tesselator is used to generate a series of indices
into the vbo as triangles. The tesselator's output of strips and fans
is converted into GL_TRIANGLES so that it can be rendered with a
single draw call (but the vertices are still shared via the
indices). The vbo is stored with the path so that if the application
uses retained paths then Cogl won't have to tessellate again.
The vertices also have texture coordinates associated with them so
that it can replicate the old behaviour of drawing a material with a
texture by fitting the texture to the bounding box of the path and
then clipping it. However if the texture contains waste or is sliced
then the vertex buffer code will refuse to draw it. In this case it
will revert back to drawing the path into the stencil buffer and then
drawing the material as a clipped quad.
The VBO is used even when setting up the stencil buffer for clipping
to a path because the tessellated geometry may cover less area.
The old scanline rasterizer has been removed because the tesselator
should work equally well on drivers with no stencil buffer.
Neil Roberts [Thu, 15 Apr 2010 23:28:15 +0000 (00:28 +0100)]
cogl: Pull in the code for GLU tesselator from Mesa/SGI
This copies the files for the GLU tesselator from Mesa. The Mesa code
is based on the original SGI code and is released under a BSD license.
The memalloc.h header has been replaced with one that forces the code
to use g_malloc and friends. The rest of the files are not altered
from the original so it should be possible to later upgrade the files
by simply overwriting them.
There is a tesselator.h header which is expected to be included by
rest of Cogl to use the tesselator. This contains a trimmed down
version of glu.h that only includes parts that pertain to the
tesselator. There is also a stub glu.h in the GL directory which is
just provided so that the tesselator code can include <GL/gl.h>
without depending on the system header. It just redirects to
tesselator.h
Elliot Smith [Tue, 29 Jun 2010 14:49:40 +0000 (15:49 +0100)]
cookbook: Add a recipe for image loading
http://bugzilla.clutter-project.org/show_bug.cgi?id=2165
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Tue, 29 Jun 2010 17:05:12 +0000 (18:05 +0100)]
build: Enable the cookbook on distcheck
We want to start distributing the cookbook along with the documentation.
Emmanuele Bassi [Tue, 29 Jun 2010 17:04:52 +0000 (18:04 +0100)]
cookbook: Add acknowledgment section
And fix the URLs.
Emmanuele Bassi [Tue, 29 Jun 2010 16:57:29 +0000 (17:57 +0100)]
cookbook: Add introduction to the events section
Elliot Smith [Tue, 29 Jun 2010 16:27:54 +0000 (17:27 +0100)]
cookbook: Add recipe for key event handling
Attached patch contains a cookbook recipe about key press event
handling.
It covers both a simple approach (connecting a callback to a
key-press-event signal which manually analyses the key and
modifiers), and a more complicated one based on a binding pool.
There's also some discussion of the two approaches.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2162
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Elliot Smith [Tue, 29 Jun 2010 16:26:55 +0000 (17:26 +0100)]
cookbook: Add recipe for scaling images with :keep-aspect-ratio
The cookbook contains a commented-out recipe covering scaling images
inside a texture while retaining their aspect ratio; the attached
patch fleshes out this recipe.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2163
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Colin Walters [Tue, 29 Jun 2010 15:25:18 +0000 (16:25 +0100)]
autogen.sh: Support NOCONFIGURE, like gnome-common
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Chris Lord [Tue, 29 Jun 2010 14:30:25 +0000 (15:30 +0100)]
event: Typos in event code could cause crashes
A typo in clutter-event.c meant that the wrong struct location could be
used for the input device of key events. Also, a typo in the X11 event
code meant that key-presses would come from the pointer device (releases
would still come from the keyboard device).
Emmanuele Bassi [Mon, 28 Jun 2010 16:18:35 +0000 (17:18 +0100)]
bind-constraint: Add width and height binding
Allow using the BindConstraint to bind width and height of a source
actor.
Also, add a test for the BindConstraint showing all types of usages
for this constraint class.
Neil Roberts [Mon, 28 Jun 2010 14:25:19 +0000 (15:25 +0100)]
cogl: Add const to some pointer arguments
Some of the arguments to the material and path functions were taking a
pointer to a CoglColor or an array of floats that was not intended to
be written to but were not marked with const.
Emmanuele Bassi [Mon, 28 Jun 2010 09:43:13 +0000 (10:43 +0100)]
text: Use the ::settings-changed signal
Instead of the ::font-changed one.
Emmanuele Bassi [Mon, 28 Jun 2010 09:32:54 +0000 (10:32 +0100)]
x11: Add XSETTINGS watcher
If we want to be able to get live notification of system settings
changes, we need watch the window that the XSETTINGS client conjures
up for us.
Emmanuele Bassi [Sat, 26 Jun 2010 22:05:36 +0000 (23:05 +0100)]
text: Document and annotate :font-name for NULL values
Update the documentation of :font-name, to make it clear that by setting
it to NULL the Text actor will use the default font.
Also, set the annotation for the @font_name argument of the setter to be
allow-none, and allow passing NULL through bindings.
Emmanuele Bassi [Sat, 26 Jun 2010 14:49:15 +0000 (15:49 +0100)]
text: Update actors using the default font
If a ClutterText actor is using the default font from the backend then
we should track font name changes and update it accordingly. This only
applies to ClutterText actors with the :font-name property unset or
explicitly set to NULL.
Emmanuele Bassi [Sat, 26 Jun 2010 14:42:31 +0000 (15:42 +0100)]
clutter.modules: Update with the gdk-pixbuf split
Gdk-Pixbuf has been split back into its own module once again. This
means that Clutter doesn't have a build requirement on gtk+ any more.
Emmanuele Bassi [Sat, 26 Jun 2010 12:51:06 +0000 (13:51 +0100)]
settings: Emit Backend::font-changed
When the :font-name property changes, to maintain the invariant.
Emmanuele Bassi [Fri, 25 Jun 2010 10:41:05 +0000 (11:41 +0100)]
test-text-field: Use the system font instead of using Sans
Emmanuele Bassi [Fri, 25 Jun 2010 10:40:32 +0000 (11:40 +0100)]
Detail the font-name value in the font settings debug note
Neil Roberts [Thu, 24 Jun 2010 17:14:04 +0000 (18:14 +0100)]
clutter-event-win32: Emit multiple events for WM_MOUSEWHEEL Messages
It's possible that a single WM_MOUSEWHEEL event can arrive with a
scroll amount greater than WHEEL_DELTA. Previously it would accumulate
these amounts but it would still only emit a single event per
message. For example, if a message arrived that is worth two
WHEEL_DELTAs then it would emit one event and leave scroll_pos as
+WHEEL_DELTA. If the wheel is then scrolled in the opposite direction
then wheel delta would end up as zero and the scroll event would get
lost.
This patch fixes it so that it always emits enough events to put
scroll_pos back to less than WHEEL_DELTA.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2135
Neil Roberts [Thu, 24 Jun 2010 17:07:20 +0000 (18:07 +0100)]
clutter-event-win32: Directly enqueue events in message_translate
Previously the window procedure for the stage window would always
create a ClutterEvent struct for every message and then pass that on
to message_translate to fill in the details. message_translate could
return FALSE to abandon the event. Instead of this, message_translate
now creates and queues the event itself whenever it sees a message
that could translate to an event. The function now returns void. This
has a number of advantages:
* It saves redundantly allocating events for messages that Clutter
doesn't care about.
* A single message can now easily be translated into multiple events.
* There were some messages that were handled and did not fill in the
event struct but did not cause the function to return FALSE. I think
this would end up with a CLUTTER_NOTHING event being emitted.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2135
Øyvind Kolås [Fri, 25 Jun 2010 01:02:48 +0000 (02:02 +0100)]
state: avoid g_str_equal if a string might be NULL
Neil Roberts [Thu, 24 Jun 2010 16:33:43 +0000 (17:33 +0100)]
test-conformance: Use -export-dynamic instead of -rdynamic
The -rdynamic linker option is specific to ELF so it was breaking
builds on systems with other object formats such as Windows and
Solaris. This patch replaces that option with -export-dynamic which is
a portable libtool option which should do the right thing on each
platform.
http://bugzilla.clutter-project.org/show_bug.cgi?id=1930
Emmanuele Bassi [Thu, 24 Jun 2010 16:21:26 +0000 (17:21 +0100)]
actor: Top-levels should always report a 255 opacity
The paint opacity should always assume a fully opaque top-level at the
end, otherwise the scene would be rendered fully transparent.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2050
Emmanuele Bassi [Thu, 24 Jun 2010 16:19:36 +0000 (17:19 +0100)]
actor: Ignore the NOP paint at 0 opacity for top-levels
A top-level actor could still have 0 opacity (e.g. a Stage with the
:use-alpha property set to TRUE), but we want its children to still
be painted.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2050
Robert Bragg [Wed, 23 Jun 2010 16:10:03 +0000 (17:10 +0100)]
material: Avoid possibly reading invalid memory
in _cogl_material_prune_empty_layer_difference we sometimes unref the
given layer before dereferencing it to get a pointer to its parent. This
defers the unref until after we have fetched the parent pointer.
Øyvind Kolås [Thu, 24 Jun 2010 15:52:23 +0000 (16:52 +0100)]
state: added more documentation
Øyvind Kolås [Thu, 24 Jun 2010 01:26:46 +0000 (02:26 +0100)]
state: removed special handling of state named "default"
The "default" state used for unspecified source transitions is NULL.
Small update and some other fixes to documentation.
Alejandro Piñeiro [Wed, 14 Apr 2010 16:07:21 +0000 (18:07 +0200)]
Improve clutter_text_get_chars doc
Explicitly explain that end_pos is not included with the resulting
string
http://bugzilla.clutter-project.org/show_bug.cgi?id=2081
Elliot Smith [Thu, 24 Jun 2010 10:23:50 +0000 (11:23 +0100)]
docs: Fix example code in BindingPool
The code sample in the gtk-doc annotations for ClutterBindingPool shows
the arguments in the wrong order.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2133
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Wed, 23 Jun 2010 17:46:52 +0000 (18:46 +0100)]
doap: Update after the infrastructure changes
Emmanuele Bassi [Wed, 23 Jun 2010 17:46:38 +0000 (18:46 +0100)]
Change the Bugzilla link in the configure script
Emmanuele Bassi [Wed, 23 Jun 2010 17:43:18 +0000 (18:43 +0100)]
docs: Change the mailing list link
Neil Roberts [Wed, 23 Jun 2010 16:29:08 +0000 (17:29 +0100)]
cogl: Remove cogl-defines.h.in from the driver make files
Commit
7fae8ac051292 changed cogl-defines.h.in so there is only a
single copy in clutter/cogl/ instead of one for each driver. However
the old files were still mentioned in the EXTRA_DIST of the
Makefile.am so make distcheck was failing.
Chris Lord [Wed, 23 Jun 2010 14:53:50 +0000 (15:53 +0100)]
cogl-path: Disable texture coord arrays before drawing
It was possible that the texture co-ord arrays were left enabled during
stroking, which could possibly cause a crash.
Neil Roberts [Fri, 18 Jun 2010 10:12:51 +0000 (11:12 +0100)]
clutter-animation: Fix for using fixed:: from clutter_actor_animatev
When using clutter_actor_animatev it would set a boolean whenever a
property begins with "fixed::". However it would never clear the
variable so it would end up marking all subsequent properties as
fixed.
http://bugzilla.openedhand.com/show_bug.cgi?id=2180
http://bugzilla.clutter-project.org/show_bug.cgi?id=2149
Emmanuele Bassi [Wed, 23 Jun 2010 12:34:36 +0000 (13:34 +0100)]
Revert
7e6b60270d1951f0789868740b8df6acfe677d57
You should not commit patches based on the bugzilla description alone.
You should not commit patches based on the bugzilla description alone.
You should not commit patches based on the bugzilla description alone.
...
Emmanuele Bassi [Wed, 23 Jun 2010 12:23:19 +0000 (13:23 +0100)]
Fix the libdir in the pkg-config file
Robert Bragg [Tue, 22 Jun 2010 14:42:41 +0000 (15:42 +0100)]
texture-pixmap-x11: don't assume anything about the GLXFBConfig type
A pedantic change to get_fbconfig_for_depth() so that we don't need to
make any assumptions about the GLXFBConfig typedef or what values
we can overload to indicate an invalid config.
get_fbconfig_for_depth() now simply returns FALSE if it fails to find a
config.
Emmanuele Bassi [Tue, 22 Jun 2010 15:12:53 +0000 (16:12 +0100)]
drag-action: Disable picking during drag
While dragging we don't need to perform picking to determine the actor
underneath the pointer, for two reasons:
• we use a capture on the stage to determine the motion delta.
• we know the actor underneath the pointer because that's the
actor we are dragging around.
This change should make dragging actors in complex scenes a bit faster.
Emmanuele Bassi [Tue, 22 Jun 2010 13:43:36 +0000 (14:43 +0100)]
Silence another compiler warning
Neil Roberts [Tue, 22 Jun 2010 13:10:44 +0000 (14:10 +0100)]
cogl-texture-pixmap-x11: Use NULL instead of None for invalid GLXFBConfig
GLXFBConfigs are opaque pointers not XIDs so it doesn't make sense to
return None from get_fbconfig_for_depth. Instead it now returns NULL.
Emmanuele Bassi [Tue, 22 Jun 2010 13:05:39 +0000 (14:05 +0100)]
Add test-cogl-texture-pixmap-x11 to the ignore file
Emmanuele Bassi [Tue, 22 Jun 2010 12:48:53 +0000 (13:48 +0100)]
Silence some compiler warnings
Emmanuele Bassi [Tue, 22 Jun 2010 12:31:41 +0000 (13:31 +0100)]
docs: Fix release notes wording
Emmanuele Bassi [Tue, 22 Jun 2010 12:31:31 +0000 (13:31 +0100)]
docs: Fix links in the README
Emmanuele Bassi [Tue, 22 Jun 2010 12:29:03 +0000 (13:29 +0100)]
docs: Remove the 'copyright-waiver' section
There is no need to toggle the copyright-waiver flag on Bugzilla
any more.
Emmanuele Bassi [Tue, 22 Jun 2010 11:13:31 +0000 (12:13 +0100)]
Use -Bsymbolic-functions
The -Bsymbolic-functions linker flag allows to avoid intra-library
PLT jumps on ELF platforms. It is similar to the aliasing hack in
GLib and GTK+, but definitely less messy.
The configure script should look for the flags, in order to support
platforms/linkers that do not have it.
Emmanuele Bassi [Tue, 22 Jun 2010 10:59:07 +0000 (11:59 +0100)]
conform: Do not use deprecated API in test-clutter-units
Setting the DPI is done through the ClutterSettings:font-dpi property.
Emmanuele Bassi [Tue, 22 Jun 2010 07:29:02 +0000 (08:29 +0100)]
Do not hardcode paths in pkgconfig file
The pkgconfig file correctly sets $prefix to @prefix@, but the other
paths should be relative to $prefix.
Neil Roberts [Fri, 18 Jun 2010 17:51:15 +0000 (18:51 +0100)]
Add a test case for CoglTexturePixmapX11
Neil Roberts [Wed, 26 May 2010 17:06:39 +0000 (18:06 +0100)]
clutter-{glx,x11}-texture-pixmap: Use CoglTexturePixmapX11
The pixmap handling of both of the texture pixmap actors in Clutter is
now removed and instead it just creates a CoglTexturePixmapX11. Both
actors are now equivalent so there is no need to choose between the
two.
Neil Roberts [Tue, 25 May 2010 17:56:14 +0000 (18:56 +0100)]
Add a CoglTexturePixmapX11 texture backend
This is a publicly exposed texture backend to create a texture which
contains the contents of an X11 pixmap. The API is currently marked as
experimental.
The backend internally holds a handle to another texture. All of the
backend virtuals simply redirect to the internal texture.
The texture can optionally be automatically updated if the
automatic_updates parameter is TRUE. If set then Cogl will listen for
damage events on the pixmap and update the texture accordingly.
Alternatively a damage object can be created externally and passed
down to Cogl.
The updates can be performed with XGetImage, XShmGetImage or the
GLX_EXT_texture_pixmap extension. If the TFP extension is used it will
optionally try to create a rectangle texture if the driver does not
support NPOTs or it is forced through the
COGL_PIXMAP_TEXTURE_RECTANGLE or CLUTTER_PIXMAP_TEXTURE_RECTANGLE
environment variables.
If the GLXFBConfig does not support mipmapping then it will fallback
to using X{Shm,}GetImage. It keeps a separate texture around for this
so that it can later start using the TFP texture again if the texture
is later drawn with mipmaps disabled.
Neil Roberts [Mon, 14 Jun 2010 16:36:24 +0000 (17:36 +0100)]
test-pixmap: Use the 'm' key to toggle texture quality
When the 'm' key is pressed it will now recursively look for all
ClutterTexture subclasses on the stage and toggle the texture quality
between high and low. This is useful to test the mipmap fallback.
Neil Roberts [Fri, 28 May 2010 17:41:20 +0000 (18:41 +0100)]
test-pixmap: Draw something more interesting when the mouse is clicked
When the mouse button is pressed it would previously draw a small
1-pixel wide fully transparent line to the pixmap. This is a useful
feature to help test the automatic updates but the line is quite hard
to see so it's to easy miss. This patch changes it to draw a thick
black circle. The circle is drawn at a different position every time
the button is clicked.
Neil Roberts [Fri, 28 May 2010 16:53:04 +0000 (17:53 +0100)]
test-pixmap: Add a --disable-animation option
Sometimes the animation makes debugging awkward so this patch adds a
--disable-animation option to simplify the test.
Neil Roberts [Fri, 28 May 2010 16:45:07 +0000 (17:45 +0100)]
test-pixmap: Enable automatic updates for the hand
The hand actor has a feature that if you click on the stage it will
draw a line to the actor. However it's not possible to see the results
of this because automatic updates were disabled so the texture would
never be updated.
Neil Roberts [Fri, 28 May 2010 16:32:21 +0000 (17:32 +0100)]
test-pixmap: Implement the --disable-x11 option
test-pixmap has long had a --disable-x11 option that didn't do
anything. This patch adds the neccessary if (disable_x11) to disable
adding the ClutterX11TexturePixmap actor when the option is given.
Neil Roberts [Mon, 21 Jun 2010 11:48:02 +0000 (12:48 +0100)]
Add -DCOGL_ENABLE_EXPERIMENTAL_API to Makefiles for Cogl and x11/glx
Cogl and Clutter should be able to use the experimental API so this
adds the required define to the CPPFLAGS in the Makefiles.
Neil Roberts [Fri, 18 Jun 2010 13:30:23 +0000 (14:30 +0100)]
cogl-defines.h: Add a COGL_HAS_X11 define
This will be defined in cogl-defines.h whenever Cogl is built using a
winsys that supports X11. This implies CoglTexturePixmapX11 will be
available.
To make this work the two separate cogl-defines.h.in files have been
merged into one. The configure script now makes a @COGL_DEFINES@
substitution variable which contains the #define lines to put in
rather than directly having them in the seperate files.
Neil Roberts [Fri, 4 Jun 2010 09:38:30 +0000 (10:38 +0100)]
cogl: Add _cogl_xlib_{,un}trap_errors
This is similar to clutter_x11_{,un}trap_errors except that it stores
the previous trap state in a caller-allocated struct so that it can be
re-entrant.
Make _cogl_xlib_trap_errors re-entrant
(this will be squashed into an earlier commit)
Neil Roberts [Tue, 1 Jun 2010 12:32:57 +0000 (13:32 +0100)]
cogl-texture: Avoid premult conversion if the dst format has no alpha
The _cogl_texture_needs_premult_conversion function was already
checking whether the source format had an alpha channel before
returning TRUE, but it also doesn't make sense to do the premult
conversion if the destination format has no alpha. This patch adds
that check in too.
Neil Roberts [Wed, 2 Jun 2010 16:55:56 +0000 (17:55 +0100)]
cogl: Add the infrastructure for checking for winsys extensions
This adds the framework needed to check for winsys specific extensions
(such as GLX extensions) using a similar mechanism to the
cogl-feature-functions header. There is a separate
cogl-winsys-feature-functions header which will contain macros to list
the extensions and functions. cogl_create_context_winsys now calls
_cogl_feature_check for each of these functions. _cogl_feature_check
has had to be changed to accept the driver prefix as the first
parameter so that it can prepend "GLX" rather than "GL" in this case.
Neil Roberts [Wed, 19 May 2010 15:13:07 +0000 (16:13 +0100)]
Pass all Xlib events through Cogl
The Clutter X11 backend now passes all events through
_cogl_xlib_handle_event. This function can now internally be hooked
with _cogl_xlib_add_filter. These are added to a list of callbacks
which are all called in turn by _cogl_xlib_handle_event. This is
intended to be used internally in Cogl by any parts that need to see
Xlib events.
Cogl now also has an internally exposed function to set a pointer to
the Xlib display. This is stored in a global variable. The Clutter X11
backend sets this.
_cogl_xlib_handle_event and _cogl_xlib_set_display can be removed once
Cogl gains a proper window system abstraction.
Neil Roberts [Wed, 2 Jun 2010 14:16:14 +0000 (15:16 +0100)]
cogl: Add a struct for winsys-specific data to CoglContext
This creates a separate struct to store the fields of the context that
are specific to the winsys. This is all stored in one file but ideally
this could work more like the CoglContextDriver struct and have a
different header for each winsys.
Neil Roberts [Thu, 10 Jun 2010 14:33:34 +0000 (15:33 +0100)]
cogl: Add an internal CoglTextureRectangle backend
This adds an internal rectangle texture backend which is mostly based
on the CoglTexture2D backend. It will throw assert failures if any
operations are attempted that rectangle textures don't support, such
as mipmapping or hardware repeating.
Neil Roberts [Wed, 9 Jun 2010 16:39:59 +0000 (17:39 +0100)]
cogl-texture: Replace the ensure_mipmaps virtual with pre_paint
Instead of the ensure_mipmaps virtual that is only called whenever the
texture is about to be rendered with a min filter that needs the
mipmap, there is now a pre_paint virtual that is always called when
the texture is about to be painted in any way. It has a flags
parameter which is used to specify whether the mipmap will be needed.
This is useful for CoglTexturePixmapX11 because it needs to do stuff
before painting that is unrelated to mipmapping.
Neil Roberts [Fri, 11 Jun 2010 12:50:36 +0000 (13:50 +0100)]
cogl-texture: List texture subclass types rather than hardcoding them
Instead of having a hardcoded series of if-statements in
cogl_is_texture to determine which types should appear as texture
subclasses, they are now stored in a GSList attached to the Cogl
context. The list is amended to using a new cogl_texture_register_type
function. There is a convenience macro called COGL_TEXTURE_DEFINE
which uses COGL_HANDLE_DEFINE_WITH_CODE to register the texture type
when the _get_type() function is first called.
Neil Roberts [Fri, 11 Jun 2010 12:44:27 +0000 (13:44 +0100)]
Add COGL_{OBJECT,HANDLE}_DEFINE_WITH_CODE
This macro is similar to COGL_HANDLE_DEFINE_WITH_CODE except that it
allows a snippet of code to be inserted into the _get_type()
function. This is similar to how G_DEFINE_TYPE_WITH_CODE
works. COGL_HANDLE_DEFINE is now just a wrapper around
COGL_HANDLE_DEFINE_WITH_CODE.
Neil Roberts [Thu, 3 Jun 2010 14:06:47 +0000 (15:06 +0100)]
Add _cogl_texture_2d_externally_modified
_cogl_texture_2d_externally_modified is a function specific to the
CoglTexture2D texture backend that should be called whenever the
contents of the texture are modified without the backend knowing about
it. It simply marks the mipmap tree as invalid.
Neil Roberts [Wed, 2 Jun 2010 14:01:18 +0000 (15:01 +0100)]
cogl: Fix the include path in driver/*/Makefile.am
The include path for the winsys and driver folder was given relative
to $(srcdir) so it would end up relative to the driver folder which is
wrong. It is now specified as $(srcdir)/../../winsys to get the right
location. The driver folder is removed because it is actually just
$(srcdir) and that is already included.
Robert Bragg [Tue, 8 Jun 2010 21:54:26 +0000 (22:54 +0100)]
test-shader: guard GLES2 specific changes with COGL_HAS_GLES2
Previously we were using an internal only HAVE_COGL_GLES2 define to
guard GLES 2 specific changes so for instance the precision modifiers
weren't being emitted in the shader source.
http://bugzilla.o-hand.com/show_bug.cgi?id=2178
Robert Bragg [Tue, 8 Jun 2010 17:38:25 +0000 (18:38 +0100)]
gles2: don't disable clip planes for GLES2
GLES2 doesn't provide user clip planes (you would have to use a vertex +
fragment shader to achieve the same kind of result) so we make sure not
to call glEnable/Disable with any of the GL_CLIP_PLANE0..3 defines.
http://bugzilla.o-hand.com/show_bug.cgi?id=2177
Robert Bragg [Tue, 22 Jun 2010 10:21:09 +0000 (11:21 +0100)]
material: fix a typo in _cogl_material_journal_unref
The function had a line like:
CoglMaterial *material =
material = _cogl_material_pointer_from_handle (material_handle);
where the duplicate "material =" wasn't intended, so this patch removes
it.
Emmanuele Bassi [Tue, 22 Jun 2010 07:00:40 +0000 (08:00 +0100)]
json: Bump up the requirement of json-glib
We're actually using a symbol (the JSON_NODE_HOLDS macro) that was
defined in json-glib 0.10, so we need to bump up the dependency.
Emmanuele Bassi [Tue, 22 Jun 2010 06:58:49 +0000 (07:58 +0100)]
json: Backport JSON_NODE_HOLDS macros
Unbreak the compilation with the internal copy of json-glib.
Emmanuele Bassi [Mon, 21 Jun 2010 17:56:16 +0000 (18:56 +0100)]
x11: Use the _clutter symbols for xsettings_* API
Instead of using the bare xsettings_* API; this maintains consistency.
Emmanuele Bassi [Mon, 21 Jun 2010 17:01:57 +0000 (18:01 +0100)]
backend: Undeprecated clutter_backend_get_resolution()
Since the Settings:font-dpi property is exposed as 1024 * real_dpi in
order to make the setting as neutral as possible (and allow XSETTINGS
to use it natively) we need a simple API returning the DPI using a
floating point value.
Emmanuele Bassi [Mon, 21 Jun 2010 16:58:26 +0000 (17:58 +0100)]
Deprecate the Backend settings
The Settings instance is the preferred way of accessing the settings.
Emmanuele Bassi [Mon, 21 Jun 2010 16:57:57 +0000 (17:57 +0100)]
Remove default settings from backends
The defaults are set in the Settings instance.
Emmanuele Bassi [Mon, 21 Jun 2010 16:57:11 +0000 (17:57 +0100)]
docs: Add Settings to the API reference
And document properties.
Emmanuele Bassi [Mon, 21 Jun 2010 15:10:49 +0000 (16:10 +0100)]
settings: freeze notification on XSETTINGS notify
Emmanuele Bassi [Mon, 21 Jun 2010 14:43:31 +0000 (15:43 +0100)]
x11: Add the XSETTINGS machinery
Use the XSETTINGS machinery to get notification from foreign
environments about settings that might interest Clutter itself - namely:
the default font name, the font DPI, and the Xft font options that can
be mapped on cairo_font_options_t.
Emmanuele Bassi [Mon, 21 Jun 2010 14:42:20 +0000 (15:42 +0100)]
settings: Migrate Backend settings to a new object
Instead of storing settings inside the Backend instance we should use a
separate public object.
Robert Bragg [Fri, 18 Jun 2010 12:59:00 +0000 (13:59 +0100)]
configure.ac only explicitly add -lGL if no pkgconfig file
When configuring the glx flavour we were always explicitly adding -lGL
to the linker flags even when a pkg-config file was found which should
take care of that option for us.
Robert Bragg [Fri, 18 Jun 2010 12:35:09 +0000 (13:35 +0100)]
configure.ac: Use pkg-config for gles1/2 if available
When building for gles1/2 we now always try and look for a libglesv1_cm
or libglesv2 .pc file with details about where to find the library and
headers.
Robert Bragg [Fri, 18 Jun 2010 03:38:43 +0000 (04:38 +0100)]
egl: Consolidates eglx and eglnative into one "egl" winsys
This remove quite a lot of redundant code by consolidating the eglx and
eglnative window system backends.
Robert Bragg [Thu, 17 Jun 2010 23:29:12 +0000 (00:29 +0100)]
tslib: Add USE_TSLIB conditional for clutter-event-tslib.c
This adds an automake USE_TSLIB condition to decide when we should
compile clutter-event-tslib.c. This is in preparation for consolidating
the eglx and eglnative backends.