Re: [OpenJDK 2D-Dev] X11 uniform scaled wide lines and dashed lines; STROKE_CONTROL in Pisces

2010-09-27 Thread Jim Graham

Hi Denis,

On 9/27/2010 7:43 AM, Denis Lila wrote:

Hi Jim.

How much faster?  I'm worried about this, especially given our tiled
approach to requesting the data.  What was the bottleneck before?
(It's been a while since I visited the code - we weren't computing the
crossings for every curve in the path for every tile being generated
were we?)


 Not much faster. I'm working on someting better.


Then hopefully we can get to something with better memory and CPU costs.


 I'm not sure about the bottleneck, but what we were doing before is:
1. Flatten (by subdividing) every curve so that we deal only with lines.
2. Add each line to a list sorted by y0. When end_rendering was called
for each scanline we found the crossings of the scanline and every line
in our line list, which we used to compute the alpha for that scanline's
pixel row. All this would be put into RLE encoded temporary storage and it
would be read back and converted into tile form by PiscesTileGenerator.

 Speaking of which, would it not be better to get rid of PiscesCache and
just keep a buffer with the current tile row in Renderer.java. This would
be possible because the specification for AATileGenerator says the iteration
is like: for (y...) for (x...);.
Why is PiscesCache there? It isn't being used as a cache at all. Could it be?
Also, why do we output tiles, instead of just pixel rows (which I guess would
just be nx1 tiles). Is it because we would like to use getTypicalAlpha to 
eliminate
completely transparent or completely opaque regions as soon as possible (and the
longer a tile is the less of a chance it has at being either of those two)?


That was basically cramming what we had into the interface's box.  The 
cache existed for something that was being done on mobile, but it 
doesn't have much of a place in our APIs so it was just reused for tile 
generation.  If we have a much more direct way of doing it then it would 
be great to get rid of it.


I think we can support ALL1s and ALL0s reasonably without the cache.


I can see your points here.  I think there are solutions to avoid much
of the untransforming we can consider, but your solution works well so
let's get it in and then we can look at optimizations if we feel they
are causing a measurable problem later.


 I should say this isn't quite as bad as I might have made it seem. Firstly,
this IO handler class I made elimiinates transformations when Dasher
communicates with Stroker. More importantly, no untransforming is done
when the transformation is just a translation or is the identity or is singular
and when STROKE_CONTROL is off, we only transform the output path. That's
because the most important reason for handling transforms the way I do now
is because we can't normalize untransformed paths, otherwise coordinate
adjustments might be magnified too much. So, we need to transform paths
before normalization. But we also can't do the stroking and widening
before the normalization. But if normalization is removed we can just pass
untransformed paths into Stroker, and transform its output (which is still
somewhat more expensive than only trasnforming the input path, since
Stroker produces many 3-7 curves for each input curve).


Can the untransform be eliminated in the case of scaling?  (Whether just 
for uniform scaling, or maybe even for non-uniform scaling with no 
rotation or shearing?)



I'm not sure I understand the reasoning of the control point
calculation.  I'll have to look at the code to register an opinion.


 I'm sorry, my explanation wasn't very clear. I attached a picture that
will hopefully clarify things.
But, in a way, the computation I use is forced on us. Suppose we have a
quadratic curve B and we need to compute one of its offsets C. C'(0)
and C'(1) will be parallel to B'(0) and B'(1) so we need to make sure
our computed offset has this property too (or it would look weird around
the endpoints). Now, B'(0) and B'(1) are parallel to p2-p1 and p3-p2
where p1,p2,p3 are the 3 control points that define B, so if the control
points of C are q1, q2, q3 then q2-q1 and q3-q2 must be parallel to p2-p1
and p3-p2 respectively. At this point, we need more constraint, since
our system is underdetermined. We use the constraints that q1 = C(0)
and q3 = C(1) (so, the endpoints of the computed offset are equal to the
endpoints of the ideal offset). All we have left to compute is q2, but
we know the direction of q2-q1 and the direction of q3-q2, so q2 must
lie on the lines defined by q1+t*(q2-q1) and q3+t*(q3-q2) so q2 must
be the intersection of these lines.


