pixman: Branch 'master' - 3 commits
Vladimir Vukicevic
vladimir at kemper.freedesktop.org
Mon Sep 10 16:20:29 PDT 2007
.gitignore | 5 +++++
pixman/Makefile.am | 13 +++----------
pixman/Makefile.win32 | 31 +++++++++++++++++++++++++++++++
pixman/pixman-compose-accessors.c | 4 ++++
pixman/pixman-compose.c | 2 ++
pixman/pixman-compute-region.c | 3 +++
pixman/pixman-edge-accessors.c | 4 ++++
pixman/pixman-edge.c | 4 ++++
pixman/pixman-image.c | 2 ++
pixman/pixman-mmx.c | 3 +++
pixman/pixman-pict.c | 3 +++
pixman/pixman-private.h | 25 +++++++++++++++++++++++++
pixman/pixman-region.c | 14 ++++++++++++++
pixman/pixman-timer.c | 7 +++++++
pixman/pixman-trap.c | 3 +++
pixman/pixman-utils.c | 3 +++
16 files changed, 116 insertions(+), 10 deletions(-)
New commits:
diff-tree dc7c047d1c68f343b66e81d9e79084e4171e2634 (from 1b098ede1938d1225c32cf5639e4c7a891859897)
Author: Vladimir Vukicevic <vladimir at pobox.com>
Date: Mon Sep 10 15:20:44 2007 -0700
[memlk] don't try to allocate new data for 0-rectangle regions
diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c
index fff49e7..ac23806 100644
--- a/pixman/pixman-region.c
+++ b/pixman/pixman-region.c
@@ -2518,6 +2518,8 @@ pixman_region_init_rects (pixman_region1
{
int overlap;
+ /* if it's 1, then we just want to set the extents, so call
+ * the existing method. */
if (count == 1) {
pixman_region_init_rect(region,
boxes[0].x1,
@@ -2528,6 +2530,15 @@ pixman_region_init_rects (pixman_region1
}
pixman_region_init(region);
+
+ /* if it's 0, don't call pixman_rect_alloc -- 0 rectangles is
+ * a special case, and causing pixman_rect_alloc would cause
+ * us to leak memory (because the 0-rect case should be the
+ * static pixman_region_emptyData data).
+ */
+ if (count == 0)
+ return TRUE;
+
if (!pixman_rect_alloc(region, count))
return FALSE;
diff-tree 1b098ede1938d1225c32cf5639e4c7a891859897 (from 5fc4d5ab1fae8677f5a95f5eb0e4fad3a9e0bf82)
Author: Vladimir Vukicevic <vladimir at pobox.com>
Date: Tue Sep 4 11:19:33 2007 -0700
[win32] Makefile and compilation fixes for win32
diff --git a/.gitignore b/.gitignore
index ee2f0a3..7f08f61 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,8 @@ config.h.in
.*.swp
test/composite-test
test/gradient-test
+*.pdb
+*.dll
+*.lib
+*.ilk
+*.obj
diff --git a/pixman/Makefile.win32 b/pixman/Makefile.win32
new file mode 100644
index 0000000..e0a1828
--- /dev/null
+++ b/pixman/Makefile.win32
@@ -0,0 +1,31 @@
+LIBRARY = pixman-1
+
+CC = cl
+LINK = link
+
+CFLAGS = -MD -Zi -nologo -O2 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -I../pixman/src -I. -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT=""
+
+SOURCES = \
+ pixman-region.c \
+ pixman-image.c \
+ pixman-compose.c \
+ pixman-compose-accessors.c \
+ pixman-pict.c \
+ pixman-utils.c \
+ pixman-edge.c \
+ pixman-edge-accessors.c \
+ pixman-trap.c \
+ pixman-compute-region.c \
+ pixman-timer.c \
+ $(NULL)
+
+OBJECTS = $(subst .c,.obj,$(SOURCES))
+
+%.obj: %.c
+ @$(CC) -c $(CFLAGS) -Fo"$@" $<
+
+$(LIBRARY).lib: $(OBJECTS)
+ lib -NOLOGO -OUT:$@ $(OBJECTS)
+
+clean:
+ @rm -f *.obj *.lib *.pdb *.ilk || exit 0
diff --git a/pixman/pixman-compose.c b/pixman/pixman-compose.c
index b48251d..1e91864 100644
--- a/pixman/pixman-compose.c
+++ b/pixman/pixman-compose.c
@@ -23,7 +23,9 @@
* SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdlib.h>
#include <string.h>
diff --git a/pixman/pixman-compute-region.c b/pixman/pixman-compute-region.c
index f9b9de7..1e566a9 100644
--- a/pixman/pixman-compute-region.c
+++ b/pixman/pixman-compute-region.c
@@ -21,7 +21,10 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include "pixman-private.h"
diff --git a/pixman/pixman-edge.c b/pixman/pixman-edge.c
index 24758c3..12c1967 100644
--- a/pixman/pixman-edge.c
+++ b/pixman/pixman-edge.c
@@ -21,7 +21,11 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <string.h>
#include "pixman.h"
#include "pixman-private.h"
diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index c39ee9b..fa32208 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -20,7 +20,9 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <stdlib.h>
#include <stdio.h>
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index 8c7be6d..be79124 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -28,7 +28,10 @@
*
* Based on work by Owen Taylor
*/
+
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#ifdef USE_MMX
diff --git a/pixman/pixman-pict.c b/pixman/pixman-pict.c
index c7d73fc..3bc5267 100644
--- a/pixman/pixman-pict.c
+++ b/pixman/pixman-pict.c
@@ -22,7 +22,10 @@
* Author: Keith Packard, SuSE, Inc.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index 775f7a7..6487bfd 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -37,6 +37,28 @@
# define FUNC ((const char*) ("???"))
#endif
+#ifndef INT16_MIN
+# define INT16_MIN (-32767-1)
+# define INT16_MAX (32767)
+#endif
+
+#ifndef INT32_MIN
+# define INT32_MIN (-2147483647-1)
+# define INT32_MAX (2147483647)
+#endif
+
+#ifndef UINT32_MIN
+# define UINT32_MIN (0)
+# define UINT32_MAX (4294967295U)
+#endif
+
+#ifndef M_PI
+# define M_PI 3.14159265358979323846
+#endif
+
+#ifdef _MSC_VER
+#define inline __inline
+#endif
#define FB_SHIFT 5
#define FB_UNIT (1 << FB_SHIFT)
@@ -774,6 +796,8 @@ pixman_rasterize_edges_accessors (pixman
pixman_fixed_t b);
+#ifdef PIXMAN_TIMING
+
/* Timing */
static inline uint64_t
oil_profile_stamp_rdtsc (void)
@@ -817,5 +841,6 @@ void pixman_timer_register (PixmanTimer
timer##tname.total += OIL_STAMP() - begin##tname; \
}
+#endif /* PIXMAN_TIMING */
#endif /* PIXMAN_PRIVATE_H */
diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c
index 94b6dcc..fff49e7 100644
--- a/pixman/pixman-region.c
+++ b/pixman/pixman-region.c
@@ -45,7 +45,10 @@ SOFTWARE.
******************************************************************/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <stdlib.h>
#include <limits.h>
#include <string.h>
diff --git a/pixman/pixman-timer.c b/pixman/pixman-timer.c
index c762644..ce54e74 100644
--- a/pixman/pixman-timer.c
+++ b/pixman/pixman-timer.c
@@ -19,11 +19,16 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include "pixman-private.h"
+#ifdef PIXMAN_TIMER
+
static PixmanTimer *timers;
static void
@@ -57,3 +62,5 @@ pixman_timer_register (PixmanTimer *time
timer->next = timers;
timers = timer;
}
+
+#endif
diff --git a/pixman/pixman-trap.c b/pixman/pixman-trap.c
index 204ca04..ed32e92 100644
--- a/pixman/pixman-trap.c
+++ b/pixman/pixman-trap.c
@@ -22,7 +22,10 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <stdio.h>
#include "pixman-private.h"
diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c
index cdf115d..fc93608 100644
--- a/pixman/pixman-utils.c
+++ b/pixman/pixman-utils.c
@@ -21,7 +21,10 @@
* Author: Keith Packard, SuSE, Inc.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <stdlib.h>
#include "pixman.h"
#include "pixman-private.h"
diff-tree 5fc4d5ab1fae8677f5a95f5eb0e4fad3a9e0bf82 (from 6b96b62ca419ac414d5715a4ba9f30664e510fcd)
Author: Vladimir Vukicevic <vladimir at pobox.com>
Date: Tue Sep 4 11:18:40 2007 -0700
compilation: build edge/compose with accessors separately
Simplify the build by creating a new file for pixman-compose and
pixman-edge built with accessor functions.
diff --git a/pixman/Makefile.am b/pixman/Makefile.am
index 708e0dd..b7138e4 100644
--- a/pixman/Makefile.am
+++ b/pixman/Makefile.am
@@ -1,15 +1,17 @@
lib_LTLIBRARIES = libpixman-1.la
libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
-libpixman_1_la_LIBADD = @DEP_LIBS@ -lm libpixmanwrapper.la
+libpixman_1_la_LIBADD = @DEP_LIBS@ -lm
libpixman_1_la_SOURCES = \
pixman.h \
pixman-region.c \
pixman-private.h \
pixman-image.c \
pixman-compose.c \
+ pixman-compose-accessors.c \
pixman-pict.c \
pixman-utils.c \
pixman-edge.c \
+ pixman-edge-accessors.c \
pixman-edge-imp.h \
pixman-trap.c \
pixman-compute-region.c \
@@ -18,15 +20,6 @@ libpixman_1_la_SOURCES = \
libpixmanincludedir = $(includedir)/pixman-1/
libpixmaninclude_HEADERS = pixman.h
-# wrapper library
-noinst_LTLIBRARIES = libpixmanwrapper.la
-libpixmanwrapper_la_SOURCES = \
- pixman-compose.c \
- pixman-edge.c
-libpixmanwrapper_la_CFLAGS = $(DEP_CFLAGS) -DPIXMAN_FB_ACCESSORS
-
-
-
# mmx code
if USE_MMX
noinst_LTLIBRARIES += libpixman-mmx.la
diff --git a/pixman/pixman-compose-accessors.c b/pixman/pixman-compose-accessors.c
new file mode 100644
index 0000000..5393cf4
--- /dev/null
+++ b/pixman/pixman-compose-accessors.c
@@ -0,0 +1,4 @@
+
+#define PIXMAN_FB_ACCESSORS
+
+#include "pixman-compose.c"
diff --git a/pixman/pixman-edge-accessors.c b/pixman/pixman-edge-accessors.c
new file mode 100644
index 0000000..ea3a31e
--- /dev/null
+++ b/pixman/pixman-edge-accessors.c
@@ -0,0 +1,4 @@
+
+#define PIXMAN_FB_ACCESSORS
+
+#include "pixman-edge.c"
More information about the xorg-commit
mailing list