Robert Bragg [Wed, 12 Jan 2011 22:06:58 +0000 (22:06 +0000)]
cogl: Adds _cogl_swap_buffers_notify for clutter backends
This adds a stop-gap mechanism for Cogl to know when the window system
is requested to present the current backbuffer to the frontbuffer by
adding a _cogl_swap_buffers_notify function that backends are now
expected to call right after issuing the equivalent request to OpenGL
vie the platforms OpenGL binding layer. This (blindly) updates all the
backends to call this new function.
For now Cogl doesn't do anything with the notification but the intention
is to use it as part of a planned read-pixel optimization which will
need to reset some state at the start of each new frame.
Robert Bragg [Wed, 12 Jan 2011 19:30:30 +0000 (19:30 +0000)]
clip: rename get_clip_stack + add framebuffer_get_stack
Instead of having _cogl_get/set_clip stack which reference the global
CoglContext this instead makes those into CoglClipState method functions
named _cogl_clip_state_get/set_stack that take an explicit pointer to a
CoglClipState.
This also adds _cogl_framebuffer_get/set_clip_stack convenience
functions that avoid having to first get the ClipState from a
framebuffer then the stack from that - so we can maintain the
convenience of _cogl_get_clip_stack.
Robert Bragg [Wed, 12 Jan 2011 19:13:45 +0000 (19:13 +0000)]
clip-stack: Adds _cogl_clip_stack_get_bounds API
This adds an internal function to be able to query the screen space
bounding box of the current clip entries contained in a given
CoglClipStack.
This bounding box which is cheap to determine can be useful to know the
largest extents that might be updated while drawing with this clip
stack.
For example the plan is to use this as part of an optimized read-pixel
path handled on the CPU which will need to track the currently valid
extents of the last call to cogl_clear()
Robert Bragg [Thu, 6 Jan 2011 13:25:45 +0000 (13:25 +0000)]
journal: Support per-framebuffer journals
Instead of having a single journal per context, we now have a
CoglJournal object for each CoglFramebuffer. This means we now don't
have to flush the journal when switching/pushing/popping between
different framebuffers so for example a Clutter scene that involves some
ClutterEffect actors that transiently redirect to an FBO can still be
batched.
This also allows us to track state in the journal that relates to the
current frame of its associated framebuffer which we'll need for our
optimization for using the CPU to handle reading a single pixel back
from a framebuffer when we know the whole scene is currently comprised
of simple rectangles in a journal.
Robert Bragg [Wed, 12 Jan 2011 20:37:53 +0000 (20:37 +0000)]
cogl-object: Adds an internal _cogl_object_set_user_data
This adds an internal alternative to cogl_object_set_user_data that also
passes an instance pointer to destroy notify callbacks.
When setting private data on a CoglObject it's often desirable to know
the instance being destroyed when we are being notified to free the
private data due to the object being freed. The typical solution to this
is to track a pointer to the instance in the private data itself so it
can be identified but that usually requires an extra micro allocation
for the private data that could have been avoided if only the callback
were given an instance pointer.
The new internal _cogl_object_set_user_data passes the instance pointer
as a second argument which means it is ABI compatible for us to layer
the public version on top of this internal function.
Robert Bragg [Wed, 5 Jan 2011 15:30:04 +0000 (15:30 +0000)]
framebuffer: Move clear code to cogl-framebuffer.c
This moves the implementation of cogl_clear into cogl-framebuffer.c as
two new internal functions _cogl_framebuffer_clear and
_cogl_framebuffer_clear4f. It's not clear if this is what the API will
look like as we make more of the CoglFramebuffer API public due to the
limitations of using flags to identify buffers when framebuffers may
contain any number of ancillary buffers but conceptually it makes some
sense to tie the operation of clearing a color buffer to a framebuffer.
The short term intention is to enable tracking the current clear color
as a property of the framebuffer as part of an optimization for reading
back single pixels when the geometry is simple enough that we can
compute the result quickly on the CPU. (If the point doesn't intersect
any geometry we'll need to return the last clear color.)
Emmanuele Bassi [Fri, 21 Jan 2011 11:43:00 +0000 (11:43 +0000)]
stage: Do not create the default stage on stage.is_default()
Use the stage manager to see if a default stage was effectively set,
otherwise we end up creating a default stage when destroying a
non-default one.
Emmanuele Bassi [Thu, 20 Jan 2011 16:18:16 +0000 (16:18 +0000)]
Appease the gods in introspection
Reduce the amount of bogus warnings g-ir-scanner prints out.
Emmanuele Bassi [Thu, 20 Jan 2011 13:44:16 +0000 (13:44 +0000)]
Update the NEWS file
Emmanuele Bassi [Thu, 20 Jan 2011 13:29:37 +0000 (13:29 +0000)]
Expose deprecated symbols whilst building Clutter
Don't use ugly "#undef CLUTTER_DISABLE_DEPRECATED" inside source code
using deprecated symbols; we have the handy CLUTTER_COMPILATION define
that we can use as part of the "disable deprecated" conditional.
Emmanuele Bassi [Thu, 20 Jan 2011 13:19:03 +0000 (13:19 +0000)]
glx: Deprecate ClutterGLXTexturePixmap
Since 1.4 the ClutterGLXTexturePixmap is just a wrapper around
ClutterX11TexturePixmap, so we can safely deprecate it. All the
functionality it provided is now effectively available from the
superclass or directly from Cogl.
Emmanuele Bassi [Thu, 20 Jan 2011 12:59:56 +0000 (12:59 +0000)]
test-pixmap: Remove the GLX code
The ClutterGLXTexturePixmap actor is just a wrapper around
ClutterX11TexturePixmap, since the relevant texture-from-pixmap code has
been moved down to Cogl.
Emmanuele Bassi [Wed, 19 Jan 2011 18:51:01 +0000 (18:51 +0000)]
test-pixmap: Fix up compilation on EGLX
We need to check for the GLX windowing system if we are to include
clutter-glx.h.
Emmanuele Bassi [Wed, 19 Jan 2011 17:54:28 +0000 (17:54 +0000)]
docs: Ignore clutter-config.h when scanning headers
Emmanuele Bassi [Wed, 19 Jan 2011 14:36:30 +0000 (14:36 +0000)]
tests: Try to drop including config.h
The config.h header should be considered a Clutter internal header, and
the test cases (especially the interactive test cases) should strive to
never rely on internal headers.
Emmanuele Bassi [Wed, 19 Jan 2011 14:33:27 +0000 (14:33 +0000)]
build: Generate an instealled config header
Clutter has some platform-specific API that is accessible only if the
right backend has been compiled in. Third party applications that wish
to be portable across backends might want to use defines and other
pre-processor tricks to determine header inclusion and API usage.
While Clutter has an internal set of symbols it can use, third party
applications don't have the luxury of being able to access the config.h
generated by Clutter's configure script.
For this reason, Clutter should install a configuration header with a
series of namespaced defines that can be picked up by applications and
other third party code.
Emmanuele Bassi [Tue, 18 Jan 2011 15:14:58 +0000 (15:14 +0000)]
Update the NEWS file
Chris Lord [Tue, 18 Jan 2011 15:48:29 +0000 (15:48 +0000)]
timeline: Check if the timeline is playing in do_tick
Check that the timeline is still playing before executing in
_clutter_timeline_do_tick. This fixes the possibility of receiving a
new-frame signal when stopping a timeline in response to a different
timeline's signal emission.
Lucas Rocha [Mon, 17 Jan 2011 18:28:49 +0000 (18:28 +0000)]
drag-action: fix case where motion events are indefinitely disabled
When drag threshold is not reached, emit_drag_begin() is not called
causing default value of priv->motion_events_enabled (false) to used to
restore motion events enabled state in Clutter. This causes drag action
to indefinitely disable motion events. The current value of motion
events enabled state is now queried on button press which guarantees
that the state will be restored with the correct value in
emit_drag_end()
http://bugzilla.clutter-project.org/show_bug.cgi?id=2522
Emmanuele Bassi [Tue, 18 Jan 2011 14:46:02 +0000 (14:46 +0000)]
stage: Fix gtk-doc annotation for set_accept_focus()
Bastian Winkler [Fri, 14 Jan 2011 13:53:05 +0000 (14:53 +0100)]
introspection: Add missing (out) annotations for get_color()
Some actors are missing the (out) annotations for the get_color()
methods.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2518
Emmanuele Bassi [Mon, 17 Jan 2011 17:30:47 +0000 (17:30 +0000)]
docs: Add ClutterClickAction.get_state()
Lucas Rocha [Mon, 17 Jan 2011 00:38:04 +0000 (00:38 +0000)]
click-action: add API to get modifier type
This is to allow implementing modified click such as ctrl+click,
shift+click, and so on.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2520
Damien Lespiau [Mon, 17 Jan 2011 15:22:48 +0000 (15:22 +0000)]
color: Mark the new static color API as being new from 1.6
The patch was written a while ago but only merged in the 1.5.x cycle.
Neil Roberts [Mon, 17 Jan 2011 12:21:33 +0000 (12:21 +0000)]
cogl-program: Don't use separate definitions on GLES 1.1
Previously most of the code for cogl-program and cogl-shader was
ifdef'd out for GLES 1.1 and alternate stub definitions were
defined. This patch removes those and instead puts #ifdef's directly
in the functions that need it. This should make it a little bit easier
to maintain.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2516
Neil Roberts [Mon, 17 Jan 2011 12:20:06 +0000 (12:20 +0000)]
cogl-pipeline-opengl: #ifdef out set_glsl_program for GLES 1.1
glUseProgram is not available under GLES 1.1 so it was breaking the
build.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2516
Neil Roberts [Mon, 17 Jan 2011 12:06:13 +0000 (12:06 +0000)]
cogl-pipeline: Fix the enum names for the constant combine source
When determining whether to hash the combine constant Cogl checks the
arguments to the combine funcs to determine whether the combine
constant is used. However is was using the GLenums GL_CONSTANT_COLOR
and GL_CONSTANT_ALPHA but these are not valid values for the
CoglPipelineCombineSource enum so presumably the constant would never
get hashed. This patch makes it use Cogl's enum of
COGL_PIPELINE_COMBINE_SOURCE_CONSTANT instead.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2516
Adel Gadllah [Sun, 16 Jan 2011 22:19:28 +0000 (23:19 +0100)]
ClutterX11TexturePixmap: Fix doc comment
The wrong signal name was used probably a copy & paste
mistake, fix that.
Neil Roberts [Thu, 13 Jan 2011 15:54:50 +0000 (15:54 +0000)]
cogl-buffer: Support mapping buffers for write on GLES
GLES has an extension called GL_OES_mapbuffer to support mapping
buffer objects but only for writing. Cogl now has two new feature
flags to advertise whether mapping for reading and writing is
supported. Under OpenGL, these features are always set if the VBO
extension is advertised and under GLES only the write flag is set if
the GL_OES_mapbuffer extension is advertised.
Neil Roberts [Thu, 13 Jan 2011 15:36:08 +0000 (15:36 +0000)]
cogl: Enable the VBOs feature for GLES2
The GLES2 wrapper code has been removed so there are no longer any
problems with enabling VBOs.
Neil Roberts [Thu, 13 Jan 2011 15:35:30 +0000 (15:35 +0000)]
cogl: Fallback to set_data when mapping a buffer to fill it
In the journal code and when generating the stroke path the vertices
are generated on the fly and stored in a CoglBuffer using
cogl_buffer_map. However cogl_buffer_map is allowed to fail but it
wasn't checking for a NULL return value. In particular on GLES it will
always fail because glMapBuffer is only provided by an extension. This
adds a new pair of internal functions called
_cogl_buffer_{un,}map_for_fill_or_fallback which wrap
cogl_buffer_map. If the map fails then it will instead return a
pointer into a GByteArray attached to the context. When the buffer is
unmapped the array is copied into the buffer using
cogl_buffer_set_data.
Neil Roberts [Thu, 13 Jan 2011 14:12:10 +0000 (14:12 +0000)]
cogl-context: Don't enable point sprites on GLES2
On GLES2 there's no builtin mechanism to replace texture coordinates
with point sprite coordinates so calling glEnable(GL_POINT_SPRITE)
isn't valid. Instead the point sprite coords are implemented by using
a special builtin varying variable in GLSL.
Robert Bragg [Tue, 11 Jan 2011 16:02:06 +0000 (16:02 +0000)]
pipeline: differentiate texture target and data state
There are several places where we need to compare the texture state of a
pipeline and sometimes we need to take into consideration if the
underlying texture has changed but other times we may only care to know
if the texture target has changed.
For example the fragends typically generate programs that they want to
share with all pipelines with equivalent fragment processing state, and
in this case when comparing pipelines we only care about the texture
targets since changes to the underlying texture won't affect the
programs generated.
Prior to this we had tried to handle this by passing around some special
flags to various functions that evaluate pipeline state to say when we
do/don't care about the texture data, but this wasn't working in all
cases and was more awkward to manage than the new approach.
Now we simply have two state bits:
COGL_PIPELINE_LAYER_STATE_TEXTURE_TARGET and
COGL_PIPELINE_LAYER_STATE_TEXTURE_DATA and CoglPipelineLayer has an
additional target member. Since all the appropriate code takes masks of
these state bits to determine what to evaluate we don't need any extra
magic flags.
Robert Bragg [Wed, 12 Jan 2011 17:11:48 +0000 (17:11 +0000)]
pipeline: optimize state init if changing property
When notifying that a pipeline property is going to change, then at
times a pipeline will take over being the authority of the corresponding
state group. Some state groups can contain multiple properties and so to
maintain the integrity of all of the properties we have to initialize
all the property values in the new authority. For state groups with only
one property we don't have to initialize anything during the
pre_change_notify() because we can assume the value will be initialized
as part of the change being notified.
This patch optimizes how we handle this initialization of state groups
in a couple of ways; firstly we no longer do anything to initialize
state-groups with only one property, secondly we no longer use
_cogl_pipeline_copy_differences - (we have a new
_cogl_pipeline_init_multi_property_sparse_state() func) so we can avoid
lots calls to handle_automatic_blend_enable() which is sometimes seen
high in sysprof profiles.
Neil Roberts [Wed, 12 Jan 2011 16:59:37 +0000 (16:59 +0000)]
test-cogl-shader-glsl: Disable the atlas for the hand texture
Atlasing needs to be disabled for the hand texture so that it can work
out the step value needed to fetch a neighbouring pixel in the blur
shader. If the texture ends up in the atlas then the test can't know
the actual size of the texture so it looks wrong.
Neil Roberts [Wed, 12 Jan 2011 16:56:52 +0000 (16:56 +0000)]
cogl-atlas-texture: Don't disable atlas if can't read texture data
Previously atlasing would be disabled if the GL driver does not
support reading back texture data. This meant that atlasing would not
happen on GLES. However we also require that the driver support FBOs
and the texture data is only read back as a fallback if the FBO
fails. Therefore the atlas should be ok on GLES 2 which has FBO
support in core.
Emmanuele Bassi [Tue, 11 Jan 2011 21:34:37 +0000 (21:34 +0000)]
Post-release version bump to 1.5.13
Emmanuele Bassi [Tue, 11 Jan 2011 20:29:30 +0000 (20:29 +0000)]
Release 1.5.12
Robert Bragg [Tue, 11 Jan 2011 14:10:11 +0000 (14:10 +0000)]
pipeline: don't skip flush if skip_gl_color flag differs
We try and bail out of flushing pipeline state asap if we can see the
pipeline has already been flushed and hasn't changed but we weren't
checking to see if the skip_gl_color flag is the same as when it was
last flush too and so we'd sometimes bail out without updating the
glColor correctly.
Damien Lespiau [Tue, 11 Jan 2011 14:15:46 +0000 (14:15 +0000)]
test-shader: Fix the edge-detect shader
cogl_text_coord_in in a array to access the texture units. In this case
we want to sample texture unit 0, where the texture is.
Neil Roberts [Mon, 10 Jan 2011 20:13:41 +0000 (20:13 +0000)]
cogl-vertex-attribute: Optionally avoid applying the legacy state
When an item is added to the journal the current pipeline immediately
gets the legacy state applied to it and the modified pipeline is
logged instead of the original. However the actual drawing from the
journal is done using the vertex attribute API which was also applying
the legacy state. This meant that the legacy state used would be a
combination of the state set when the journal entry was added as well
as the state set when the journal is flushed. To fix this there is now
an extra CoglDrawFlag to avoid applying the legacy state when setting
up the GL state for the vertex attributes. The journal uses this flag
when flushing.
Emmanuele Bassi [Tue, 11 Jan 2011 12:38:52 +0000 (12:38 +0000)]
Update the NEWS file
Bastian Winkler [Mon, 3 Jan 2011 15:15:17 +0000 (16:15 +0100)]
script-parser: Also honor properties of type GType
The script parser should also handle GType properties.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2513
Emmanuele Bassi [Tue, 11 Jan 2011 11:49:11 +0000 (11:49 +0000)]
Update NEWS file
Damien Lespiau [Tue, 11 Jan 2011 10:23:59 +0000 (10:23 +0000)]
shader: Don't notify properties when finalizing shaders
clutter_shader_finalize() was calling clutter_shader_release() which in
turn notifies "compiled". GObject was complaining that we were trying to
_ref() an object that was in _finalize().
#0 g_log (log_domain=0x3e15c4 "GLib-GObject", log_level=G_LOG_LEVEL_CRITICAL,
format=0x76c938 "%s: assertion `%s' failed") at gmessages.h:97
#1 0x0070777d in g_return_if_fail_warning (
log_domain=0x3e15c4 "GLib-GObject",
pretty_function=0x3e37a4 "g_object_ref",
expression=0x3e2a00 "object->ref_count > 0") at gmessages.c:586
#2 0x003b862b in g_object_ref (_object=0x8567af0) at gobject.c:2615
#3 0x003bd238 in g_object_notify_by_pspec (object=0x8567af0, pspec=0x87ea2f0)
at gobject.c:1075
#4 0x00b6500b in clutter_shader_release (shader=0x8567af0)
at ./clutter-shader.c:612
#5 0x00b659b9 in clutter_shader_finalize (object=0x8567af0)
at ./clutter-shader.c:107
Then, let's split release in two, with an _internal() version that does
not notify "compiled" and use it from dispose (as the object is still
usable after a call to release_internal().
http://bugzilla.clutter-project.org/show_bug.cgi?id=2512
Tomeu Vizoso [Mon, 10 Jan 2011 18:13:03 +0000 (19:13 +0100)]
ClutterListModel: Implement get_n_rows for improved performance
The default implementation in ClutterModel iterates through all
the elements.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2511
Adel Gadllah [Wed, 5 Jan 2011 09:24:26 +0000 (10:24 +0100)]
ClutterAlignConstraint: Keep pixel aligment
We have to round the values here otherwise we might end up with
misaligned actors.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2508
Neil Roberts [Tue, 14 Dec 2010 14:44:45 +0000 (14:44 +0000)]
cogl-journal: Avoid enabling blending if possible
The vertex attribute API assumes that if there is a color array
enabled then we can't determine if the colors are opaque so we have to
enable blending. The journal always uses a color array to avoid
switching color state between rectangles. Since the journal switched
to using vertex attributes this means we effectively always enable
blending from the journal. To fix this there is now a new flag for
_cogl_draw_vertex_attributes to specify that the color array is known
to only contain opaque colors which causes the draw function not to
copy the pipeline. If the pipeline has blending disabled then the
journal passes this flag.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2481
Neil Roberts [Tue, 14 Dec 2010 14:24:17 +0000 (14:24 +0000)]
cogl-vertex-attribute: Add flags to _cogl_draw_vertex_attributes_array
There is an internal version of cogl_draw_vertex_attributes_array
which previously just bypassed the framebuffer flushing, journal
flushing and pipeline validation so that it could be used to draw the
journal. This patch generalises the function so that it takes a set of
flags to specify which parts to flush. The public version of the
function now just calls the internal version with the flags set to
0. The '_real' version of the function has now been merged into the
internal version of the function because it was only called in one
place. This simplifies the code somewhat. The common code which
flushed the various state has been moved to a separate function. The
indexed versions of the functions have had a similar treatment.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2481
Neil Roberts [Fri, 17 Dec 2010 16:30:23 +0000 (16:30 +0000)]
cogl: Don't assume that CoglBitmaps are allocated to height*rowstride
Cogl no longer has any code that assumes the buffer in a CoglBitmap is
allocated to the full size of height*rowstride. We should comment that
this is the case so that we remember to keep it that way. This is
important for cogl_texture_new_from_data because the application may
have created the data from a sub-region of a larger image and in that
case it's not safe to read the full rowstride of the last row when the
sub region contains the last row of the larger image.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2491
Neil Roberts [Fri, 17 Dec 2010 16:09:26 +0000 (16:09 +0000)]
cogl-texture-driver-gles: Don't copy the bitmap if alignment matches
When uploading data for GLES we need to deal with cases where the
rowstride is too large to be described only by GL_UNPACK_ALIGNMENT
because there is no GL_UNPACK_ROW_LENGTH. Previously for the
sub-region uploading code it would always copy the bitmap and for the
code to upload the whole image it would copy the bitmap unless the
rowstride == bpp*width. Neither paths took into account that we don't
need to copy if the rowstride is just an alignment of bpp*width. This
moves the bitmap copying code to a separate function that is used by
both upload methods. It only copies the bitmap if the rowstride is not
just an alignment of bpp*width.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2491
Neil Roberts [Fri, 17 Dec 2010 16:06:10 +0000 (16:06 +0000)]
cogl-util: Add an internal wrapper for the ffs function
The ffs function is defined in C99 so if we want to use it in Cogl we
need to provide a fallback for MSVC. This adds a configure check for
the function and then a fallback using a while loop if it is not
available.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2491
Neil Roberts [Fri, 17 Dec 2010 14:52:25 +0000 (14:52 +0000)]
cogl-texture: Don't use the source rowstride if we have to copy bitmap
If we have to copy the bitmap to do the premultiplication then we were
previously using the rowstride of the source image as the rowstride
for the new image. This is wasteful if the source image is a subregion
of a larger image which would make it use a large rowstride. If we
have to copy the data anyway we might as well compact it to the
smallest rowstride. This also prevents the copy from reading past the
end of the last row of pixels.
An internal function called _cogl_bitmap_copy has been added to do the
copy. It creates a new bitmap with the smallest possible rowstride
rounded up the nearest multiple of 4 bytes. There may be other places
in Cogl that are currently assuming we can read height*rowstride of
the source buffer so they may want to take advantage of this function
too.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2491
Neil Roberts [Wed, 22 Dec 2010 01:45:09 +0000 (01:45 +0000)]
cogl-vertex-attribute: Fix the name of the cogl_normal_in attribute
The builtin vertex attribute for the normals was incorrectly checked
for as 'cogl_normal' however it is defined as cogl_normal_in in the
shader boilerplate and for the name generated by CoglVertexBuffer.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2499
Emmanuele Bassi [Mon, 10 Jan 2011 14:03:35 +0000 (14:03 +0000)]
container: Do not use Actor as prerequisite
The prerequisite for ClutterContainer in 1.x is GObject, and we cannot
restrict the prerequisites without an ABI break.
nobled [Tue, 4 Jan 2011 13:56:05 +0000 (13:56 +0000)]
egl: Fix build for --with-flavour=opengl-egl-xlib
Make sure the EGL backend doesn't forget to include desktop OpenGL headers.
nobled [Tue, 4 Jan 2011 13:59:48 +0000 (13:59 +0000)]
egl: Don't use obsolete API
Fixes a GCC "implicit declaration of function" warning when compiling.
Kristian Høgsberg [Thu, 6 Jan 2011 12:57:26 +0000 (07:57 -0500)]
x11: Create the list of all devices correctly
Linked lists are tricky.
Emmanuele Bassi [Thu, 30 Dec 2010 12:49:41 +0000 (12:49 +0000)]
test-text-field: Grab key focus on the first entry
So that you can start typing right away.
Emmanuele Bassi [Tue, 28 Dec 2010 22:21:09 +0000 (22:21 +0000)]
osx: Implement the set_accept_focus() vfunc
Like the x11 and win32 backends, the quartz backend should allow setting
the key focus when showing the stage window.
Emmanuele Bassi [Tue, 28 Dec 2010 18:04:00 +0000 (18:04 +0000)]
win32: Implement the set_accept_focus() vfunc
Implement the ClutterStageWindow::set_accept_focus() virtual function in
the win32 backend.
If accept_focus is set to be TRUE then we call SetforegroundWindow()
after calling ShowWindow(). This is similar to what GDK does when
dealing with the same situation.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2500
Emmanuele Bassi [Tue, 28 Dec 2010 17:38:39 +0000 (17:38 +0000)]
x11: Implement the set_accept_focus() vfunc
Actually set the InputHint flag and set the input field of the WM_SPEC
hints depending on the value of the accept-focus bitfield.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2500
Emmanuele Bassi [Tue, 28 Dec 2010 17:37:18 +0000 (17:37 +0000)]
stage: Add :accept-focus property and accessors
Allow the developer to set whether the Stage should receive key focus
when mapped. The implementation is fully backend-dependent. The default
value is TRUE because that's what we've been expecting so far.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2500
Emmanuele Bassi [Tue, 28 Dec 2010 17:36:27 +0000 (17:36 +0000)]
stage-window: Add set_accept_focus() vfunc
Allow Stage implementations to set whether or not they want to accept
key focus when being shown.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2500
Johan Bilien [Wed, 29 Dec 2010 21:49:13 +0000 (16:49 -0500)]
Fixed a crash when destroying the actor of a LEAVE event
When processing a LEAVE event, one might destroy the actor, so the weak
reference device->actor would be NULL.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2502
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Nguyễn Thái Ngọc Duy [Thu, 30 Dec 2010 01:16:10 +0000 (08:16 +0700)]
autogen.sh: make autoreconf use automake-1.11 when available
This patch exports $ACLOCAL and $AUTOMAKE, otherwise autoreconf
may use an older version instead.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
http://bugzilla.clutter-project.org/show_bug.cgi?id=2504
Johan Bilien [Wed, 29 Dec 2010 21:57:02 +0000 (16:57 -0500)]
Only reset the relayout_pending flag when actually doing a relayout
If an actor is (unfortunately) queuing a relayout in relayout, you would
end up with (ClutterActor*)stage->needs_allocation set to TRUE and
stage->relayout_pending set to TRUE. But if then in the same cycle, an
actor calls clutter_actor_get_allocation_box, that will trigger another
(recursive) _clutter_stage_maybe_relayout, which will wrongly reset the
relayout pending to FALSE, while not actually performing a new relayout
because of the re-entrancy protection.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2503
Emmanuele Bassi [Wed, 22 Dec 2010 09:42:41 +0000 (09:42 +0000)]
docs: Fixes for the Cogl API reference
Emmanuele Bassi [Tue, 21 Dec 2010 12:03:38 +0000 (12:03 +0000)]
build: Ignore private headers when building the Cogl reference
Otherwise gtk-doc will try to look up private symbols.
Emmanuele Bassi [Tue, 21 Dec 2010 10:51:39 +0000 (10:51 +0000)]
test-text-field: Do not expand the labels
Emmanuele Bassi [Tue, 21 Dec 2010 10:50:24 +0000 (10:50 +0000)]
text: Only paint cursor if we have key focus
If a Text actor does not have key focus then there's no point in showing
the cursor at all.
Emmanuele Bassi [Mon, 20 Dec 2010 17:59:35 +0000 (17:59 +0000)]
test-text-field: Clean up
Use a Table layout manager, and clean up a bit this test case.
Emmanuele Bassi [Mon, 20 Dec 2010 12:41:07 +0000 (12:41 +0000)]
interactive: Remove test-bind
The BindConstraint is already exercised in the test-constraints and in
other interactive tests.
Emmanuele Bassi [Sat, 18 Dec 2010 21:33:37 +0000 (21:33 +0000)]
build: Remove Cogl2 reference from the build scripts
Keeping the Cogl 2.0 API reference in the build is getting far more
troublesome than it's worth.
It's breaking distcheck far too often, and it makes it impossible to
rebuild the build environment from tarballs - which is something that
some distributions (namely: the Debian-based ones, but not limited to
them) do in order to change build scripts using their own rules.
Emmanuele Bassi [Sat, 18 Dec 2010 13:24:54 +0000 (13:24 +0000)]
constraints: Remove signal handlers on dispose
Same as commit
2fa8b3a3abc7bb8e96a85d927edc0594f44f55df but done for
AlignConstraint and SnapConstraint as well.
Emmanuele Bassi [Sat, 18 Dec 2010 13:16:23 +0000 (13:16 +0000)]
bind-constraint: Remove handlers in dispose
We should remove the signal handlers on the source actor when a
BindConstraint is disposed, to avoid dangling pointers and wrong
invocations.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2493
Emmanuele Bassi [Fri, 17 Dec 2010 16:04:25 +0000 (16:04 +0000)]
Post-release version bump to 1.5.11
Emmanuele Bassi [Fri, 17 Dec 2010 14:40:17 +0000 (14:40 +0000)]
Release Clutter 1.5.10 (snapshot)
Emmanuele Bassi [Fri, 17 Dec 2010 15:43:24 +0000 (15:43 +0000)]
build: Fix release-check for cogl2 reference
Emmanuele Bassi [Fri, 17 Dec 2010 14:41:33 +0000 (14:41 +0000)]
build: Remove stringify.sh from Makefile.am
Elliot Smith [Wed, 15 Dec 2010 13:31:12 +0000 (13:31 +0000)]
cookbook: Proofing for "box layout" recipe
General improvements to readability, formatting, fixing
typos etc.
Elliot Smith [Wed, 15 Dec 2010 13:13:28 +0000 (13:13 +0000)]
cookbook: Add examples and more text for "box layout" recipe
Added 3 examples for the box layout recipe:
1) Simple box layout demonstrating how to set actor properties
2) Trivial menu implementation using box layout
3) Demonstration app which enables tweaking and testing
of layout property interactions
Also inlined example 1 in the solution section and added
more explanatory text in the discussion.
Elliot Smith [Tue, 14 Dec 2010 18:08:28 +0000 (18:08 +0000)]
cookbook: Add initial skeleton for box layout recipe
Created recipe and first draft content for recipe
about ClutterBoxLayout.
Emmanuele Bassi [Fri, 17 Dec 2010 13:53:28 +0000 (13:53 +0000)]
geometry: Avoid sign issues when interpolating
Width and height in ClutterGeometry are unsigned, and this might lead to
overflow and wrap around issues.
Alexandre Quessy [Tue, 14 Dec 2010 22:45:45 +0000 (17:45 -0500)]
Fixed a typo in a doc string
http://bugzilla.clutter-project.org/show_bug.cgi?id=2485
Emmanuele Bassi [Fri, 17 Dec 2010 12:07:06 +0000 (12:07 +0000)]
Update NEWS
Emmanuele Bassi [Fri, 17 Dec 2010 12:04:11 +0000 (12:04 +0000)]
timeline: Rename the reverse property to auto-reverse
Other frameworks expose the same functionality as "auto-reverse",
probably to match the cassette tape player. It actually makes sense
for Clutter to follow suit.
Emmanuele Bassi [Thu, 16 Dec 2010 15:30:53 +0000 (15:30 +0000)]
interactive: Rename test-rotate
The rotation test is now really testing the shader-based effects we ship
with Clutter. The name should be changed to reflect that.
Emmanuele Bassi [Thu, 16 Dec 2010 15:25:29 +0000 (15:25 +0000)]
interactive: Remove test-viewport
The test-viewport interactive test is exercising the clip code - a job
better done by the conformance test suite and by the test-clip
interactive test.
Emmanuele Bassi [Thu, 16 Dec 2010 15:10:27 +0000 (15:10 +0000)]
interactive: Remove test-project
The test-project test case was an old test that was barely working after
landing the size allocation API in Clutter 0.8. It has never been fixed,
and it's been of relative use ever since.
Emmanuele Bassi [Thu, 16 Dec 2010 15:08:11 +0000 (15:08 +0000)]
interactive: Remove test-offscreen
The test-offscreen interactive test was a dummy test for the
ClutterStage:offscreen property, which has been deprecated and
not implemented since Clutter 1.0, and never really worked except
briefly in Clutter 0.2 or something.
Neil Roberts [Mon, 13 Dec 2010 17:21:58 +0000 (17:21 +0000)]
clutter-stage: Don't always set the projection and viewport matrix
The stage has a dirty flag to record whenever the viewport and
projection matrices need to be flushed. However after flushing these
the flags were never cleared so it would always redundantly update the
state.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2480
Neil Roberts [Tue, 14 Dec 2010 13:02:47 +0000 (13:02 +0000)]
cogl-pipeline-fragend-arbfp: Generate ARBfp if user vertex shader
The ARBfp fragend was bypassing generating a shader if the pipeline
contains a user program. However it shouldn't do this if the pipeline
only contains a vertex shader. This was breaking
test-cogl-just-vertex-shader.
Emmanuele Bassi [Fri, 10 Dec 2010 17:46:58 +0000 (17:46 +0000)]
cally: Allow memory management for actions
Adding an action should allow passing a user data pointer, and have a
notification action that gets called when removing the action. This
allows introspection and language bindings to attach custom data to the
action - for instance, the real callable object that should be invoked.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2479
Mike Owens [Thu, 9 Dec 2010 14:39:23 +0000 (09:39 -0500)]
ClutterText: Only grab keyboard focus if keyboard-interactive.
Previously, ClutterText took keyboard focus on mouse-down, regardless
if it were editable or selectable. Now it checks these properties,
and behaves like other actors if it can't do anything useful with
the focus.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2462
Neil Roberts [Sat, 27 Nov 2010 13:15:02 +0000 (13:15 +0000)]
Allow multiple CoglAtlases for textures
Previously Cogl would only ever use one atlas for textures and if it
reached the maximum texture size then all other new textures would get
their own GL texture. This patch makes it so that we create as many
atlases as needed. This should avoid breaking up some batches and it
will be particularly good if we switch to always using multi-texturing
with a default shader that selects between multiple atlases using a
vertex attribute.
Whenever a new atlas is created it is stored in a GSList on the
context. A weak weference is taken on the atlas using
cogl_object_set_user_data so that it can be removed from the list when
the atlas is destroyed. The atlas textures themselves take a reference
to the atlas and this is the only thing that keeps the atlas
alive. This means that once the atlas becomes empty it will
automatically be destroyed.
All of the COGL_NOTEs pertaining to atlases are now prefixed with the
atlas pointer to make it clearer which atlas is changing.
Neil Roberts [Sat, 27 Nov 2010 13:06:38 +0000 (13:06 +0000)]
cogl-atlas: Convert to be a CoglObject subclass
To implement multiple atlases it will be useful to have ref-counting
on the CoglAtlas so it makes sense to convert it to be a CoglObject.
Neil Roberts [Tue, 7 Dec 2010 13:58:46 +0000 (13:58 +0000)]
test-cogl-just-vertex-shader: Update to use the portable cogl_* names
The vertex shader in this test now uses the cogl_* names for the GL
builtin so that it will work on GLES2 as well.
Neil Roberts [Tue, 7 Dec 2010 13:44:45 +0000 (13:44 +0000)]
cogl-shader-boilerplate: Add the 3D texture extension on GLES2
To use the 3D texture extension on GLES2 it has to be enabled with the
following line in GLSL:
#extension GL_OES_texture_3D : enable
Neil Roberts [Tue, 7 Dec 2010 12:49:00 +0000 (12:49 +0000)]
test-cogl-multitexture: Don't test the alpha component
On EGL we don't request a context with any alpha bits so testing alpha
component of cogl_read_pixels isn't reliable.