1. 13 Jun, 2018 5 commits
  2. 01 Jun, 2018 5 commits
    • Alexandre Bique's avatar
      Fix test compilation when font-config is disabled · ccdb8e23
      Alexandre Bique authored
      
      
      Building cairo without font-config fails because test/font-variations.c
      was getting compiled without freetype2.
      Reviewed-by: default avatarBryce Harrington <bryce@osg.samsung.com>
      ccdb8e23
    • Bryce Harrington's avatar
      win32: Copyedit recent comments · c6e12d33
      Bryce Harrington authored
      c6e12d33
    • Vasily Galkin's avatar
      win32: Allow GDI operations for argb32 surfaces (allowed by surface flags) · d4355ece
      Vasily Galkin authored
      This finishes a patch series to speed up CAIRO_OPERATOR_SOURCE when used
      to copy data to a argb32 cairo surface corresponding to a win32 dc from
      a "backbuffer" - DibSection-based cairo surface created with
      cairo_surface_create_similar().
      
      This final patch allows the GDI compositor to be used on argb32
      surfaces.  For display surfaces, only copying is allowed with gdi (by
      BitBlt), since other operations are filtered by flags in
      implementations.
      
      But since copying pixels is the only operation used in the most common
      scenario (prepare an offscreen image and send it to the screen) - this
      is important for presenting argb32 windows with Cairo directly or with
      gtk+gdk (which nowadays always creates argb32 windows).
      
      Before this patch pixel copy worked by:
      1. mapping image to memory (by copying data from window dc to system
         memory which is very slow on windows maybe due to gpu or interprocess
         access)
      2. copying new data over that image.
      3. copying updated image from system memory back to window dc.
      
      After this patch there is only one step:
      
      2+3. Copying new data over window dc.
      
      Completely eliminating step 1 gives a very huge speedup and allows
      argb32 cairo drawing be as fast as typical dibsection-buffered gdi
      drawing.
      
      There is quick & dirty cairo-vs-gdi perf test made for this patch set:
      https://gitlab.gnome.org/galkinvv/cairo/snippets/109
      See the Cairo mailing list for April 2018 for data and discussion of
      performance improvements.
      
      End-user visible speedup does present too - it relates to the following bug
      
      https://gitlab.gnome.org/GNOME/meld/issues/133
      
      This Cairo speedup allows more simultaneous meld windows
      without eating 100% of cpu core time on spinner rendering.
      d4355ece
    • Vasily Galkin's avatar
      win32: CAIRO_WIN32_SURFACE_CAN_RGB_BRUSH and other argb32 flags set+check · 0cb7aad2
      Vasily Galkin authored
      This belongs to a patch series that speeds up CAIRO_OPERATOR_SOURCE when
      used to copy data to an argb32 cairo surface corresponding to a win32 dc
      from a "backbuffer" - DibSection-based cairo surface created with
      cairo_surface_create_similar().
      
      This patch introduces checks to ensure that no solid brush GDI operations
      are attempted when using argb32 surfaces.  Doing this allows enabling
      usage of the GDI compositor when these surfaces are in use.
      
      To make these checks work, _cairo_win32_flags_for_dc disables
      STRETCHBLT, STRETCHDIB and RGB_BRUSH in the argb32 flag.
      
      _cairo_win32_flags_for_dc() is also refactored to make the distinction
      between rgb24 and argb32 more readable.  All logic & flags for rgb24
      surfaces are retained, except for the addition of
      CAIRO_WIN32_SURFACE_CAN_RGB_BRUSH.
      
      The logic of forbidding AlphaBlend on display surfaces is also
      kept as is without investigation.
      0cb7aad2
    • Vasily Galkin's avatar
      win32: Introduce new flag to mark surfaces that support solid brush drawing · 884275c3
      Vasily Galkin authored
      This is part of a patch series to speed up CAIRO_OPERATOR_SOURCE when
      used to copy data to an argb32 cairo surface corresponding to a win32 dc
      from a "backbuffer" - DibSection-based cairo surface created with
      cairo_surface_create_similar().
      
      This initial patch presents only private header changes without changing
      any implementation logic.
      
      The big problem with argb32 surfaces and GDI is that GDI is unable to
      correctly set the alpha channel when using operations other than BitBlt
      and AlphaBlend.
      
      To solve this, a CAIRO_WIN32_SURFACE_CAN_RGB_BRUSH flag is introduced in
      this commit to be mark surfaces that correctly handle such brushes
      - essentially all surface types except argb32.
      The _cairo_win32_flags_for_dc() call receives a new argument that is
      used to calculate the flag.
      884275c3
  3. 29 May, 2018 1 commit
  4. 07 May, 2018 2 commits
  5. 21 Apr, 2018 1 commit
  6. 12 Apr, 2018 1 commit
  7. 11 Apr, 2018 1 commit
  8. 03 Apr, 2018 3 commits
    • Bryce Harrington's avatar
      Disable skia from configure · 38806bc3
      Bryce Harrington authored
      Implement suggestion by Adrian Johnson to comment out skia in
      configure.ac to avoid presenting it as an option to users.  This was
      discussed on the Cairo mailing list in September 2017.
      
      Skia is not API stable and is not available in packaged+versioned forms,
      resulting in it being a continually moving target.  I.e. it's pretty
      much always unusably out of date.  The last update to the skia backend
      was in 2014, and had not been updated very regularly prior to that.
      
      We'll simply disable it for now.  If no one complains by the next Cairo
      snapshot release, we'll assume no one is needing it and will drop the
      code entirely.
      
      Meanwhile, if anyone does need it, it can be uncommented and used.
      
      (The changes to the win32 build config appear to be automatically
      generated as a result of disabling the feature in configure.  I'm
      committing them to avoid confusion.)
      38806bc3
    • Bryce Harrington's avatar
    • Unknown's avatar
      Cairo trivial typos · 12cb59be
      Unknown authored
      
      
      Found using `codespell -q 3 -I cairo-whitelist.txt`
      whereby whitelist contained:
      ```
      amin
      iff
      lod
      writen
      ```
      Reviewed-by: default avatarBryce Harrington <bryce@osg.samsung.com>
      12cb59be
  9. 02 Apr, 2018 3 commits
  10. 15 Mar, 2018 1 commit
    • Uli Schlachter's avatar
      Fix a 'memory leak' in the image compositor · 1ed124ac
      Uli Schlachter authored
      There is a global pixman_glyph_cache_t instance that is initialized on
      first use and shows up in valgrind output as a relatively large leak (I
      think it was about 200 KiB). The reason for this is that this cache is
      not freed by cairo_debug_reset_static_data().
      
      This commit wires up freeing the cache to
      cairo_debug_reset_static_data().
      
      This cache was introduced in commit 615205cf
      
       from 2012.
      Signed-off-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
      1ed124ac
  11. 08 Mar, 2018 2 commits
  12. 07 Mar, 2018 1 commit
  13. 28 Feb, 2018 1 commit
  14. 06 Feb, 2018 4 commits
  15. 24 Jan, 2018 2 commits
    • Bryce Harrington's avatar
      font: Check return value from _cairo_ft_unscaled_font_lock_face · 1cbebafe
      Bryce Harrington authored
      cairo-ft-font.c: In function ‘_cairo_ft_has_color_glyphs’:
      cairo-ft-font.c:3011:9: warning: ignoring return value of ‘_cairo_ft_unscaled_font_lock_face’, declared with attribute warn_unused_result [-Wunused-result]
               _cairo_ft_unscaled_font_lock_face (unscaled);
               ^
      1cbebafe
    • Bryce Harrington's avatar
      Fix two type casting warnings in get_C_locale() · bc335a74
      Bryce Harrington authored
      cairo-misc.c:806:43: warning: passing argument 1 of ‘_cairo_atomic_ptr_get’ from incompatible pointer type
           C = (locale_t) _cairo_atomic_ptr_get (&C_locale);
                                                 ^
      
      cairo-misc.c:811:45: warning: passing argument 1 of ‘_cairo_atomic_ptr_cmpxchg_impl’ from incompatible pointer type
               if (!_cairo_atomic_ptr_cmpxchg (&C_locale, NULL, C)) {
                                                   ^
      
      Routines are expecting a void** so cast.
      bc335a74
  16. 22 Jan, 2018 1 commit
  17. 19 Jan, 2018 2 commits
  18. 16 Jan, 2018 1 commit
  19. 13 Jan, 2018 2 commits
  20. 08 Jan, 2018 1 commit