[OpenJDK 2D-Dev] X11 uniform scaled wide lines and dashed lines; STROKE_CONTROL in Pisces
james.graham at oracle.com
Thu Oct 21 19:16:06 PDT 2010
This should be the last batch of comments, most of which may require a
10 second answer. Most of them could just be ignored as they are minor
optimizations. There are only a couple where I think something is "off"...
lines 279 and 303 - maybe add Helpers.nearZero(v, nulp) for these? For
one thing, you compute the same values twice - hopefully the compiler
will notice that.
line 303 - could use either within or nearZero, same comment about the
value being computed twice. Also, aa+cc gets computed later, not sure
if the compiler is smart enough to deal with that.
line 325 - you don't need to clone at. "outat = at" should be enough.
A note for next revision - you don't need to include the translation in
outat and inat, it would be enough to use just the abcd part of the
transform. Right now, the TransformingPathConsumer implementations tend
to assume translation, but we could create variants for the
non-translating cases and maybe save some work.
lines 98-101 - somewhere in the confusion moveToImpl became redundant
lines 174-175 - lineToImpl now redundant too.
line 368 - does this cause a problem if t==1 because lastSegLen will now
return the wrong value? Maybe move this into an else clause on the
line 405 - I didn't understand why you use "2*err*(len+leftLen)" as the
termination condition, why not just err?
lines 200,236 - for the most part, aren't these redundant?
lines 358-361 - lineToImpl redundant now?
line 390 - should finish() really be done here? That would mean that
moveTo,close would try to emit something and close,close would as well.
Is that right?
line 800 - technically, this could be  and  since all points on
the curve are the same. ;-)
line 805,810 - abs()?
line 821,824 - you add 1 to nCurves just to subtract 1 later? Maybe
rename it to nSplits and skip the +/-1?
On 10/21/2010 1:52 PM, Jim Graham wrote:
> Hi Denis,
> I'll be focusing on this later today, just a last proofread.
> In the meantime, can you outline the tests that you ran?
> Also, have you used J2DBench at all? I know you ran some of your own
> benchmarks, but didn't know if you were familiar with this tool:
> On 10/21/2010 12:27 PM, Denis Lila wrote:
>> Good to push?
More information about the 2d-dev