summaryrefslogtreecommitdiff
path: root/gs/src/gdevddrw.h
diff options
context:
space:
mode:
authorIgor Melichev <igor.melichev@artifex.com>2002-12-24 14:20:15 +0000
committerIgor Melichev <igor.melichev@artifex.com>2002-12-24 14:20:15 +0000
commit930686c1e8dac54b23e88747bdf96fffbaa1a182 (patch)
treebe90cb1264a5038fd84b8422c2e00cf98a58988a /gs/src/gdevddrw.h
parent6cf430f6cbdada808aa4580061fe194ace533354 (diff)
Improving and optimizing the dropout prevention algorithm
with splitting gx_default_fill_parallelogram into 2 variants. DETAILS: This patch almost changes a disabled code. A simple reorganization of some enabled code should not cause a behavior difference. Filling a "small" character, we always subdivide trapezoids into rectangles instead passing them to device virtual function. It allows : 1. Not passing narrow trapezoids to applications which implement fill_trapezoid with own means; Narrow trapezoids could cause dropouts in there. 2. Optimize variants of fill_trapezoid algorithm which are used for different purposes (preventing about 10% slowdown with shadings). We believe this change isn't harmful because regularly we render small characters to cache device, which simply forwards trapezoids to default implementation. Alternatively we could insert a check for narrow trapezoids into loop_fill_trap, but such check appears complex and it would sensibly reduce performance. New files added : gdevddrw.h, gxdtfill.h . Change to lib.mak accounts them. Besides that, with dropout prevention we now skip empty paths in characters, because Adobe doesn't paint them. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@3450 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/gdevddrw.h')
-rw-r--r--gs/src/gdevddrw.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/gs/src/gdevddrw.h b/gs/src/gdevddrw.h
new file mode 100644
index 000000000..0299d04ce
--- /dev/null
+++ b/gs/src/gdevddrw.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2002 artofcode LLC. All rights reserved.
+
+ This software is provided AS-IS with no warranty, either express or
+ implied.
+
+ This software is distributed under license and may not be copied,
+ modified or distributed except as expressly authorized under the terms
+ of the license contained in the file LICENSE in this distribution.
+
+ For more information about licensing, please refer to
+ http://www.ghostscript.com/licensing/. For information on
+ commercial licensing, go to http://www.artifex.com/licensing/ or
+ contact Artifex Software, Inc., 101 Lucas Valley Road #110,
+ San Rafael, CA 94903, U.S.A., +1(415)492-9861.
+*/
+
+/* $Id$ */
+/* Prototypes of some polygon and image drawing procedures */
+
+#ifndef gdevddrw_INCLUDED
+# define gdevddrw_INCLUDED
+
+#if DROPOUT_PREVENTION
+dev_proc_fill_trapezoid(gx_fill_trapezoid_narrow);
+#endif
+
+#endif /* gdevddrw_INCLUDED */
+