[cairo-commit] 2 commits - NEWS perf/cairo-perf-chart.c perf/cairo-perf-compare-backends.c perf/cairo-perf.h perf/cairo-perf-trace.c perf/micro

Bryce Harrington bryce at kemper.freedesktop.org
Fri Apr 18 17:13:15 PDT 2014


 NEWS                               |   67 +++++++++++++++++++++++++------------
 perf/cairo-perf-chart.c            |    2 -
 perf/cairo-perf-compare-backends.c |    1 
 perf/cairo-perf-trace.c            |    5 +-
 perf/cairo-perf.h                  |   12 ++++++
 perf/micro/cairo-perf-cover.c      |    5 +-
 perf/micro/dragon.c                |    8 ----
 perf/micro/zrusin.c                |    4 --
 8 files changed, 63 insertions(+), 41 deletions(-)

New commits:
commit 2d95f803b15d3d8f70df0e7278ad7bdeaf99fb59
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Thu Apr 17 23:59:36 2014 -0700

    NEWS: Add bug links and reword feature and bug descriptions

diff --git a/NEWS b/NEWS
index 7ad26f7..e98be61 100644
--- a/NEWS
+++ b/NEWS
@@ -6,33 +6,37 @@ intro text...
 Features
 --------
 
-  Update our requirements to glib 2.14 and pixman 0.30.
+  Use Pixman's convolution filters for image downscaling, such as for
+  raster images in Inkscape SVG documents.  This improves image quality
+  when viewing large images on low resolution devices, as firefox and
+  chromium already do.
 
-  Use Pixman's convolution filters for image downscaling.  Include a
-  downscaling test.
+  Improve handling of device transformation and scaling, allowing Cairo
+  to now support scaling at a device level, permitting easier, more
+  transparent HiDPI support.
 
-  Improve handling of device transformation and scaling.  New public
-  functions cairo_surface_set_device_scale and
-  cairo_surface_get_device_scale are available.
-
-  Support JBIG2 mime data in PDF.
+  Support JBIG2 mime data in PDF.  This allows embedding of more
+  compressed JPEG formats within PDF, rather than including the full
+  uncompressed image.  Also, reduce the number of transparency groups
+  used by PDF to keep the file size small and viewing/printing of the
+  PDF fast.
 
-  If the group contains only a combination of clear and opaque alpha and
-  only OPERATOR_OVER is used in the group and to paint the group, a
-  transparency group is not required when generating pdf.
+  Expand the embedding section to include stencil mask support.
 
-  Add support for stencil masks with jpeg/jpx/jbig2 embedding in PDFs.
+  Reorder font declarations to be in natural order.
 
-  Optimize PDF images where the source and mask are both images with the
-  same extents.
 
-  Reorder font declarations to be in natural order
+API Changes
+-----------
+  New public functions cairo_surface_set_device_scale and
+  cairo_surface_get_device_scale are available.
 
-  Alter the rounding algorithm for converting floating point numbers to
-  integers to incur less error
 
-  In matrix transformations, round extremely small values to zero
+Dependency Changes
+------------------
 
+  Cairo now requires glib 2.14 for its gobject helper functions,
+  and pixman 0.30 for downscaling.
 
 Bug fixes
 ---------
@@ -52,12 +56,16 @@ Bug fixes
 
   Fix a double-free exposed by multithreaded apps creating and
   destroying the same font concurrently.
+  https://bugs.freedesktop.org/show_bug.cgi?id=69470
 
   Fix corrupt stacks produced by bugs in operand emission for trace.
 
   Fix out of bounds array access in format cache for xlib
 
-  Don't rename glyphs used by seac operator
+  Don't rename glyphs used by seac operator.  This can cause certain
+  combined characters to use their decorations (e.g. umlauts on ö) to be
+  lost during printing of PDFs using evince.
+  https://bugs.freedesktop.org/show_bug.cgi?id=70364
 
   Fix crash on calling cairo_create with a finished surface
 
@@ -69,16 +77,33 @@ Bug fixes
 
   Fix rectangle stroke with non rectilinear pen
 
-  Fix imagemask with pattern source failure on some printers
+  Fix imagemask with pattern source failure on some printers.  This bug
+  could cause files converted using pdftops to fail for example on Ricoh
+  printers, or opening in Adobe Distiller on Windows.
+  https://bugs.freedesktop.org/show_bug.cgi?id=69485
 
   Fix whitespace in font names
 
-  Fix page size in generated PDFs
+  Fix page size in generated PDFs.  When printing using pdftocairo on
+  larger page sizes, such as 11x17, the image would be cropped to letter
+  size.
+  https://bugs.freedesktop.org/show_bug.cgi?id=73452
 
   Fix path-currentpoint test by preserving current-point in
   copy_path()/append_path() sequence
 
+  Fix generation of HTML in code docs for
+  cairo-format-stride-for-width.  Raw HTML code was being passed
+  to the browser, instead of displaying normally.
+  https://bugs.freedesktop.org/show_bug.cgi?id=63257
+
+  Fix spelling of "tessellator" throughout code.  We're using the
+  American rather than British spelling of this word.
+  https://bugs.freedesktop.org/show_bug.cgi?id=50411
+
   Fix crash when trying to modify a (const) all-clipped cairo_clip_t
+  https://bugs.freedesktop.org/show_bug.cgi?id=75819
+
 
   Various cleanups and fixes to warnings, documentation, tests, and
   build system.  Improve error handling and return value checks.
commit cd11a4ff0421fd293279b202be800550890574bb
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Wed Apr 16 17:37:18 2014 -0700

    perf: Refactor some common macros to cairo-perf.h
    
    These macros are standard in src's cairoint.h and test's cairo-test.h
    internal header files, so for consistency do the same thing with perf's
    cairo-perf.h.
    
    Reviewed-by: Uli Schlachter <psychon at znc.in>

