changeset 2494:16898c6950c6

Backport of 7023591 and its regression test.
author Denis Lila <dlila@redhat.com>
date Wed, 16 Mar 2011 09:55:32 -0400
parents 96a8975a5049
children a18c1d18bdcc
files ChangeLog Makefile.am NEWS patches/openjdk/7023591-AAShapePipe.patch patches/openjdk/7027667-AAShapePipeRegTest.patch
diffstat 5 files changed, 97 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Mar 12 20:57:17 2011 +0100
+++ b/ChangeLog	Wed Mar 16 09:55:32 2011 -0400
@@ -1,3 +1,13 @@
+2011-03-16  Denis Lila  <dlila@redhat.com>
+
+	* Makefile.am: Add patches.
+	* patches/openjdk/7027667-AAShapePipeRegTest.patch:
+	Backport.
+	* patches/openjdk/7023591-AAShapePipe.patch:
+	Backport.
+	* NEWS:
+	Updated with backports.
+
 2011-03-12  Xerxes Ranby  <xerxes@zafena.se>
 
 	JamVM: remove upstreamed patch.
--- a/Makefile.am	Sat Mar 12 20:57:17 2011 +0100
+++ b/Makefile.am	Wed Mar 16 09:55:32 2011 -0400
@@ -323,7 +323,9 @@
 	patches/openjdk/6775317-non-AA-simple-shape-performance.patch \
 	patches/openjdk/6766342-AA-simple-shape-performance.patch \
 	patches/pr600-arm-jvm.cfg.patch \
-	patches/jaxp-serial-version-uid.patch
+	patches/jaxp-serial-version-uid.patch \
+	patches/openjdk/7023591-AAShapePipe.patch \
+	patches/openjdk/7027667-AAShapePipeRegTest.patch
 
 if WITH_ALT_HSBUILD
 ICEDTEA_PATCHES += \
--- a/NEWS	Sat Mar 12 20:57:17 2011 +0100
+++ b/NEWS	Wed Mar 16 09:55:32 2011 -0400
@@ -13,6 +13,8 @@
 * Added JamVM support for mips and mips64.
 * Bug fixes
   - CACAO PR157: ARM SMP Assertion thinlock failed.
+* Backports
+  - S7023591, S7027667: Clipped antialiased rectangles are filled, not drawn.
 
 New in release 1.10 (2011-03-02):
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/7023591-AAShapePipe.patch	Wed Mar 16 09:55:32 2011 -0400
@@ -0,0 +1,20 @@
+# HG changeset patch
+# User prr
+# Date 1299282881 28800
+# Node ID f82f0af7de5bb0e41cb957d654e8a1beaeab0008
+# Parent  01dcb496946e514fe5e61504d0bd2516d6a42783
+7023591: Xrender: java2D font demo - text highlighting tab content is black
+Reviewed-by: flar
+
+diff -r 01dcb496946e -r f82f0af7de5b src/share/classes/sun/java2d/pipe/AAShapePipe.java
+--- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/AAShapePipe.java	Thu Mar 03 16:06:42 2011 -0800
++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/AAShapePipe.java	Fri Mar 04 15:54:41 2011 -0800
+@@ -109,7 +109,7 @@
+         Region clip = sg.getCompClip();
+         int abox[] = new int[4];
+         AATileGenerator aatg =
+-            renderengine.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, 0, 0,
++            renderengine.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, lw1, lw2,
+                                             clip, abox);
+         if (aatg == null) {
+             // Nothing to render
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/7027667-AAShapePipeRegTest.patch	Wed Mar 16 09:55:32 2011 -0400
@@ -0,0 +1,62 @@
+# HG changeset patch
+# User dlila
+# Date 1300216510 14400
+# Node ID fd8b81c558d307a984ad2dcd06b7de092c3f01f5
+# Parent  87444344d6169cce2ef7fbbf48582728769a8d85
+7027667: clipped aa rectangles are not drawn properly.
+Summary: Already fixed. This is just a regression test for it.
+Reviewed-by: prr
+
+diff -r 87444344d616 -r fd8b81c558d3 test/sun/java2d/pipe/Test7027667.java
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ openjdk/jdk/test/sun/java2d/pipe/Test7027667.java	Tue Mar 15 15:15:10 2011 -0400
+@@ -0,0 +1,49 @@
++/*
++ * Copyright (c) 2011, Oracle and/or its affiliates. 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.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++/**
++ * @test
++ * @bug     7027667, 7023591
++ *
++ * @summary Verifies that aa clipped rectangles are drawn, not filled.
++ *
++ * @run     main Test7027667
++ */
++
++import java.awt.*;
++import java.awt.geom.*;
++import java.awt.image.*;
++import static java.awt.RenderingHints.*;
++
++public class Test7027667 {
++    public static void main(String[] args) throws Exception {
++        BufferedImage bImg = new BufferedImage(512, 512, BufferedImage.TYPE_INT_RGB);
++        Graphics2D g2d = (Graphics2D) bImg.getGraphics();
++        g2d.setRenderingHint(KEY_ANTIALIASING, VALUE_ANTIALIAS_ON);
++        g2d.setClip(new Ellipse2D.Double(0, 0, 100, 100));
++        g2d.drawRect(10, 10, 100, 100);
++        if (new Color(bImg.getRGB(50, 50)).equals(Color.white)) {
++            throw new Exception("Rectangle should be drawn, not filled");
++        }
++    }
++}