1. 22 Jan, 2010 21 commits
    • Chris Wilson's avatar
      Add cairo_device_t · f617d5fc
      Chris Wilson authored
      The device is a generic method for accessing the underlying interface
      with the native graphics subsystem, typically the X connection or
      perhaps the GL context. By exposing a cairo_device_t on a surface and
      its various methods we enable finer control over interoperability with
      external interactions of the device by applications. The use case in
      mind is, for example, a multi-threaded gstreamer which needs to serialise
      its own direct access to the device along with Cairo's across many
      Secondly, the cairo_device_t is a unifying API for the mismash of
      backend specific methods for controlling creation of surfaces with
      explicit devices and a convenient hook for debugging and introspection.
      The principal components of the API are the memory management of:
        cairo_device_finish() and
      along with a pair of routines for serialising interaction:
        cairo_device_acquire() and
      and a method to flush any outstanding accesses:
      The device for a particular surface may be retrieved using:
      The device returned is owned by the surface.
    • Chris Wilson's avatar
      Recursive mutex. · 82f8aa54
      Chris Wilson authored
      Implement a recursive mutex which will be needed for cairo_device_t.
      In particular only pthreads by default is a non-recursive mutex (to my
      knowledge) - both win32 critical sections and mutexes on Quartz are
    • Chris Wilson's avatar
      configure: Globally define AC_GNU_SOURCE · d2f251f8
      Chris Wilson authored
      We were using _GNU_SOURCE throughout the codebase, so simply define it
      once during configure. This is the easiest method to enable recursive
      mutexes using pthreads, as required in a pending patch.
    • Chris Wilson's avatar
      Real zero-copy cow snapshotting · 934d0d0d
      Chris Wilson authored
      The first iteration of COW snapshotting always made an initial copy when
      the snapshot was requested (and reused that copy until the surface was
      modified). However, in a few circumstances we can avoid even that copy
      so long as the surface is still alive and unmodified between the
      snapshotting and its use. In order to do so, we need a new proxy surface
      that can automatically perform the copy if the target should disappear
      prior to use.
    • Chris Wilson's avatar
      Remove content matching from snapshot lookup. · 6b3e19aa
      Chris Wilson authored
      This was never used, so remove the complexity from the interface.
    • Chris Wilson's avatar
      Add subsurface. · dc829081
      Chris Wilson authored
      A subsurface is a region of another surface that may be used either to
      restrict the writable area of a context or the readable extents of a
      source. Whilst writing, access to the exterior of the subsurface is
      prevented via clipping and when used as a source reads from the exterior
      of the subsurface are governed via the extend mechanism of the pattern.
    • Chris Wilson's avatar
      Add surface-offset internal API. · b8eacbfa
      Chris Wilson authored
      This is a simplified version of the wrapping surface where the target
      surface is just a subsurface onto which we wish to draw the current
      operation. In particular this is useful for the subsurface API as well
      as fallbacks.
    • Chris Wilson's avatar
      Unify the two freed object pools · f2c32d01
      Chris Wilson authored
      Discard some duplicate code and shared a single freed object pointer
      pool between the pattern and clip.
    • Chris Wilson's avatar
      Constify stroke style and matrices. · cfd20482
      Chris Wilson authored
      As a simple step to ensure that we do not inadvertently modify (or at least
      generate compiler warns if we try) user data, mark the incoming style
      and matrices as constant.
    • Benjamin Otte's avatar
      [test] Add pthread-same-source test · 3e17c559
      Benjamin Otte authored
      Multiple threads render using the same source surface, but with
      different extend and filter.
    • Benjamin Otte's avatar
      [test] Add a simple multithreading test · 30a12f80
      Benjamin Otte authored
    • Benjamin Otte's avatar
      [test] Add new test checking is_clear is handled properly · 038829eb
      Benjamin Otte authored
      This test does various operations with a clear source surface with
      various content types.
      The idea is to make sure optimizations done when surface->is_clear ==
      TRUE only happen in the proper cases.
    • Chris Wilson's avatar
      script: Handle cache allocation failure more gracefully · bf7fb4e0
      Chris Wilson authored
      Instead of bailing out if we cannot store the glyph cache on the font,
      simply do not store the glyph cache on the font...
    • Chris Wilson's avatar
      script: Free the correct pattern after failure. · 2b312806
      Chris Wilson authored
      The error path attempted to free the resolved pattern which it had just
      discovered was NULL and not the locally allocated pattern...
    • Chris Wilson's avatar
      script: Permit surface operations on the context · bc2d0ad1
      Chris Wilson authored
      By implicitly reference the target of the context instead, i.e.
      this reduces the use of:
        /target get (example.png) write-to-png pop
      as a common idiom where the context is kept on the stack and the surface
    • Chris Wilson's avatar
      perf: Enable a surface cache for perf-trace · 411c09ee
      Chris Wilson authored
      Real applications that control their Drawable externally to Cairo are
      'disadvantaged' by cairo-perf-trace when it creates a similar surface
      for each new instance of the same Drawable. The difficulty in
      maintaining one perf surface for every application surface is that the
      traces do not track lifetimes for the application surfaces, so we would
      just accumulate stale surfaces. The surface cache takes a different
      approach and returns the same surface for each active Drawable, and
      maintains a hold-over of the MRU 16 surfaces. This achieves 60-80% hit
      rate with firefox, which is probably as good as can be expected.
      Obviously for double-buffered applications we only every draw to freshly
      created surfaces (and Gtk+ bypasses cairo to do the final copy -- the
      ideal application would just use a push-group for double buffering, in
      which case we would capture and replay the entire expose event).
      To enable use of the surface cache whilst replaying use -c:
        ./cairo-perf-trace -c firefox-talos-gfx
    • Chris Wilson's avatar
      Move _cairo_error() to a standalone header · c50c8b90
      Chris Wilson authored
      A pending commit will want to include some utility code from cairo and
      so we need to extricate the error handling from the PLT symbol hiding.
    • Chris Wilson's avatar
      surface-wrapper: Avoid copying patterns and clips unless transformed. · 558f9501
      Chris Wilson authored
      An older variant of the fixes for moving the device transformation out
      of the surface layer, but languished in a side branch. The only benefit
      of this patch is that it avoids the copy where possible.
    • Chris Wilson's avatar
      gitignore: refresh · 8f694817
      Chris Wilson authored
      Add forgotten local targets to .gitignore
    • Emma Anholt's avatar
      [gl] Cache a temporary glyph compositing mask for reuse later. · 5914e995
      Emma Anholt authored
      Cuts firefox-talos-gfx time from 56 seconds to 43 seconds.
    • Emma Anholt's avatar
      [gl] Composite component-alpha glyphs directly instead of through a mask. · 1bf0f64e
      Emma Anholt authored
      Cuts gnome-terminal-vim time from 58 seconds to 20.
  2. 21 Jan, 2010 2 commits
    • Emma Anholt's avatar
      [gl] Use GL_RGBA textures even for CAIRO_CONTENT_COLOR. · 12d521df
      Emma Anholt authored
      When the texture is GL_RGB, GL_CLAMP_TO_BORDER (EXTEND_NONE) fills the
      border color alpha channel with 1, when the whole reason we were using
      the border color was to get a color and alpha of 0.  We're forced to
      use GL_RGBA textures and do extra work to fill in the alpha channel of
      them to 1 to get cairo's desired behavior.
      This fixes a failure in rotate-image-surface-paint and 4 other
      testcases.  No performance difference in firefox-talos-gfx.
    • Emma Anholt's avatar
      [gl] Add support for component-alpha glyph rendering. · e316cb9d
      Emma Anholt authored
      This is done using a mask and the two-pass trick I did for EXA.  Fixes
  3. 20 Jan, 2010 1 commit
  4. 15 Jan, 2010 8 commits
  5. 14 Jan, 2010 4 commits
  6. 13 Jan, 2010 4 commits