diff --git a/perf/cairo-perf-chart.c b/perf/cairo-perf-chart.c
index 1faa964..738fe5c 100644
--- a/perf/cairo-perf-chart.c
+++ b/perf/cairo-perf-chart.c
@@ -57,8 +57,6 @@ struct color {
 #define FONT_SIZE 12
 #define PAD (4)
 
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-
 static double
 to_factor (double x)
 {
diff --git a/perf/cairo-perf-compare-backends.c b/perf/cairo-perf-compare-backends.c
index 2cbb24c..ff7359e 100644
--- a/perf/cairo-perf-compare-backends.c
+++ b/perf/cairo-perf-compare-backends.c
@@ -149,7 +149,6 @@ test_diff_print (test_diff_t		     *diff,
     printf("\n");
 }
 
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
 static void
 cairo_perf_reports_compare (cairo_perf_report_t 	*reports,
 			    int 			 num_reports,
diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c
index f27f8e4..02e0e29 100644
--- a/perf/cairo-perf-trace.c
+++ b/perf/cairo-perf-trace.c
@@ -199,7 +199,6 @@ scache_equal (const void *A,
     return a->entry.hash == b->entry.hash;
 }
 
-#define ARRAY_SIZE(A) (sizeof(A)/sizeof(A[0]))
 static void
 scache_mark_active (cairo_surface_t *surface)
 {
@@ -210,7 +209,7 @@ scache_mark_active (cairo_surface_t *surface)
 	return;
 
     t0 = cairo_surface_reference (surface);
-    for (n = 0; n < ARRAY_SIZE (surface_holdovers); n++) {
+    for (n = 0; n < ARRAY_LENGTH (surface_holdovers); n++) {
 	if (surface_holdovers[n] == surface) {
 	    surface_holdovers[n] = t0;
 	    t0 = surface;
@@ -232,7 +231,7 @@ scache_clear (void)
     if (surface_cache == NULL)
 	return;
 
-    for (n = 0; n < ARRAY_SIZE (surface_holdovers); n++) {
+    for (n = 0; n < ARRAY_LENGTH (surface_holdovers); n++) {
 	cairo_surface_destroy (surface_holdovers[n]);
 	surface_holdovers[n] = NULL;
     }
diff --git a/perf/cairo-perf.h b/perf/cairo-perf.h
index 4e898ac..b32b0e0 100644
--- a/perf/cairo-perf.h
+++ b/perf/cairo-perf.h
@@ -195,6 +195,18 @@ test_report_cmp_name (const void *a,
 
 #define CAIRO_PERF_DECL(func) CAIRO_PERF_RUN_DECL(func); CAIRO_PERF_ENABLED_DECL(func)
 
+#ifndef MIN
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+#ifndef MAX
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#endif
+
+#ifndef ARRAY_LENGTH
+#define ARRAY_LENGTH(__array) ((int) (sizeof (__array) / sizeof (__array[0])))
+#endif
+
 CAIRO_PERF_DECL (fill);
 CAIRO_PERF_DECL (paint);
 CAIRO_PERF_DECL (paint_with_alpha);
diff --git a/perf/micro/cairo-perf-cover.c b/perf/micro/cairo-perf-cover.c
index 151a2e6..c249902 100644
--- a/perf/micro/cairo-perf-cover.c
+++ b/perf/micro/cairo-perf-cover.c
@@ -290,7 +290,6 @@ set_source_radial_rgba (cairo_t *cr,
 }
 
 typedef void (*set_source_func_t) (cairo_t *cr, int width, int height);
-#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof((arr)[0]))
 
 void
 cairo_perf_cover_sources_and_operators (cairo_perf_t		*perf,
@@ -325,10 +324,10 @@ cairo_perf_cover_sources_and_operators (cairo_perf_t		*perf,
 	{ CAIRO_OPERATOR_SOURCE, "source" }
     };
 
-    for (i = 0; i < ARRAY_SIZE (sources); i++) {
+    for (i = 0; i < ARRAY_LENGTH (sources); i++) {
 	(sources[i].set_source) (perf->cr, perf->size, perf->size);
 
-	for (j = 0; j < ARRAY_SIZE (operators); j++) {
+	for (j = 0; j < ARRAY_LENGTH (operators); j++) {
 	    cairo_set_operator (perf->cr, operators[j].op);
 
 	    xasprintf (&expanded_name, "%s_%s_%s",
diff --git a/perf/micro/dragon.c b/perf/micro/dragon.c
index e215eac..aa5daf5 100644
--- a/perf/micro/dragon.c
+++ b/perf/micro/dragon.c
@@ -28,14 +28,6 @@
 
 #include "cairo-perf.h"
 
-#ifndef MIN
-#define MIN(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-
-#ifndef MAX
-#define MAX(a,b) (((a) > (b)) ? (a) : (b))
-#endif
-
 static inline int
 next_pot (int v)
 {
diff --git a/perf/micro/zrusin.c b/perf/micro/zrusin.c
index 7d8b004..3dee74d 100644
--- a/perf/micro/zrusin.c
+++ b/perf/micro/zrusin.c
@@ -33,14 +33,12 @@ typedef struct {
 
 #include "zrusin-another.h"
 
-#define ARRAY_SIZE(arr) sizeof(arr)/sizeof(arr[0])
-
 static void
 zrusin_another_path (cairo_t *cr)
 {
     unsigned int i;
 
-    for (i=0; i < ARRAY_SIZE (zrusin_another); i++)
+    for (i=0; i < ARRAY_LENGTH (zrusin_another); i++)
 	cairo_line_to (cr, zrusin_another[i].x, zrusin_another[i].y);
 }
 


More information about the cairo-commit mailing list