1. 24 Feb, 2010 12 commits
  2. 23 Feb, 2010 8 commits
    • Robert Bragg's avatar
      cogl debug: Adds glViewport call tracing · 1c65f2ee
      Robert Bragg authored
      To aid in the debugging of Clutter stage resize issues this adds a
      COGL_DEBUG=opengl option that will trace "some select OpenGL calls"
      (currently just glViewport calls)
      1c65f2ee
    • Robert Bragg's avatar
      cogl debug: hint that all debugging paths are G_UNLIKELY · fa3830ff
      Robert Bragg authored
      Most Cogl debugging code conditions are marked as G_UNLIKELY with the
      intention of having the CPU branch prediction always assume the
      path is disabled so having debugging support in release binaries has
      negligible overhead.
      
      This patch simply fixes a few cases where we weren't using G_UNLIKELY.
      fa3830ff
    • Robert Bragg's avatar
      cogl debug: Support "minimum" level debugging by default · a58d6e8e
      Robert Bragg authored
      We basically want all Clutter applications out in the wild to at least
      have the basic set of COGL_DEBUG/--cogl-debug options available for
      investigating issues.
      a58d6e8e
    • Robert Bragg's avatar
      cogl debug: Makes COGL_DEBUG=all|verbose|help more useful · 511e5ceb
      Robert Bragg authored
      COGL_DEBUG=all wasn't previously useful as there are several options
      that change the behaviour of Cogl and all together wouldn't help anyone
      debug anything.
      
      This patch makes it so COGL_DEBUG=all|verbose now only enables options
      that don't change the behaviour of Cogl, i.e. they only affect the
      amount of noise we'll print to a terminal.
      
      In addition to that this patch also improves the output from
      COGL_DEBUG=help so we now print a table of options including one liner
      descriptions of what each option enables.
      511e5ceb
    • Emmanuele Bassi's avatar
      box: Tweak the depth sorting function · 939e56e2
      Emmanuele Bassi authored
      By changing the depth sorting function we can achieve the same effect as
      ClutterGroup but without the costly append+sort.
      
      http://bugzilla.openedhand.com/show_bug.cgi?id=1988
      939e56e2
    • Emmanuele Bassi's avatar
      cogl: Add deprecation annotation to CoglMaterial ref/unref · 95960ab9
      Emmanuele Bassi authored
      The G_GNUC_DEPRECATED annotation was missing from the material ref and
      unref functions.
      95960ab9
    • Emmanuele Bassi's avatar
      debug: Split debugging notes from behavioural modifiers · a9941e94
      Emmanuele Bassi authored
      Some of the ClutterDebugFlags are not meant as a logging facility: they
      actually change Clutter's behaviour at run-time.
      
      It would be useful to have this distinction ratified, and thus split
      ClutterDebugFlags into two: one DebugFlags for logging facilities and
      another set of flags for behavioural changes.
      
      This split is warranted because:
      
        • it should be possible to do "CLUTTER_DEBUG=all" and only have
          log messages on the output
      
        • it should be possible to use behavioural modifiers even on a
          Clutter that has been compiled without debugging messages
          support
      
      The commit adds two new debugging flags:
      
        ClutterPickDebugFlags - controlled by the CLUTTER_PICK environment
                                variable
      
        ClutterPaintDebugFlags - controlled by the CLUTTER_PAINT environment
                                 variable
      
      The PickDebugFlags are:
      
        nop-picking
        dump-pick-buffers
      
      While the PaintDebugFlags is:
      
        disable-swap-events
      
      The mechanism is equivalent to the CLUTTER_DEBUG environment variable,
      but it does not depend on the debug level selected when configuring and
      compiling Clutter. The picking and painting debugging flags are
      initialized at clutter_init() time.
      
      http://bugzilla.openedhand.com/show_bug.cgi?id=1991
      a9941e94
    • Neil Roberts's avatar
      cogl-vertex-buffer: Fix the malloc fallback for indices · a9c307ff
      Neil Roberts authored
      The size of the malloc'd buffer for indices when VBOs are not
      available was too small so memory corruption would result if it was
      used.
      
      http://bugzilla.o-hand.com/show_bug.cgi?id=1996
      a9c307ff
  3. 22 Feb, 2010 2 commits
    • Emmanuele Bassi's avatar
      device: Motion events compression should honour the device · 14669657
      Emmanuele Bassi authored
      The motion event compression should be affected by the device field of
      the event; that is: we should compress motion events coming from the
      same device.
      14669657
    • Emmanuele Bassi's avatar
      device: Force ENTER on Stage with overlapping Actors · 5ed47327
      Emmanuele Bassi authored
      If an actor is on the boundary of a Stage and the pointer for a device
      enters the Stage over that actor, the sequence of events currently is:
      
        ➔ ENTER (source: actor, related: NULL)
        ➔ MOTION
      
      Thus the Stage never gets an ENTER event. This is a regression from
      Clutter 1.0.
      
      The correct sequence is:
      
        ➔ ENTER (source: stage, related: NULL)
        ➔ ENTER (source: actor, related: stage)
        ➔ MOTION
      
      This also maps to the sequence of events sythesized by Clutter when
      leaving the Stage through an actor overlapping the Stage boundary.
      
      http://bugzilla.moblin.org/show_bug.cgi?id=9781
      5ed47327
  4. 18 Feb, 2010 3 commits
    • Emmanuele Bassi's avatar
      stage: Only clutter_stage_get_default() creates the default stage · ee33357f
      Emmanuele Bassi authored
      The introduction of the StageManager in 0.8 implied that the first Stage
      instance to be created was automatically assigned the status of "default
      stage". This was all well and good, since the default stage was created
      behind the curtains by the initialization sequence.
      
      Now that the initialization sequence does not create a default stage any
      longer, it means that the first stage created using clutter_stage_new()
      gets to be the default, and all special and warm and fuzzy - which also
      means that the first stage created by clutter_stage_new() cannot be
      destroyed or handled as any other stage. Whoopsie.
      
      Let's go back to the old semantics: the stage created by the first
      invocation of clutter_stage_get_default() is the default stage, and
      nothing else can be set as default. One day we'll be able to break the
      API and the whole default stage business will be a thing of the past.
      ee33357f
    • Emmanuele Bassi's avatar
      docs: Document the InputDevice update method · 9a6de875
      Emmanuele Bassi authored
      Embedding toolkits should benefit from a proper documentation of
      clutter_input_device_update_from_event(): its meaning, its use and
      the caveats for the "update_stage" argument.
      9a6de875
    • Neil Roberts's avatar
      win32: Fixup compilation errors from b3982920 · a2afc9d7
      Neil Roberts authored
      That commit added some Win32 code which breaks compilation.
      
      Thanks to Samuel Degrande for help with this.
      a2afc9d7
  5. 17 Feb, 2010 9 commits
    • Robert Bragg's avatar
      cogl_texture_new_from_foreign: improve docs · 5de743de
      Robert Bragg authored
      Improve the explanation of what the x_pot_waste and y_pot_waste
      arguments can be used for.
      5de743de
    • Robert Bragg's avatar
      cogl-texture: for foreign textures; always trust user geom · 9c06c943
      Robert Bragg authored
      We now never query the width and height of the given texture object
      from OpenGL. The problem is that the user may be creating a Cogl
      texture from a texture_from_pixmap object where glTexImage2D was
      never called and the texture_from_pixmap spec doesn't clarify that
      it's reliable to query the width from OpenGL.
      
      This should address:
      http://bugzilla.openedhand.com/show_bug.cgi?id=1502
      
      Thanks to Johan Bilien for reporting
      9c06c943
    • Emmanuele Bassi's avatar
      docs: Fixes for DeviceManager · 8b040cac
      Emmanuele Bassi authored
      8b040cac
    • Emmanuele Bassi's avatar
      device: Allow updating devices from embedding toolkits · 51a3e49c
      Emmanuele Bassi authored
      Embedding toolkits most likely will disable the event handling, so all
      the input device code will not be executed. Unfortunately, the newly
      added synthetic event generation of ENTER and LEAVE event pairs depends
      on having input devices.
      
      In order to unbreak things without reintroducing the madness of the
      previous code we should allow embedding toolkits to just update the
      state of an InputDevice by using the data contained inside the
      ClutterEvent. This strategy has two obvious reasons:
      
        • the embedding toolkit is creating a ClutterEvent by translating
          a toolkit-native event anyway
      
        • this is exactly what ClutterStage does when processing events
      
      We are, essentially, deferring input device handling to the embedding
      toolkits, just like we're deferring event handling to them.
      51a3e49c
    • Emmanuele Bassi's avatar
      device: Impose per-backend DeviceManager · b3982920
      Emmanuele Bassi authored
      The DeviceManager class should be abstract in Clutter, and implemented
      by each backend, as different backends will have different ways to
      detect, initialize and list devices; the X11 backend alone has *two*
      ways of dealing with devices.
      
      This commit makes DeviceManager an abstract class and delegates the
      device initialization and enumeration to per-backend sub-classes.
      
      The responsible for creating the device manager is, obviously, the
      backend singleton.
      
      The X11 and Win32 backends have been updated to the new layout; the
      Win32 backend has been updated blindly, so it might require additional
      testing.
      b3982920
    • Chris Lord's avatar
      [event-x11] Don't relayout on window move · 0bf6d57a
      Chris Lord authored
      ConfigureNotify is delivered on window movements too, but there is no
      need to queue a relayout on these as the viewport hasn't changed size.
      Check for the window actually changing size on ConfigureNotify before
      queueing a relayout.
      
      This fixes laggy window movement when moving a window in response to
      Clutter mouse motion events.
      0bf6d57a
    • Neil Roberts's avatar
      cogl-clip-stack: Round the coords when clipping to a window rect · 05054bed
      Neil Roberts authored
      The size and position of the window rectangle for clipping in
      try_pushing_rect_as_window_rect is calculated by projecting the
      rectangle coordinates. Due to rounding errors, this can end up with
      slightly off numbers like 34.999999. These were then being cast
      directly to an integer so it could end up off by one.
      
      This uses a new macro called COGL_UTIL_NEARBYINT which is a
      replacement for the C99 nearbyint function.
      05054bed
    • Neil Roberts's avatar
      test-cogl-vertex-buffer: Fix the maximum index number · a726ef32
      Neil Roberts authored
      It was passing the number of vertices to
      cogl_vertex_buffer_draw_elements but instead it should take the
      maximum index which would be the number of vertices minus one. This
      was causing errors to be reported with the checks filterset of Bugle.
      a726ef32
    • Emmanuele Bassi's avatar
      Improve LEAVE events for border actors · fbcaf1e0
      Emmanuele Bassi authored
      If an actor is lying on the border of the Stage it might miss the LEAVE
      event when the pointer of a device leaves the Stage window. Since the
      backend is unsetting the Stage back pointer on the InputDevice we can
      queue the emission of a LEAVE event on the pointer actor as well.
      
      http://bugzilla.moblin.org/show_bug.cgi?id=9677
      fbcaf1e0
  6. 16 Feb, 2010 6 commits
    • Chris Lord's avatar
      [stage-x11] Fix a warning due to a missing cast · 719e314b
      Chris Lord authored
      I stupidly forgot to cast a ClutterStage to a ClutterActor and somehow
      missed or didn't get the compiler warning. Fix.
      719e314b
    • Chris Lord's avatar
      [stage-x11] Fix resizing for foreign windows · f9f03894
      Chris Lord authored
      As well as manually setting the geometry size, we needed to queue a
      relayout. This is what the ConfigureNotify handler would normally do,
      but we don't get this event when using a foreign window (obviously).
      
      This should fix resizing in things like gtk-clutter.
      f9f03894
    • Chris Lord's avatar
      [stage-x11] Set the geometry size for foreign wins · df6e7aee
      Chris Lord authored
      If we get into the resize function and it's a foreign window, set the
      geometry size so that the allocate will set the backend size and call
      glViewport.
      df6e7aee
    • Emmanuele Bassi's avatar
      Add test-stage-sizing to the ignore file · c2d01647
      Emmanuele Bassi authored
      c2d01647
    • Chris Lord's avatar
      [test-interactive] Add a stage sizing test · d42f928c
      Chris Lord authored
      Add an interactive stage sizing test to test the interaction of
      fullscreening/resizing/expanding/shrinking a visible stage.
      d42f928c
    • Chris Lord's avatar
      [stage-x11] Fix switching fullscreen mode · 1117b6a9
      Chris Lord authored
      Setting/unsetting fullscreen on a mapped or unmapped window now works
      correctly.
      
      If you unfullscreen a window that was initially full-screened, it will
      unset the fullscreen hint and the WM will likely push the size down to
      the largest valid size.
      
      If the window was previously un-fullscreened, Clutter will restore the
      previous size.
      
      Fullscreening also now works if the WM switches the hint without the
      application's knowledge (as happens when you resize a window to the size
      of the screen, for example, with stock metacity).
      1117b6a9