[cairo-commit] 2 commits - boilerplate/cairo-boilerplate-vg.c test/negative-stride-image.c test/stride-12-image.c

Bryce Harrington bryce at kemper.freedesktop.org
Mon May 19 17:38:32 PDT 2014


 boilerplate/cairo-boilerplate-vg.c |    8 ++++----
 test/negative-stride-image.c       |    2 +-
 test/stride-12-image.c             |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit ead5c7909f3db1d0d81121fc2775c458871891b2
Author: Ravi Nanjundappa <nravi.n at samsung.com>
Date:   Mon May 12 14:59:03 2014 +0530

    vg: Use EGL_NONE and GLX_NONE in place of None
    
    Use EGL_NONE in EGL section and GLX_NONE in GLX section
    instead of None in cairo-boilerplate-vg.c
    
    Signed-off-by: Ravi Nanjundappa <nravi.n at samsung.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55805

diff --git a/boilerplate/cairo-boilerplate-vg.c b/boilerplate/cairo-boilerplate-vg.c
index ee32b3c..6927657 100644
--- a/boilerplate/cairo-boilerplate-vg.c
+++ b/boilerplate/cairo-boilerplate-vg.c
@@ -87,7 +87,7 @@ _cairo_boilerplate_vg_create_surface_glx (const char		    *name,
 	GLX_BLUE_SIZE, 1,
 	GLX_ALPHA_SIZE, 1,
 	GLX_DOUBLEBUFFER,
-	None
+	GLX_NONE
     };
     int rgb_attribs[] = {
 	GLX_RGBA,
@@ -95,7 +95,7 @@ _cairo_boilerplate_vg_create_surface_glx (const char		    *name,
 	GLX_GREEN_SIZE, 1,
 	GLX_BLUE_SIZE, 1,
 	GLX_DOUBLEBUFFER,
-	None
+	GLX_NONE
     };
     XVisualInfo *vi;
     Display *dpy;
@@ -215,7 +215,7 @@ _cairo_boilerplate_vg_create_surface_egl (const char		    *name,
 	EGL_ALPHA_SIZE, 8,
 	EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
 	EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT,
-	None
+	EGL_NONE
     };
     int rgb_attribs[] = {
 	EGL_RED_SIZE, 8,
@@ -225,7 +225,7 @@ _cairo_boilerplate_vg_create_surface_egl (const char		    *name,
 	EGL_VG_ALPHA_FORMAT, EGL_VG_ALPHA_FORMAT_PRE_BIT,
 	EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
 	EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT,
-	None
+	EGL_NONE
     };
     int dummy_attribs[] = {
 	EGL_WIDTH, 8, EGL_HEIGHT, 8,
commit d1453c512c8213115bd489b3ea8849b1c840b551
Author: Ravi Nanjundappa <nravi.n at samsung.com>
Date:   Tue May 6 15:44:21 2014 +0530

    test : Maintain consistency in the usage of xcalloc
    
    xcalloc is a wrapper for calloc. If it can't allocate memory then it
    terminates the program. The current changes replace the usages of calloc
    by xcalloc in tests.
    
    Signed-off-by: Ravi Nanjundappa <nravi.n at samsung.com>

diff --git a/test/negative-stride-image.c b/test/negative-stride-image.c
index a407b8c..dfc8d64 100644
--- a/test/negative-stride-image.c
+++ b/test/negative-stride-image.c
@@ -41,7 +41,7 @@ draw (cairo_t *cr, int width, int height)
     png = cairo_test_create_surface_from_png (ctx, png_filename);
 
     stride = cairo_format_stride_for_width (format, width);
-    data = calloc (stride, height);
+    data = xcalloc (stride, height);
     inv = cairo_image_surface_create_for_data (data + stride * (height - 1),
 					       format, width, height, -stride);
 
diff --git a/test/stride-12-image.c b/test/stride-12-image.c
index 21bd8b0..5650e98 100644
--- a/test/stride-12-image.c
+++ b/test/stride-12-image.c
@@ -41,7 +41,7 @@ draw (cairo_t *cr, int width, int height)
     png = cairo_test_create_surface_from_png (ctx, png_filename);
 
     stride = cairo_format_stride_for_width (format, width) + 12;
-    data = calloc (stride, height);
+    data = xcalloc (stride, height);
     src = cairo_image_surface_create_for_data (data, format,
 					       width, height, stride);
 


More information about the cairo-commit mailing list