1. 15 Jul, 2011 3 commits
  2. 14 Jul, 2011 4 commits
  3. 13 Jul, 2011 4 commits
  4. 09 Jul, 2011 6 commits
    • Uli Schlachter's avatar
      Handle CAIRO_STATUS_DEVICE_FINISHED in switches · cc3e4c6e
      Uli Schlachter authored
      Fixes all warnings that looked like this:
      warning: enumeration value 'CAIRO_STATUS_DEVICE_FINISHED' not handled in switch
      Signed-off-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
    • Uli Schlachter's avatar
      xcb: Don't use xcb surfaces as snapshots · 508990af
      Uli Schlachter authored
      Eventually someone might try to paint to the xcb surface again. However,
      _cairo_surface_begin_modification doesn't like that:
      cairo-surface.c:385: _cairo_surface_begin_modification: Assertion
      `surface->snapshot_of == ((void *)0)' failed.
      There was only a single place in the xcb backend where a cairo_xcb_surface_t
      could be used as a snapshot, so the _cairo_surface_has_snapshot that checked for
      such a surface can be removed, too.
      This does *not* remove all snapshots from the xcb backend, but all the remaining
      snapshots are instances of cairo_xcb_picture_t. These surfaces are only ever
      created internally and thus can't be modified by users directly.
      Fixes: xcb-snapshot-assert
      Signed-off-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
    • Uli Schlachter's avatar
      Add a test case that asserts on xcb · 5b8c01ec
      Uli Schlachter authored
      Signed-off-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
    • Uli Schlachter's avatar
      xcb: Track cairo_xcb_picture_t surfaces · 4153de46
      Uli Schlachter authored
      When e.g. using an image surface as the source for a xcb surface, a
      cairo_xcb_picture_t is created and attached to that image surface as a snapshot.
      This contains the Picture that was created on the X11 server.
      However, as soon as the cairo_xcb_picture_t's cairo_xcb_screen_t is finished and
      destroyed, this picture can't be used anymore. This commit now makes sure all
      these Pictures are freed when the screen is finished.
      This was found because my X server's memory usage grew quite large. Every time
      the app was done drawing, it destroyed its last surface which also destroyed the
      last reference to the cairo_xcb_screen_t. This meant that the existing Picture
      snapshots couldn't be used anymore, but they were still kept around and used up
      memory until there wasn't any free memory left.
      Signed-off-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
    • Uli Schlachter's avatar
      xcb: Move cairo_xcb_picture_t to cairo-xcb-private.h · e775db35
      Uli Schlachter authored
      The next commit will make cairo-xcb-screen.c use this struct and add new
      members. Splitting off the move into its own commits makes that easier to
      Signed-off-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
    • Uli Schlachter's avatar
      xlib-xcb: Register a XCloseDisplay hook · 5b9205cc
      Uli Schlachter authored
      This commits makes the xlib-xcb backend produce its own cairo_device_t. This
      per-Display* device is used to manage the registration of a XCloseDisplay hook
      via XAddExtension/XESetCloseDisplay in the same way that the xlib backend does
      this. The device is necessary to see if we already registered an extension.
      This fixes weird errors when running cairo-test-suite with -a -s. They were
      caused because the backend didn't see the XCloseDisplay and the next
      XOpenDisplay happened to create a xcb_connection_t with the same address as the
      last display. This caused the xcb backend to assume lots of wrongness.
      This commit makes use of _cairo_xlib_display_mutex which is otherwise compiled
      in but not used anywhere when xlib-xcb is enabled.
      Patch v2: Fixed the xcb_device == NULL case and made sure the xcb_device is only
      finished on XCloseDisplay, not when all xlib-xcb surfaces are destroyed.
      Signed-off-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
  5. 08 Jul, 2011 6 commits
  6. 05 Jul, 2011 3 commits
    • Andrea Canciani's avatar
      Make error contexts static · d7cc30eb
      Andrea Canciani authored
      Dynamically creating error contexts requires locking and failure
      handling. The code logic can be simplified by statically defining all
      the possible error contexts.
    • Andrea Canciani's avatar
      Clean up context_pool upon static data reset · ef659649
      Andrea Canciani authored
      In commit f46ba56d
       the static context
      stash was replaced by a dynamic freed pool, which needs to be cleared
      upon resets.
      cairo.c:181: warning: ‘context_pool’ defined but not used
      Reported-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
    • Andrea Canciani's avatar
      Remove conditional compilation of freed-pools · fe3ca9c3
      Andrea Canciani authored
      Conditional compilation was needed to avoid warnings:
      cairo-clip.c:51: warning: ‘clip_path_pool’ defined but not used
      cairo.c:181: warning: ‘context_pool’ defined but not used
      They can be avoided by making sure that _freed_pool_reset(ptr)
      actually consumes its argument. This has the pleasant side-effect that
      forgetting to properly reset a freed-pool now results in a warning if
      atomic ops are disabled/not available.
  7. 03 Jul, 2011 1 commit
    • Uli Schlachter's avatar
      Xlib: Fix boilerplate to work with xlib-xcb · b6c97289
      Uli Schlachter authored
      Xlib boilerplate includes cairo-xlib-surface-private.h, so that it can cast the
      xlib cairo_surface_t to cairo_xlib_surface_t and then mess with some internals
      of that struct.
      However, xlib-xcb doesn't use that struct and thus this results in random memory
      corruption. "Luckily", all the fields that this messes with don't corrupt any
      fields in cairo_xlib_xcb_surface_t, but instead this writes past the end of the
      buffer that was returned from malloc.
      This commit just adds an #if to disable this code section since I have no idea
      what a proper fix would be. This means that the xlib-fallback backend doesn't
      actually test any fallbacks with xlib-xcb, however it never did so anyway.
      If you have any idea how to fix xlib-fallback with xlib-xcb, please speak up.
      Signed-off-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
  8. 02 Jul, 2011 3 commits
  9. 01 Jul, 2011 4 commits
  10. 28 Jun, 2011 1 commit
  11. 25 Jun, 2011 5 commits