I agree that if you are creating a parallel curve then intersection is 
the way to go.  I guess what I was potentially confused about was 
whether there are cases where you need to subdivide at all?  Regardless 
of subdivision, when you get down to the final step of creating the 
parallel curves then I believe offsetting and finding the intersection 
is correct (though I reserve the possibility 

[OpenJDK 2D-Dev] hg: jdk7/2d: 15 new changesets

2010-09-27 Thread lana . steuck
Changeset: 0df9c57eb80d
Author:cl
Date:  2010-09-03 12:49 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/0df9c57eb80d

Added tag jdk7-b108 for changeset 140fdef4ddf5

! .hgtags

Changeset: d6ea39e0d3eb
Author:ohair
Date:  2010-09-07 15:13 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/d6ea39e0d3eb

6982946: Change make/jprt.properties to defer to JPRT itself for jdk platform 
list
Reviewed-by: kamg

! make/jprt.properties

Changeset: 81dfc728d7bb
Author:cl
Date:  2010-09-08 14:04 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/81dfc728d7bb

Merge


Changeset: f241877c0ac9
Author:cl
Date:  2010-09-09 15:07 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/f241877c0ac9

Added tag jdk7-b109 for changeset 81dfc728d7bb

! .hgtags

Changeset: 782c0c738f6d
Author:ohair
Date:  2010-09-08 15:13 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/782c0c738f6d

6974017: Upgrade required Solaris Studio compilers to 5.10 (12 update 1 + 
patches)
Reviewed-by: jcoomes

! README-builds.html

Changeset: 973560f0387d
Author:cl
Date:  2010-09-08 17:29 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/973560f0387d

Merge


Changeset: c129c592e9d6
Author:ohair
Date:  2010-09-09 17:08 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/c129c592e9d6

6982137: Rebranding pass 2 - missed copyright changes
Reviewed-by: mbykov

! make/templates/gpl-cp-header
! make/templates/gpl-header

Changeset: 2a02d4a6955c
Author:cl
Date:  2010-09-15 13:40 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/2a02d4a6955c

Merge


Changeset: 9702d6fef68e
Author:cl
Date:  2010-09-16 15:12 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/9702d6fef68e

Added tag jdk7-b110 for changeset 2a02d4a6955c

! .hgtags

Changeset: 989da1ce9287
Author:cl
Date:  2010-09-23 17:33 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/989da1ce9287

Added tag jdk7-b111 for changeset 9702d6fef68e

! .hgtags

Changeset: 1fbed32d2ddd
Author:gbenson
Date:  2010-08-24 13:27 +0100
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/1fbed32d2ddd

6976186: Integrate Shark
Summary: Shark is a JIT compiler for Zero that uses the LLVM compiler 
infrastructure.
Reviewed-by: ohair

! make/hotspot-rules.gmk

Changeset: 90357eee5234
Author:lana
Date:  2010-09-02 22:07 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/90357eee5234

Merge


Changeset: b331aef4bef0
Author:ohair
Date:  2010-09-07 15:51 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/b331aef4bef0

Merge


Changeset: 87e98a1df774
Author:lana
Date:  2010-09-16 11:18 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/87e98a1df774

Merge


Changeset: b852103caf73
Author:lana
Date:  2010-09-24 16:38 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/rev/b852103caf73

Merge




[OpenJDK 2D-Dev] hg: jdk7/2d/corba: 11 new changesets

2010-09-27 Thread lana . steuck
Changeset: 74d57b218468
Author:cl
Date:  2010-09-03 12:49 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/corba/rev/74d57b218468

Added tag jdk7-b108 for changeset 8d810527b499

! .hgtags

Changeset: 3821536d79ab
Author:ohair
Date:  2010-09-07 15:16 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/corba/rev/3821536d79ab

6982946: Change make/jprt.properties to defer to JPRT itself for jdk platform 
list
Reviewed-by: kamg

! make/jprt.properties

Changeset: c3dd858e09b2
Author:cl
Date:  2010-09-08 14:04 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/corba/rev/c3dd858e09b2

Merge


Changeset: 0e1f80fda227
Author:cl
Date:  2010-09-09 15:07 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/corba/rev/0e1f80fda227

Added tag jdk7-b109 for changeset c3dd858e09b2

! .hgtags

Changeset: 640fa4d4e2ad
Author:cl
Date:  2010-09-16 15:12 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/corba/rev/640fa4d4e2ad

Added tag jdk7-b110 for changeset 0e1f80fda227

! .hgtags

Changeset: 21c218f9a7be
Author:cl
Date:  2010-09-23 17:33 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/corba/rev/21c218f9a7be

Added tag jdk7-b111 for changeset 640fa4d4e2ad

! .hgtags

Changeset: 0f60cf26c5b5
Author:ohair
Date:  2010-08-30 14:39 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/corba/rev/0f60cf26c5b5

6981043: Clean out all native code makefile logic from corba repository
Reviewed-by: jjg

! make/Makefile
! make/common/Defs-linux.gmk
! make/common/Defs-solaris.gmk
! make/common/Defs-windows.gmk
! make/common/Defs.gmk
- make/common/Library.gmk
- make/common/Mapfile-vers.gmk
! make/common/Rules.gmk
- make/common/internal/NativeCompileRules.gmk
- make/common/shared/Compiler-gcc.gmk
- make/common/shared/Compiler-msvc.gmk
- make/common/shared/Compiler-sun.gmk
- make/common/shared/Compiler.gmk
! make/common/shared/Defs-java.gmk
! make/common/shared/Defs-linux.gmk
! make/common/shared/Defs-solaris.gmk
! make/common/shared/Defs-windows.gmk
! make/common/shared/Defs.gmk
! make/common/shared/Platform.gmk
! make/org/omg/idl/Makefile

Changeset: d6297db2b9dd
Author:lana
Date:  2010-09-02 22:07 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/corba/rev/d6297db2b9dd

Merge


Changeset: 0a91416c1402
Author:ohair
Date:  2010-09-07 15:50 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/corba/rev/0a91416c1402

Merge

- make/common/Library.gmk
- make/common/Mapfile-vers.gmk
- make/common/internal/NativeCompileRules.gmk
- make/common/shared/Compiler-gcc.gmk
- make/common/shared/Compiler-msvc.gmk
- make/common/shared/Compiler-sun.gmk
- make/common/shared/Compiler.gmk

Changeset: ae60f98d2f42
Author:lana
Date:  2010-09-16 11:18 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/corba/rev/ae60f98d2f42

Merge

- make/common/Library.gmk
- make/common/Mapfile-vers.gmk
- make/common/internal/NativeCompileRules.gmk
- make/common/shared/Compiler-gcc.gmk
- make/common/shared/Compiler-msvc.gmk
- make/common/shared/Compiler-sun.gmk
- make/common/shared/Compiler.gmk

Changeset: cc67fdc4fee9
Author:lana
Date:  2010-09-24 16:38 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/corba/rev/cc67fdc4fee9

Merge

- make/common/Library.gmk
- make/common/Mapfile-vers.gmk
- make/common/internal/NativeCompileRules.gmk
- make/common/shared/Compiler-gcc.gmk
- make/common/shared/Compiler-msvc.gmk
- make/common/shared/Compiler-sun.gmk
- make/common/shared/Compiler.gmk



[OpenJDK 2D-Dev] hg: jdk7/2d/hotspot: 5 new changesets

2010-09-27 Thread lana . steuck
Changeset: 2fe09e2e70d0
Author:cl
Date:  2010-09-03 12:49 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/hotspot/rev/2fe09e2e70d0

Added tag jdk7-b108 for changeset e44a93947ccb

! .hgtags

Changeset: cc4bb3022b31
Author:cl
Date:  2010-09-09 14:27 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/hotspot/rev/cc4bb3022b31

Merge

! .hgtags
- src/share/vm/gc_implementation/parallelScavenge/prefetchQueue.hpp

Changeset: 2f25f2b8de27
Author:cl
Date:  2010-09-09 15:07 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/hotspot/rev/2f25f2b8de27

Added tag jdk7-b109 for changeset cc4bb3022b31

! .hgtags

Changeset: 07b042e13dde
Author:cl
Date:  2010-09-16 15:12 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/hotspot/rev/07b042e13dde

Added tag jdk7-b110 for changeset 2f25f2b8de27

! .hgtags

Changeset: 8d5897b4230f
Author:cl
Date:  2010-09-23 17:33 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/hotspot/rev/8d5897b4230f

Added tag jdk7-b111 for changeset 07b042e13dde

! .hgtags



[OpenJDK 2D-Dev] hg: jdk7/2d/jaxp: 11 new changesets

2010-09-27 Thread lana . steuck
Changeset: 840d6acde4e8
Author:cl
Date:  2010-09-03 12:49 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxp/rev/840d6acde4e8

Added tag jdk7-b108 for changeset 7d379f8934ca

! .hgtags

Changeset: cc845b339690
Author:ohair
Date:  2010-09-07 15:15 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxp/rev/cc845b339690

6982946: Change make/jprt.properties to defer to JPRT itself for jdk platform 
list
Reviewed-by: kamg

! make/jprt.properties

Changeset: 0f382d6120fc
Author:cl
Date:  2010-09-08 14:04 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxp/rev/0f382d6120fc

Merge


Changeset: d422dbdd0976
Author:cl
Date:  2010-09-09 15:07 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxp/rev/d422dbdd0976

Added tag jdk7-b109 for changeset 0f382d6120fc

! .hgtags

Changeset: 8106c747067c
Author:cl
Date:  2010-09-16 15:13 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxp/rev/8106c747067c

Added tag jdk7-b110 for changeset d422dbdd0976

! .hgtags

Changeset: 028a06f776c0
Author:cl
Date:  2010-09-23 17:33 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxp/rev/028a06f776c0

Added tag jdk7-b111 for changeset 8106c747067c

! .hgtags

Changeset: a3fe5892cd26
Author:ohair
Date:  2010-09-01 13:28 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxp/rev/a3fe5892cd26

6981408: Upgrade jaxp to 1.4.4
Reviewed-by: darcy
Contributed-by: Joe Wang huizhe.w...@oracle.com

! jaxp.properties

Changeset: 4a249814b147
Author:lana
Date:  2010-09-02 22:09 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxp/rev/4a249814b147

Merge


Changeset: e58a0bea47f6
Author:ohair
Date:  2010-09-07 15:50 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxp/rev/e58a0bea47f6

Merge


Changeset: b23fd715a158
Author:lana
Date:  2010-09-16 11:18 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxp/rev/b23fd715a158

Merge


Changeset: 1b0525424288
Author:lana
Date:  2010-09-24 16:38 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxp/rev/1b0525424288

Merge




[OpenJDK 2D-Dev] hg: jdk7/2d/jaxws: 11 new changesets

2010-09-27 Thread lana . steuck
Changeset: ef7838f988c5
Author:cl
Date:  2010-09-03 12:49 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxws/rev/ef7838f988c5

Added tag jdk7-b108 for changeset b1ca39340238

! .hgtags

Changeset: 06c51671c84b
Author:ohair
Date:  2010-09-07 15:16 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxws/rev/06c51671c84b

6982946: Change make/jprt.properties to defer to JPRT itself for jdk platform 
list
Reviewed-by: kamg

! make/jprt.properties

Changeset: 4f626e0d70bd
Author:cl
Date:  2010-09-08 14:04 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxws/rev/4f626e0d70bd

Merge


Changeset: 95ecac35fb11
Author:cl
Date:  2010-09-09 15:07 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxws/rev/95ecac35fb11

Added tag jdk7-b109 for changeset 4f626e0d70bd

! .hgtags

Changeset: 2575ebca96c7
Author:cl
Date:  2010-09-16 15:13 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxws/rev/2575ebca96c7

Added tag jdk7-b110 for changeset 95ecac35fb11

! .hgtags

Changeset: 3c8627862d07
Author:cl
Date:  2010-09-23 17:33 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxws/rev/3c8627862d07

Added tag jdk7-b111 for changeset 2575ebca96c7

! .hgtags

Changeset: c6c2f9094bdd
Author:ohair
Date:  2010-08-30 16:00 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxws/rev/c6c2f9094bdd

6962317: jdk7 jaxws source bundle still needs rebranding
6955300: Missing files in the jaf source bundle
Reviewed-by: ramap

! jaxws.properties

Changeset: 5dd2cc894d0c
Author:lana
Date:  2010-09-02 22:09 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxws/rev/5dd2cc894d0c

Merge


Changeset: 74737bd256fa
Author:ohair
Date:  2010-09-07 15:51 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxws/rev/74737bd256fa

Merge


Changeset: 4635da51e3cb
Author:lana
Date:  2010-09-16 11:18 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxws/rev/4635da51e3cb

Merge


Changeset: 8e0f0054817f
Author:lana
Date:  2010-09-24 16:38 -0700
URL:   http://hg.openjdk.java.net/jdk7/2d/jaxws/rev/8e0f0054817f

Merge