1. 16 Jan, 2012 1 commit
  2. 30 Sep, 2011 1 commit
  3. 19 Sep, 2011 1 commit
    • Robert Bragg's avatar
      actor: consider empty pv ok in set_default_paint_volume · 96866804
      Robert Bragg authored
      In _clutter_actor_set_default_paint_volume we were returning FALSE if an
      actor has an empty allocation because we were claiming it doesn't have a
      paint-volume. Actually an empty/degenerate pv is valid and has different
      semantics to returning FALSE because FALSE means the pv is unknown and
      so Clutter will have to assume the worst - that the pv is basically
      un-bounded.
      Reviewed-by: default avatarEmmanuele Bassi <ebassi@linux.intel.com>
      96866804
  4. 26 Jul, 2011 1 commit
  5. 14 Jul, 2011 2 commits
    • Robert Bragg's avatar
      Provide stable paint-boxes for fixed sized actors · 3183240f
      Robert Bragg authored
      This updates _clutter_paint_volume_get_stage_paint_box to try and
      calculate more stable paint-box sizes for fixed sized paint-volumes by
      not basing the size on the volume's sub-pixel position.
      
      So the aim is that for a given rectangle defined with floating point
      coordinates we want to determine a stable quantized size in pixels that
      doesn't vary due to the original box's sub-pixel position.
      
      The reason this is important is because effects will use this API to
      determine the size of offscreen framebuffers and so for a fixed-size
      object that may be animated across the screen we want to make sure that
      the stage paint-box has an equally stable size so that effects aren't
      made to continuously re-allocate a corresponding fbo.
      
      The other thing we consider is that the calculation of this box is
      subject to floating point precision issues that might be slightly
      different to the precision issues involved with actually painting the
      actor, which might result in painting slightly leaking outside the
      user's calculated paint-volume. This patch now adds padding to consider
      this too.
      Signed-off-by: default avatarNeil Roberts <neil@linux.intel.com>
      Signed-off-by: default avatarEmmanuele Bassi <ebassi@linux.intel.com>
      3183240f
    • Robert Bragg's avatar
      paint-volume: don't round paint-volume from allocation · ad234b30
      Robert Bragg authored
      The implementation of _clutter_actor_set_default_paint_volume which
      simply uses the actor's allocation to determine a paint-volume was
      needlessly using the allocation rounded to integers by internally using
      clutter_actor_get_allocation_geometry instead of
      clutter_actor_get_allocation_box. This was introducing a lot of
      instability into the paint-volume due to the way rounding was done.
      
      The code has now been updated to use clutter_actor_get_allocation_box
      so we are dealing with the floating point allocation instead.
      Signed-off-by: default avatarNeil Roberts <neil@linux.intel.com>
      Signed-off-by: default avatarEmmanuele Bassi <ebassi@linux.intel.com>
      ad234b30
  6. 30 Jun, 2011 1 commit
  7. 17 Jun, 2011 2 commits
    • Robert Bragg's avatar
      actor: documents _get/apply_relative_transform_matrix · b66c22ac
      Robert Bragg authored
      Although this patch doesn't make them public, it documents the
      _clutter_actor_get/apply_relative_transform_matrix functions so they
      could easily be made public if desired. I think these API could be
      useful to have publicly, and I originally documented them because I
      thought they would be needed in the MX toolkit.
      b66c22ac
    • Robert Bragg's avatar
      actor: review use of _apply_modelview_transform_recursive · 1720b77d
      Robert Bragg authored
      On reviewing the clutter-actor.c code using
      _apply_modelview_transform_recursive I noticed various comments stating
      that it will never call the stage's ->apply_transform vfunc to transform
      into eye coordinates, but actually looking at the implementation that's
      not true. The comments probably got out of sync with an earlier
      implementation that had that constraint. This removes the miss-leading
      comments and also updates various uses of the api where we were manually
      applying the stage->apply_transform.
      1720b77d
  8. 16 Jun, 2011 6 commits
    • Robert Bragg's avatar
      paint-volumes: remove is_axis_aligned assert for _union · e936b959
      Robert Bragg authored
      This removes the pv->is_xis_aligned assertion in
      _clutter_paint_volume_union. We were already considering the case where
      the second volume may not be axis aligned and aligning it into a
      temporary variable in that case, but we now also consider that the first
      pv may also not be aligned.
      e936b959
    • Robert Bragg's avatar
      paint-volumes: avoid is_complete assert in _axis_align · 4dc30c25
      Robert Bragg authored
      The removes the pv->is_complete assertion from
      _clutter_paint_volume_axis_align() and instead if the volume isn't
      complete it calls _clutter_paint_volume_complete().
      4dc30c25
    • Robert Bragg's avatar
      paint-volumes: fix unioning with empty volumes · 923b1657
      Robert Bragg authored
      When calculating the union of a volume with an empty volume we aim to
      simply take the contents of the non-empty volume, but we were not
      copying the flags across. We now use
      _clutter_paint_volume_set_from_volume which copies all the flags except
      the is_static flag.
      923b1657
    • Robert Bragg's avatar
      paint-volumes: remove alignment constraint for _set_origin · 394512b2
      Robert Bragg authored
      The implementation for clutter_paint_volume_set_origin can cope with
      volumes that are not axis aligned so this remove the is_axis_aligned
      assertion.
      394512b2
    • Robert Bragg's avatar
      paint-volumes: avoid trashing is_static state · 30eb3be7
      Robert Bragg authored
      In _clutter_paint_volume_set_from_volume we were using memcpy to simply
      copy everything from one volume to another, but that meant we were
      trashing the is_static flag which determines if the destination
      paint-volume was slice allocated or not.
      30eb3be7
    • Robert Bragg's avatar
      paint-volumes: remove alignment constraint for completion · a9789616
      Robert Bragg authored
      This removes the constraint that a paint-volume must be axis aligned
      before _clutter_paint_volume_complete can be called. NB: A paint volume
      is represented by one origin vertex and then three axis vertices to
      define the width, height and depth of the volume. It's straightforward
      to use the vectors from the origin to the axis vertices to deduce the
      other 4 vertices so we can remove the is_axis_aligned assertion.
      a9789616
  9. 02 Jun, 2011 1 commit
    • Robert Bragg's avatar
      culling: Use vertex_count not '4' to determine partial culls · 588d97c2
      Robert Bragg authored
      We were mistakenly using the constant 4 to determine the number of
      vertices that need to be culled for a paint-volume to be considered
      fully culled too. This is only ok for 2d volumes and was resulting in
      some 3d volumes being considered culled whenever 4 out of 8 vertices
      were culled. This fix is simply to reference the vertex_count variable
      instead of assuming 4.
      588d97c2
  10. 11 Apr, 2011 1 commit
    • Robert Bragg's avatar
      paint-volume: Fix culling bug to handle partial culls · 114133c9
      Robert Bragg authored
      This updates the inner loops of the cull function so now the vertices of
      the polygon being culled are iterated in the inner loop instead of the
      clip planes and we count how many vertices are outside the current
      plane so we can bail out immediately if all the vertices are outside of
      any plane and so we can correctly track partial intersections with the
      clip region.
      
      The previous approach could catch some partial intersections but for
      example a rectangle that was larger than the clip region centred over
      the clip region with all corners outside would be reported as outside,
      not as a partial intersection.
      114133c9
  11. 01 Apr, 2011 1 commit
  12. 10 Mar, 2011 1 commit
    • Robert Bragg's avatar
      culling: check volume->is_empty before ->is_complete · 3303b081
      Robert Bragg authored
      As documented in cogl-pipeline-private.h, there is a precedence to the
      ClutterPaintVolume bitfields that should be considered whenever we
      implement code that manipulates PaintVolumes...
      
      Firstly if ->is_empty == TRUE then the values for ->is_complete and
      ->is_2d are undefined, so we should typically check ->is_empty as the
      first priority.
      
      This fixes a bug in _clutter_paint_volume_cull() whereby we were
      checking pv->is_complete before checking pv->is_empty which was
      resulting in assertions for actors with no size.
      3303b081
  13. 07 Mar, 2011 2 commits
    • Robert Bragg's avatar
      Optimize culling by doing culling in eye-coordinates · 19b86229
      Robert Bragg authored
      This implements a variation of frustum culling whereby we convert screen
      space clip rectangles into eye space mini-frustums so that we don't have
      to repeatedly transform actor paint-volumes all the way into screen
      coordinates to perform culling, we just have to apply the modelview
      transform and then determine each points distance from the planes that
      make up the clip frustum.
      
      By avoiding the projective transform, perspective divide and viewport
      scale for each point culled this makes culling much cheaper.
      19b86229
    • Robert Bragg's avatar
      viewport: consistently use floats for viewports · 013b2433
      Robert Bragg authored
      OpenGL < 4.0 only supports integer based viewports and internally we
      have a mixture of code using floats and integers for viewports. This
      patch switches all viewports throughout clutter and cogl to be
      represented using floats considering that in the future we may want to
      take advantage of floating point viewports with modern hardware/drivers.
      013b2433
  14. 23 Nov, 2010 1 commit
    • Robert Bragg's avatar
      use cogl_matrix_transform_points in clutter · 305bb124
      Robert Bragg authored
      When transforming a paint-volume or transforming allocation vertices we
      are transforming more than one point at a time so we can batch those
      together with cogl_matrix_transform_points instead of
      cogl_matrix_transform_point. Also in both of these cases we don't need
      to do a projective transform so using cogl_matrix_transform_points also
      lets us reduce the per-vertex computation.
      305bb124
  15. 18 Nov, 2010 1 commit
    • Emmanuele Bassi's avatar
      paint-volume: Do not take a reference on the actor · a94ea93b
      Emmanuele Bassi authored
      The paint volume structure is cached in the Actor it references, and
      this causes a reference cycle.
      
      The paint volume is going to be used when painting, so the actor must
      still be valid - otherwise Clutter will bail out far before than
      accessing the actor pointer in ClutterPaintVolume.
      
      Otherwise, we could have used dispose() to check for a valid actor and
      remove a reference if the actor field is !NULL; it feels less clean,
      though, since we're effectively managing an extra reference on
      ourselves.
      
      http://bugzilla.clutter-project.org/show_bug.cgi?id=2431
      a94ea93b
  16. 15 Nov, 2010 1 commit
  17. 21 Oct, 2010 2 commits
  18. 18 Oct, 2010 1 commit
  19. 11 Oct, 2010 2 commits
  20. 29 Sep, 2010 6 commits