[OpenJDK 2D-Dev] Review Reqeust for Bug 100068 - SunGraphics2D exposes a reference to itself while non fully initialised
Mario Torre
mario.torre at aicas.com
Tue Jun 16 23:52:04 UTC 2009
Il giorno mar, 16/06/2009 alle 16.18 -0700, Jim Graham ha scritto:
> Ah, I think I see the problem. Phil can chime in here if I'm wrong.
Yay, glad it helped :)
> Text now uses loops in most cases, but many of the validate methods
> assume that they don't need the loops. I don't think that used to be
> the case, but it changed as a result of the LCD text loop work. It used
> to be that AA used the alphafill field of SG2D and not the loops, and it
> still does for most rendering. But now text rendering will almost
> always go through the loops and it is only working because of that call
> to getRenderLoops() in the constructor (and the fact that we never set
> it back to null.
That makes completely sense to me.
> I'd like to see invalidate() set the loops to null and see how far we
> get - I'll bet that we'd get NPEs all over the place, especially with AA
> rendering.
I'll try that tomorrow. I can also help with the testing, I would like
to see those changes in the main code base at some point, and they will
be surely useful for Cacio too.
> In the long run, this is another straw on the camel's back as far as
> rethinking the validation framework. It's been tweaked and hacked quite
> a lot over the past 10 years and so there are a lot of issues that arise
> like this that aren't readily obvious from the code. I don't think the
> camel's back is broken yet, but it is becoming more and more confusing
> for new engineers to start tinkering with it without seeing things break
> from seemingly innocuous changes. :-(
Eh... I've seen this in the FontManager code too, and in Classpath we
had similar problems for some of the most obscure things too, that's an
obvious consequence of code that has to preserve backward
forever-compatibility, but I have to say that the Java2D code does some
really cool things in many places :)
> And Phil might want to chime in with a description of the new
> requirements on loops in light of the post-LCD text work... Phil?
That would be interesting :)
Cheers (and good night!),
Mario
--
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com * Tel: +49-721-663 968-44
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA FC7C 4086 63E3 80F2 40CF
USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt
Please, support open standards:
http://endsoftpatents.org/
--
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com * Tel: +49-721-663 968-44
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA FC7C 4086 63E3 80F2 40CF
USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt
Please, support open standards:
http://endsoftpatents.org/
More information about the 2d-dev
mailing list