Request for review: cleanup in preparation of the final java2d backport.
Denis Lila
dlila at redhat.com
Mon Feb 28 08:19:43 PST 2011
Hi.
http://icedtea.classpath.org/~dlila/cleanupPart1v2.patch
http://icedtea.classpath.org/~dlila/cleanupPart2v2.patch
and the attached patch are the revised patches (the only
thing that has changed is that now I'm removing patches
in the same changeset where I stop applying them).
Ok to push?
Regards,
Denis.
----- Original Message -----
> On 16:20 Thu 24 Feb , Denis Lila wrote:
> > And the attached file is the final part of the cleanup.
> > It just removes 3 patches that were obsoleted by the
> > previous changeset (if the previous changest is approved
> > for pushing, that is).
> >
>
> As I said in my previous reply, these can be removed with
> the patch that obsoletes them.
>
> But can you explain why they are obsolete?
>
> > Ok to push?
> >
> > Thank you,
> > Denis.
> >
> > ----- Original Message -----
> > > This:
> > > http://icedtea.classpath.org/~dlila/cleanupPart2.patch
> > > is the second part of the clean up. It removes
> > > patches/openjdk/6967436-6976265-6967434-pisces.patch
> > > (which we stopped applying in the previous cleanupPart1.patch),
> > > it adds the 3 replacement patches for it, it adds
> > > piscesMakefile.patch to make the build work, and it reapplies
> > > patches/openjdk/6766342-AA-simple-shape-performance.patch.
> > >
> > > It also stops applying 3 patches made obsolete by the 3 new
> > > patches (but doesn't remove them (should it?). I've left this
> > > for the next changeset).
> > >
> > > Ok to push (contingent on cleanupPart1.patch being ok)?
> > >
> > > Thank you,
> > > Denis.
> > >
> > > ----- Original Message -----
> > > > > The IcedTea version:
> > > > >
> > > > > 2008-10-27 Mark Wielaard <mark at klomp.org>
> > > > >
> > > > > * patches/icedtea-renderer-crossing.patch: New patch.
> > > > >
> > > > > predates the OpenJDK one:
> > > > >
> > > > > changeset: 1878:ccc36189f2a7
> > > > > user: rkennke
> > > > > date: Mon Oct 05 23:12:22 2009 +0200
> > > > >
> > > > > by just under a year. Roman may even have been using the
> > > > > IcedTea
> > > > > patch
> > > > > and not bothered
> > > > > to report to us.
> > > > >
> > > > > Anyway, good to be replaced in a separate changeset.
> > > >
> > > > The attached patch does the replacement of
> > > > patches/renderer-crossings.patch. I do this first because it
> > > > came
> > > > before any of the other things, and the other patches won't
> > > > apply
> > > > without it.
> > > >
> > > > Unfortunately, it also has to stop applying
> > > > patches/openjdk/6967436-6976265-6967434-pisces.patch
> > > > patches/openjdk/6766342-AA-simple-shape-performance.patch
> > > > If we don't stop applying the first of those, the patching will
> > > > fail. It's not a good idea to apply the second because it
> > > > changes
> > > > a file that is also changed by
> > > > 6967436-6976265-6967434-pisces.patch.
> > > > So until the replacement for
> > > > 6967436-6976265-6967434-pisces.patch is
> > > > in, we shouldn't apply it.
> > > >
> > > > Ok to push?
> > > >
> > > > The next changeset after this will introduce the three
> > > > replacements
> > > > of
> > > > patches/openjdk/6967436-6976265-6967434-pisces.patch.
> > > >
> > > > Thank you.
> > > >
> > > > ----- Original Message -----
> > > > > On 12:45 Thu 24 Feb , Denis Lila wrote:
> > > > > > Hi.
> > > > > >
> > > > > > I want to push this patch:
> > > > > > http://icedtea.classpath.org/~dlila/hgCleanup.diff. I tried
> > > > > > attaching it,
> > > > > > but it was too big and I cancelled the message.
> > > > > >
> > > > >
> > > > > Ok let's split this up and do them in individual changesets
> > > > > with
> > > > > individual
> > > > > ChangeLogs. It's much easier to track things that way if we're
> > > > > not
> > > > > mixing
> > > > > up orthogonal things.
> > > > >
> > > > > > The changes are:
> > > > > > patches/openjdk/6967436-6976265-6967434-pisces.patch was
> > > > > > replaced
> > > > > > by
> > > > > > 6967436-6967433-floating-pt-conversion.patch,
> > > > > > 6967434-bad-round-joins.patch,
> > > > > > and 6976265-stroke-control.patch. Each of the separate
> > > > > > patches
> > > > > > is
> > > > > > its own
> > > > > > changeset in openjdk7, so it was my mistake to begin with to
> > > > > > lump
> > > > > > them
> > > > > > all into one backport. Splitting it up into the 3 patches
> > > > > > fixes
> > > > > > it.
> > > > > > Also
> > > > > > each of the three patches is an unmodified "hg export" of
> > > > > > its
> > > > > > openjdk7
> > > > > > revision. What we had in
> > > > > > 6967436-6976265-6967434-pisces.patch
> > > > > > wasn't,
> > > > > > because I had to remove some of the @Override annotations so
> > > > > > that
> > > > > > the
> > > > > > build wouldn't fail. The proper way to get around this is by
> > > > > > changing
> > > > > > the source and target options to ecj, which is what
> > > > > > patches/piscesMakefile.patch does.
> > > > > >
> > > > >
> > > > > Ok so this is one patch: the three patch split + the
> > > > > piscesMakefile
> > > > > to
> > > > > make
> > > > > it work.
> > > > >
> > > > > > I replaced patches/renderer-crossing.patch with
> > > > > > patches/openjdk/6887494-NPE-in-pisces.patch. The former adds
> > > > > > if (crossingIndices != null && crossingIndices.length >
> > > > > > DEFAULT_INDICES_SIZE) {
> > > > > > while the latter adds
> > > > > > if (crossingIndices != null &&
> > > > > > crossingIndices.length > DEFAULT_INDICES_SIZE)
> > > > > > {
> > > > > > so they do exactly the same thing, but the layout is
> > > > > > different.
> > > > > > What
> > > > > > I think
> > > > > > happened is that patches/renderer-crossing.patch was added
> > > > > > to
> > > > > > icedtea before
> > > > > > openjdk7, and when it went into openjdk7 the newlines were
> > > > > > changed.
> > > > > > So now
> > > > > > I'm replacing the patch with a proper backport.
> > > > > >
> > > > >
> > > >
> > > > >
> > > > > > The other changes are just removing obsolete patches, and
> > > > > > they're
> > > > > > described
> > > > > > in the ChangeLog.
> > > > > >
> > > > >
> > > > > Again, separate changeset.
> > > > >
> > > > > > Thank you,
> > > > > > Denis.
> > > > >
> > > > > --
> > > > > Andrew :)
> > > > >
> > > > > Free Java Software Engineer
> > > > > Red Hat, Inc. (http://www.redhat.com)
> > > > >
> > > > > Support Free Java!
> > > > > Contribute to GNU Classpath and IcedTea
> > > > > http://www.gnu.org/software/classpath
> > > > > http://icedtea.classpath.org
> > > > > PGP Key: F5862A37 (https://keys.indymedia.org/)
> > > > > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586
> > > > > 2A37
>
> > diff -r 5c0be31545ff ChangeLog
> > --- a/ChangeLog Thu Feb 24 15:30:47 2011 -0500
> > +++ b/ChangeLog Thu Feb 24 16:13:11 2011 -0500
> > @@ -1,3 +1,12 @@
> > +2011-02-24 Denis Lila <dlila at redhat.com>
> > +
> > + * patches/java2d-stroker-internal-close-joint.patch:
> > + Obsolete and unused. Removed.
> > + * patches/java2d-stroker-internal-joint.patch:
> > + Obsolete and unused. Removed.
> > + * patches/stroker-finish.patch:
> > + Obsolete and unused. Removed.
> > +
> > 2011-02-24 Denis Lila <dlila at redhat.com>
> >
> > * Makefile.am: Added patches
> > diff -r 5c0be31545ff
> > patches/java2d-stroker-internal-close-joint.patch
> > --- a/patches/java2d-stroker-internal-close-joint.patch Thu Feb 24
> > 15:30:47 2011 -0500
> > +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
> > @@ -1,96 +0,0 @@
> > ----
> > openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java.orig
> > 2009-04-29 14:01:43.000000000 -0400
> > -+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java
> > 2009-04-29 14:00:03.000000000 -0400
> > -@@ -633,7 +633,7 @@
> > - }
> > -
> > - emitLineTo(sx0 + mx0, sy0 + my0);
> > -- emitLineTo(sx0 - mx0, sy0 - my0); // same as reverse[0],
> > reverse[1]
> > -+ emitMoveTo(sx0, sy0); // same as reverse[0], reverse[1]
> > -
> > - // Draw final join on the inside
> > - if (ccw) {
> > ---- /dev/null 2009-04-15 13:37:55.776002308 -0400
> > -+++ openjdk/jdk/test/sun/pisces/MiterInternalCloseJointTest.java
> > 2009-04-29 13:59:31.000000000 -0400
> > -@@ -0,0 +1,82 @@
> > -+/*
> > -+ * Copyright 2009 Red Hat, Inc. All Rights Reserved.
> > -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
> > -+ *
> > -+ * This code is free software; you can redistribute it and/or
> > modify it
> > -+ * under the terms of the GNU General Public License version 2
> > only, as
> > -+ * published by the Free Software Foundation.
> > -+ *
> > -+ * This code is distributed in the hope that it will be useful,
> > but WITHOUT
> > -+ * ANY WARRANTY; without even the implied warranty of
> > MERCHANTABILITY or
> > -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
> > License
> > -+ * version 2 for more details (a copy is included in the LICENSE
> > file that
> > -+ * accompanied this code).
> > -+ *
> > -+ * You should have received a copy of the GNU General Public
> > License version
> > -+ * 2 along with this work; if not, write to the Free Software
> > Foundation,
> > -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
> > -+ */
> > -+
> > -+/*
> > -+ @test
> > -+ @summary Check that the final joint created using
> > -+ generalPath.closePath() is correct
> > -+ @author Omair Majid <omajid at redhat.com>
> > -+ @run main MiterInternalCloseJointTest
> > -+ */
> > -+import java.awt.BasicStroke;
> > -+import java.awt.Color;
> > -+import java.awt.Graphics2D;
> > -+import java.awt.geom.GeneralPath;
> > -+import java.awt.image.BufferedImage;
> > -+
> > -+public class MiterInternalCloseJointTest {
> > -+
> > -+ static final int WIDTH = 200;
> > -+ static final int HEIGHT = 200;
> > -+
> > -+ static final int x0 = 50, y0 = 50;
> > -+ static final int x1 = 150, y1 = 50;
> > -+ static final int x2 = 100, y2 = 100;
> > -+
> > -+ private static BufferedImage createTestImage() {
> > -+ final BufferedImage image = new BufferedImage(WIDTH, HEIGHT,
> > -+ BufferedImage.TYPE_INT_BGR);
> > -+ Graphics2D g = image.createGraphics();
> > -+
> > -+ g.setColor(Color.BLACK);
> > -+ g.fillRect(0, 0, WIDTH, HEIGHT);
> > -+
> > -+ float wideStrokeWidth = 20.0f;
> > -+ BasicStroke wideStroke = new BasicStroke(wideStrokeWidth,
> > -+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, wideStrokeWidth);
> > -+ float thinStrokeWidth = 3.0f;
> > -+ BasicStroke thinStroke = new BasicStroke(thinStrokeWidth,
> > -+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, thinStrokeWidth);
> > -+
> > -+ g.setColor(Color.WHITE);
> > -+ GeneralPath path = new GeneralPath();
> > -+ path.moveTo(x0, y0);
> > -+ path.lineTo(x1, y1);
> > -+ path.lineTo(x2, y2);
> > -+ path.closePath();
> > -+ path.closePath();
> > -+ g.setStroke(thinStroke);
> > -+ g.draw(wideStroke.createStrokedShape(path));
> > -+
> > -+ return image;
> > -+ }
> > -+
> > -+ public static void main(String[] args) {
> > -+
> > -+ BufferedImage testImage = createTestImage();
> > -+
> > -+ int color = testImage.getRGB(x0,y0-5);
> > -+ System.out.println("Color seen: #" + Integer.toHexString(color));
> > -+ if (color == Color.WHITE.getRGB()) {
> > -+ throw new RuntimeException(
> > -+ "Test Failed; did not expected to see a white line at the start
> > of the path");
> > -+ }
> > -+
> > -+ }
> > -+}
> > diff -r 5c0be31545ff patches/java2d-stroker-internal-joint.patch
> > --- a/patches/java2d-stroker-internal-joint.patch Thu Feb 24
> > 15:30:47 2011 -0500
> > +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
> > @@ -1,98 +0,0 @@
> > ----
> > openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java.orig
> > 2009-04-29 13:30:24.000000000 -0400
> > -+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java
> > 2009-04-29 13:31:05.000000000 -0400
> > -@@ -614,6 +614,8 @@
> > - ROUND_JOIN_INTERNAL_THRESHOLD);
> > - }
> > -
> > -+ emitLineTo(x0, y0, !ccw);
> > -+
> > - emitLineTo(x0 + mx, y0 + my);
> > - emitLineTo(sx0 + mx, sy0 + my);
> > -
> > ---- /dev/null 2009-04-15 13:37:55.776002308 -0400
> > -+++ openjdk/jdk/test/sun/pisces/MiterInternalJointTest.java
> > 2009-04-29 13:41:30.000000000 -0400
> > -@@ -0,0 +1,84 @@
> > -+/*
> > -+ * Copyright 2009 Red Hat, Inc. All Rights Reserved.
> > -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
> > -+ *
> > -+ * This code is free software; you can redistribute it and/or
> > modify it
> > -+ * under the terms of the GNU General Public License version 2
> > only, as
> > -+ * published by the Free Software Foundation.
> > -+ *
> > -+ * This code is distributed in the hope that it will be useful,
> > but WITHOUT
> > -+ * ANY WARRANTY; without even the implied warranty of
> > MERCHANTABILITY or
> > -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
> > License
> > -+ * version 2 for more details (a copy is included in the LICENSE
> > file that
> > -+ * accompanied this code).
> > -+ *
> > -+ * You should have received a copy of the GNU General Public
> > License version
> > -+ * 2 along with this work; if not, write to the Free Software
> > Foundation,
> > -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
> > -+ */
> > -+
> > -+/*
> > -+ @test
> > -+ @summary Check that the penultimate joint created using
> > -+ generalPath.closePath() is correct
> > -+ @author Omair Majid <omajid at redhat.com>
> > -+ @run main MiterInternalJointTest
> > -+ */
> > -+
> > -+
> > -+import java.awt.BasicStroke;
> > -+import java.awt.Color;
> > -+import java.awt.Graphics2D;
> > -+import java.awt.geom.GeneralPath;
> > -+import java.awt.image.BufferedImage;
> > -+
> > -+public class MiterInternalJointTest {
> > -+
> > -+ static final int WIDTH = 200;
> > -+ static final int HEIGHT = 200;
> > -+
> > -+ static final int x0 = 50, y0 = 50;
> > -+ static final int x1 = 150, y1 = 50;
> > -+ static final int x2 = 100, y2 = 100;
> > -+
> > -+ private static BufferedImage createTestImage() {
> > -+ final BufferedImage image = new BufferedImage(WIDTH, HEIGHT,
> > -+ BufferedImage.TYPE_INT_BGR);
> > -+ Graphics2D g = image.createGraphics();
> > -+
> > -+ g.setColor(Color.BLACK);
> > -+ g.fillRect(0, 0, WIDTH, HEIGHT);
> > -+
> > -+ float wideStrokeWidth = 20.0f;
> > -+ BasicStroke wideStroke = new BasicStroke(wideStrokeWidth,
> > -+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, wideStrokeWidth);
> > -+ float thinStrokeWidth = 3.0f;
> > -+ BasicStroke thinStroke = new BasicStroke(thinStrokeWidth,
> > -+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, thinStrokeWidth);
> > -+
> > -+ g.setColor(Color.WHITE);
> > -+ GeneralPath path = new GeneralPath();
> > -+ path.moveTo(x0, y0);
> > -+ path.lineTo(x1, y1);
> > -+ path.lineTo(x2, y2);
> > -+ path.closePath();
> > -+ path.closePath();
> > -+ g.setStroke(thinStroke);
> > -+ g.draw(wideStroke.createStrokedShape(path));
> > -+
> > -+ return image;
> > -+ }
> > -+
> > -+ public static void main(String[] args) {
> > -+
> > -+ BufferedImage testImage = createTestImage();
> > -+
> > -+ int color = testImage.getRGB(x2,y2);
> > -+ System.out.println("Color seen: #" + Integer.toHexString(color));
> > -+ if (color != Color.WHITE.getRGB()) {
> > -+ throw new RuntimeException(
> > -+ "Test Failed; expected to see a white vertex above the bottom of
> > the triangle");
> > -+ }
> > -+
> > -+ }
> > -+}
> > diff -r 5c0be31545ff patches/stroker-finish.patch
> > --- a/patches/stroker-finish.patch Thu Feb 24 15:30:47 2011 -0500
> > +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
> > @@ -1,20 +0,0 @@
> > ---- openjdk6/jdk/src/share/classes/sun/java2d/pisces/Stroker.java
> > -+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java
> > -@@ -695,7 +695,7 @@
> > - long ldx = (long)(px0 - x0);
> > - long ldy = (long)(py0 - y0);
> > - long llen = lineLength(ldx, ldy);
> > -- long s = (long)lineWidth2*65536/llen;
> > -+ long s = (llen == 0) ? 0 : (long)lineWidth2*65536/llen;
> > -
> > - int capx = x0 - (int)(ldx*s >> 16);
> > - int capy = y0 - (int)(ldy*s >> 16);
> > -@@ -717,7 +717,7 @@
> > - long ldx = (long)(sx1 - sx0);
> > - long ldy = (long)(sy1 - sy0);
> > - long llen = lineLength(ldx, ldy);
> > -- long s = (long)lineWidth2*65536/llen;
> > -+ long s = (llen == 0) ? 0 : (long)lineWidth2*65536/llen;
> > -
> > - int capx = sx0 - (int)(ldx*s >> 16);
> > - int capy = sy0 - (int)(ldy*s >> 16);
>
>
> --
> Andrew :)
>
> Free Java Software Engineer
> Red Hat, Inc. (http://www.redhat.com)
>
> Support Free Java!
> Contribute to GNU Classpath and IcedTea
> http://www.gnu.org/software/classpath
> http://icedtea.classpath.org
> PGP Key: F5862A37 (https://keys.indymedia.org/)
> Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dashingPerfBackportv2.patch
Type: text/x-patch
Size: 90505 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110228/ded27b09/dashingPerfBackportv2.patch
More information about the distro-pkg-dev
mailing list