harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r609928 [1/5] - in /harmony/enhanced/classlib/branches/java6: ./ make/ modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/ modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/ modules/awt/src/main/native/gl/share...
Date Tue, 08 Jan 2008 10:55:41 GMT
Author: tonywu
Date: Tue Jan  8 02:55:24 2008
New Revision: 609928

URL: http://svn.apache.org/viewvc?rev=609928&view=rev
Log:
Merge updates from classlib trunk@609631 since r601283

Added:
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/XGraphics2D.cpp
      - copied unchanged from r609631, harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/XGraphics2D.cpp
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/include/
      - copied from r609631, harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/include/
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/include/org_apache_harmony_awt_gl_linux_XGraphics2D.h
      - copied unchanged from r609631, harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/include/org_apache_harmony_awt_gl_linux_XGraphics2D.h
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttributeBands.java
      - copied unchanged from r609631, harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttributeBands.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/NewAttribute.java
      - copied unchanged from r609631, harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/NewAttribute.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/LookupSwitchForm.java
      - copied unchanged from r609631, harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/LookupSwitchForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/TableSwitchForm.java
      - copied unchanged from r609631, harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/TableSwitchForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/VariableInstructionForm.java
      - copied unchanged from r609631, harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/VariableInstructionForm.java
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/shared/
      - copied from r609631, harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/shared/
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/shared/security_copyright.c
      - copied unchanged from r609631, harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/shared/security_copyright.c
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/unix/
      - copied from r609631, harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/unix/
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/unix/exports.txt
      - copied unchanged from r609631, harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/unix/exports.txt
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/unix/getUnixSystemRandom.c
      - copied unchanged from r609631, harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/unix/getUnixSystemRandom.c
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/unix/makefile
      - copied unchanged from r609631, harmony/enhanced/classlib/trunk/modules/security/src/main/native/security/unix/makefile
Removed:
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/windows/security_copyright.c
Modified:
    harmony/enhanced/classlib/branches/java6/THIRD_PARTY_NOTICES.txt
    harmony/enhanced/classlib/branches/java6/make/build-native.xml
    harmony/enhanced/classlib/branches/java6/make/depends.properties
    harmony/enhanced/classlib/branches/java6/make/depends.xml
    harmony/enhanced/classlib/branches/java6/make/properties.xml
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/SurfaceDataStructure.cpp
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/blitter.cpp
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/exports.txt
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/makefile
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/windows/GDIBlitter.cpp
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/windows/WinGDIPGraphics2D.cpp
    harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/java/javax/imageio/IIOParam.java
    harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/java/javax/imageio/ImageReader.java
    harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/java/org/apache/harmony/x/imageio/internal/nls/messages.properties
    harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/InitialContext.java
    harmony/enhanced/classlib/branches/java6/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/InitialContextAppTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataInputStream.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/FileDescriptor.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectOutputStream.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/ObjectStreamClass.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/SocketImpl.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URLClassLoader.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URLConnection.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/HashMap.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/LinkedHashMap.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/windows/jclprots.h
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/filedesc.c
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/luniglob.c
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/nethelp.c
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/makefile
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/io/DataInputStreamTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/io/FileOutputStreamTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/io/ObjectInputStreamTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/windows/org/apache/harmony/luni/tests/java/io/WinFileTest.java
    harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SelectorImpl.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttrDefinitionBands.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayout.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayoutMap.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/FileBands.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/IcBands.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentConstantPool.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentUtils.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/Attribute.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ByteCode.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPClass.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPDouble.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPFieldRef.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPFloat.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPInteger.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPInterfaceMethodRef.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPLong.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMember.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMethodRef.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPNameAndType.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPRef.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPString.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPUTF8.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ClassConstantPool.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CodeAttribute.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ConstantPoolEntry.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/EnclosingMethodAttribute.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/LineNumberTableAttribute.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/LocalVariableTableAttribute.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/OperandManager.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/SourceFileAttribute.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/ByteCodeForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/ByteForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/IMethodRefForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/IincForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/LabelForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/LocalForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/MultiANewArrayForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/NewClassRefForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/NoArgumentForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/ReferenceForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/ShortForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/SwitchForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/forms/WideForm.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/BandSetTest.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/BcBandsTest.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/CodeAttributeTest.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/SegmentUtilsTest.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/bytecode/ClassFileEntryTest.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/bytecode/ConstantPoolTest.java
    harmony/enhanced/classlib/branches/java6/modules/print/src/main/java/windows/org/apache/harmony/x/print/WinPrintJob.java
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/unix/org/apache/harmony/security/provider/crypto/RandomBitsSupplier.java
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/windows/makefile
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JList.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicListUI.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableHeaderUI.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableUI.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/metal/MetalFileChooserUI.java
    harmony/enhanced/classlib/branches/java6/modules/text/src/main/java/java/text/MessageFormat.java
    harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/MessageFormatTest.java

Modified: harmony/enhanced/classlib/branches/java6/THIRD_PARTY_NOTICES.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/THIRD_PARTY_NOTICES.txt?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/THIRD_PARTY_NOTICES.txt (original)
+++ harmony/enhanced/classlib/branches/java6/THIRD_PARTY_NOTICES.txt Tue Jan  8 02:55:24 2008
@@ -49,14 +49,14 @@
 
 
 
-License Notice for ICU4J version 3.4
+License Notice for ICU4J version 3.8
 ====================================
 
 ICU4J license - ICU4J 1.3.1 and later
 
 COPYRIGHT AND PERMISSION NOTICE
 
-Copyright (c) 1995-2005 International Business Machines Corporation and others 
+Copyright (c) 1995-2007 International Business Machines Corporation and others 
 
 All rights reserved. 
 
@@ -202,7 +202,10 @@
 ========================
 
 The file msvcr71.dll is the Microsoft(R) C Runtime Library.
-This file is redistributed from Microsoft(R) Visual Studio 7.1.
+The file msvcp71.dll is the Microsoft Multithreaded Standard C++ Library.
+
+These files are redistributed from Microsoft(R) Visual Studio 7.1 as described in
+the file "redist.txt" available with that product.
 
 
 
@@ -213,7 +216,7 @@
 
 
 
-License Notice for Bouncy Castle version 1.36
+License Notice for Bouncy Castle version 1.38
 ============================================
 
 Copyright (c) 2000 - 2006 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)

Modified: harmony/enhanced/classlib/branches/java6/make/build-native.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/build-native.xml?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/build-native.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/build-native.xml Tue Jan  8 02:55:24 2008
@@ -133,6 +133,7 @@
     <target name="layout.windows" if="is.windows" depends="-select-win-deps-x86_64,-select-win-deps-x86">
         <!-- workaround until msdll is moved. -->
         <copy file="${msvcr.dll}" todir="${hy.jdk}/jre/bin" overwrite="yes" />
+        <copy file="${msvcp.dll}" todir="${hy.jdk}/jre/bin" overwrite="yes" />
     </target>
 
     <target name="layout.zos" if="is.zos">

Modified: harmony/enhanced/classlib/branches/java6/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/depends.properties?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/depends.properties (original)
+++ harmony/enhanced/classlib/branches/java6/make/depends.properties Tue Jan  8 02:55:24 2008
@@ -46,19 +46,31 @@
 
 msvcr.dir.x86=${depends.dir}/libs/windows.x86
 msvcr.dll.x86=${msvcr.dir.x86}/msvcr71.dll
-msvcr.dll.file.x86=msvcr71.dll
 msvcr.url.x86=file:///${hyenv.SystemRoot}/system32/msvcr71.dll
 # This is the md5 hash for the VS2003 version, 7.10.3052.4
 msvcr_VS2003.md5.x86=86f1895ae8c5e8b17d99ece768a70732
 # This is the md5 hash for the VS2003 SP1 version, 7.10.6030.0
 msvcr_VS2003SP1.md5.x86=ca2f560921b7b8be1cf555a5a18d54c3
 
+msvcp.dir.x86=${depends.dir}/libs/windows.x86
+msvcp.dll.x86=${msvcr.dir.x86}/msvcp71.dll
+msvcp.url.x86=file:///${hyenv.SystemRoot}/system32/msvcp71.dll
+# This is the md5 hash for the VS2003 version, 7.10.3077.0
+msvcp_VS2003.md5.x86=561fa2abb31dfa8fab762145f81667c2
+# This is the md5 hash for the VS2003 SP1 version, 7.10.6030.0
+msvcp_VS2003SP1.md5.x86=a94dc60a90efd7a35c36d971e3ee7470
+
 msvcr.dir.x86_64=${depends.dir}/libs/windows.x86_64
 msvcr.dll.x86_64=${msvcr.dir.x86_64}/msvcr80.dll
-msvcr.dll.file.x86_64=msvcr80.dll
-#msvcr.url.x86_64=file:///${hyenv.SystemRoot}/system32/msvcr80.dll
 msvcr.url.x86_64=file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%208/VC/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll
+# VS2005 version 8.00.50727.42
 msvcr.md5.x86_64=465cebd7da2ceaba5e552fc9118a1415
+
+msvcp.dir.x86_64=${depends.dir}/libs/windows.x86_64
+msvcp.dll.x86_64=${msvcp.dir.x86_64}/msvcp80.dll
+msvcp.url.x86_64=file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%208/VC/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll
+# VS2005 version 8.00.50727.42
+msvcp.md5.x86_64=5ae0f01f02a03558da0cbd249e4df263
 
 mx4j.dir=${depends.jars}/mx4j_3.0.2
 mx4j.zip=${mx4j.dir}/mx4j.zip

Modified: harmony/enhanced/classlib/branches/java6/make/depends.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/depends.xml?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/depends.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/depends.xml Tue Jan  8 02:55:24 2008
@@ -64,9 +64,14 @@
         <property name="msvcr.dir" value="${msvcr.dir.x86}"/>
         <property name="msvcr.dll" value="${msvcr.dll.x86}"/>
         <property name="msvcr.url" value="${msvcr.url.x86}"/>
-        <property name="msvcr.dll.file" value="${msvcr.dll.file.x86}"/>
         <property name="msvcr.md5" value="${msvcr_VS2003SP1.md5.x86}"/>
         <property name="msvcr.md5.deprecated" value="${msvcr_VS2003.md5.x86}"/>
+
+        <property name="msvcp.dir" value="${msvcp.dir.x86}"/>
+        <property name="msvcp.dll" value="${msvcp.dll.x86}"/>
+        <property name="msvcp.url" value="${msvcp.url.x86}"/>
+        <property name="msvcp.md5" value="${msvcp_VS2003SP1.md5.x86}"/>
+        <property name="msvcp.md5.deprecated" value="${msvcp_VS2003.md5.x86}"/>
     </target>
 
     <target name="-select-win-deps-x86_64" if="is.x86_64">
@@ -81,14 +86,19 @@
         <property name="msvcr.dir" value="${msvcr.dir.x86_64}"/>
         <property name="msvcr.dll" value="${msvcr.dll.x86_64}"/>
         <property name="msvcr.url" value="${msvcr.url.x86_64}"/>
-        <property name="msvcr.dll.file" value="${msvcr.dll.file.x86_64}"/>
         <property name="msvcr.md5" value="${msvcr.md5.x86_64}"/>
+
+        <property name="msvcp.dir" value="${msvcp.dir.x86_64}"/>
+        <property name="msvcp.dll" value="${msvcp.dll.x86_64}"/>
+        <property name="msvcp.url" value="${msvcp.url.x86_64}"/>
+        <property name="msvcp.md5" value="${msvcp.md5.x86_64}"/>
     </target>
 
     <target name="-really-check-win" if="is.windows" depends="-select-win-deps-x86_64,-select-win-deps-x86">
         <property environment="hyenv" />
 
         <check-one-file src="${msvcr.url}" dest="${msvcr.dll}" />
+        <check-one-file src="${msvcp.url}" dest="${msvcp.dll}" />
         <check-one-file src="${awtdeps.url}" dest="${awtdeps.tar}" />
         <uptodate property="awtdeps.uptodate"
                   srcfile="${awtdeps.tar}"
@@ -238,15 +248,24 @@
     </target>
 
     <target name="-check-unix-x86_64" if="is.x86_64" unless="is.windows" depends="-check-unix-common">
-        <check-one-link src="${lcms.home}/lib/liblcms.so"
+        <condition property="lcms.lib.home" value="${lcms.home}/lib64" else="${lcms.home}/lib">
+            <available file="${lcms.home}/lib64/liblcms.so"/>
+        </condition>
+        <check-one-link src="${lcms.lib.home}/liblcms.so"
                         dest="depends/libs/build/lcms/liblcms.${hy.platform}"
                         message="${lcms.msg}" />
 
-        <check-one-link src="${png.home}/lib/libpng.so"
+        <condition property="png.lib.home" value="${png.home}/lib64" else="${png.home}/lib">
+            <available file="${png.home}/lib64/libpng.so"/>
+        </condition>
+        <check-one-link src="${png.lib.home}/libpng.so"
                         dest="depends/libs/build/png/libpng.${hy.platform}"
                         message="${png.msg}" />
 
-        <check-one-link src="${jpeg.home}/lib/libjpeg.so"
+        <condition property="jpeg.lib.home" value="${jpeg.home}/lib64" else="${jpeg.home}/lib">
+            <available file="${jpeg.home}/lib64/libjpeg.so"/>
+        </condition>
+        <check-one-link src="${jpeg.lib.home}/libjpeg.so"
                         dest="depends/libs/build/jpeg/libjpeg.${hy.platform}"
                         message="${jpeg.msg}" />
     </target>
@@ -404,6 +423,12 @@
                        dest="${msvcr.dll}"
                        md5="${msvcr.md5}"
                        md5-deprecated="${msvcr.md5.deprecated}" />
+
+    <mkdir dir="${msvcp.dir}" />
+    <download-one-file src="${msvcp.url}"
+                       dest="${msvcp.dll}"
+                       md5="${msvcp.md5}"
+                       md5-deprecated="${msvcp.md5.deprecated}" />
 
     <mkdir dir="${awtdeps.dir}" />
     <download-one-file src="${awtdeps.url}"

Modified: harmony/enhanced/classlib/branches/java6/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/properties.xml?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/properties.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/properties.xml Tue Jan  8 02:55:24 2008
@@ -210,6 +210,11 @@
         <isset property="is.windows" />
     </condition>
 
+    <condition property="object.suffix" value=".obj">
+        <isset property="is.windows" />
+    </condition>
+    <property name="object.suffix" value=".o" />
+
     <condition property="linklib.suffix" value=".lib">
         <isset property="is.windows"/>
     </condition>
@@ -220,6 +225,10 @@
         <isset property="is.macosx"/>
     </condition>
     <property name="linklib.suffix" value=".so" />
+    
+    <condition property="shlib.is.linklib">
+        <equals arg1="${shlib.suffix}" arg2="${linklib.suffix}"/>
+    </condition>
 
     <property name="manifest.suffix" value=".manifest" />
 
@@ -494,14 +503,23 @@
     <!-- To use with -Dtest.case=... option                   -->
     <!-- if ${test.case} is provided in package+class form    -->
     <!-- it is converted to dir+filename form                 -->
-    <pathconvert property="converted.tc" >
-        <path path="${test.case}"/>
-        <compositemapper>
-            <unpackagemapper from="${basedir}${file.separator}*Test" to="*Test.java" />
-            <globmapper from="${basedir}${file.separator}*.java" to="*.java" />
-        </compositemapper>
-    </pathconvert>
-
+    <macrodef name="convert-test">
+        <attribute name="from"/>
+        <attribute name="to"/>
+        <sequential>
+            <pathconvert property="@{to}" setonempty="no">
+                <path path="${@{from}}"/>
+                <chainedmapper>
+                    <filtermapper>
+                        <replaceregex pattern="\.java$$"/>
+                    </filtermapper>
+                    <unpackagemapper from="${basedir}${file.separator}*" to="*.java"/>
+                </chainedmapper>
+            </pathconvert>
+        </sequential>
+    </macrodef>
+    <convert-test from="test.case" to="converted.tc" />
+    
     <!-- Concatenate several exclude lists into single list -->
     <macrodef name="prepare-exclude-list">
        <attribute name="moduleName"/>

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java Tue Jan  8 02:55:24 2008
@@ -33,6 +33,7 @@
 import org.apache.harmony.awt.gl.MultiRectArea;
 import org.apache.harmony.awt.gl.Surface;
 import org.apache.harmony.awt.gl.Utils;
+import org.apache.harmony.awt.gl.XORComposite;
 import org.apache.harmony.awt.gl.font.FontManager;
 import org.apache.harmony.awt.gl.font.LinuxNativeFont;
 import org.apache.harmony.awt.wtk.NativeWindow;
@@ -61,10 +62,14 @@
     boolean nativeLines = true;
     boolean nativePaint = true;
     boolean transparentColor = false;
-    boolean scalingTransform = false;
     boolean simpleComposite = true;
+    boolean xor_mode = false;
 
     boolean indexModel = false;
+ 
+    static{
+        System.loadLibrary("gl");
+    }
 
     public XGraphics2D(long drawable, int tx, int ty, MultiRectArea clip) {
         super(tx, ty, clip);
@@ -124,8 +129,8 @@
         return draw;
     }
 
-    private static final long createGC(long display, long win) {
-        return x11.XCreateGC(display, win, 0, 0);
+    private final long createGC(long display, long win) {
+        return createGC(display, win, 0L, 0L);
     }
 
     public GraphicsConfiguration getDeviceConfiguration() {
@@ -137,7 +142,7 @@
         x += transform.getTranslateX();
         y += transform.getTranslateY();
 
-        x11.XCopyArea(display, drawable, drawable, gc, x, y, width, height, dx+x, dy+y);
+        copyArea(display, drawable, drawable, gc, x, y, width, height, dx+x, dy+y);
     }
 
     // Caller should free native pointer to rects after using it
@@ -158,18 +163,6 @@
         return x11.createXRectangle(rects);
     }
 
-    protected void fillMultiRectAreaColor(MultiRectArea mra) {
-        if (transparentColor || !simpleComposite) {
-            super.fillMultiRectAreaColor(mra);
-        } else {
-            int vertices[] = mra.rect;
-            int nRects = (vertices[0]-1) >> 2;
-            X11.XRectangle xRects = createXRects(vertices);
-            x11.XFillRectangles(display, drawable, gc, xRects, nRects);
-            xRects.free();
-        }
-    }
-
     public void setPaint(Paint paint) {
         if (paint == null)
             return;
@@ -210,22 +203,8 @@
             argb_val = icm.getRGB(pixel);
         }
 
-        short xRed = (short) ((argb_val & 0x00FF0000) >> 8);
-        short xGreen = (short) (argb_val & 0x0000FF00);
-        short xBlue = (short) ((argb_val & 0x000000FF) << 8);
-
-        // Create XColor
-        X11.XColor xcolor = x11.createXColor(true);
-        xcolor.set_red(xRed);
-        xcolor.set_green(xGreen);
-        xcolor.set_blue(xBlue);
-
-        // Allocate cmap cell
-        x11.XAllocColor(display, xConfig.xcolormap, xcolor);
-        x11.XSetForeground(display, gc, xcolor.get_pixel());
+        setForeground(display, gc, xConfig.xcolormap, argb_val);
 
-        // Cleanup
-        xcolor.free();
     }
 
     public void dispose() {
@@ -237,11 +216,11 @@
         }
 
         if (gc != 0) {
-            x11.XFreeGC(display, gc);
+            freeGC(display, gc);
             gc = 0;
         }
         if (imageGC != 0) {
-            x11.XFreeGC(display, imageGC);
+            freeGC(display, imageGC);
             imageGC = 0;
         }
     }
@@ -250,15 +229,14 @@
         if (mra == null) {
             resetXClip(gc);
         } else {
-            int nRects = mra.getRectCount();
-            X11.XRectangle xrects = createXRects(mra.rect);
-            x11.XSetClipRectangles(display, gc, 0, 0, xrects, nRects, X11Defs.Unsorted);
-            xrects.free();
+            int vertices[] = mra.rect;
+            int numVert = vertices[0] - 1;
+            setClipRectangles(display, gc, 0, 0, vertices, numVert);
         }
     }
 
     void resetXClip(long gc) {
-        x11.XSetClipMask(display, gc, X11Defs.None);
+        setClipMask(display, gc, X11Defs.None);
     }
 
     void setXftClip(MultiRectArea mra) {
@@ -287,10 +265,11 @@
     }
 
     void setGCFunction(int func) {
-        x11.XSetFunction(display, gc, func);
+        setFunction(display, gc, func);
     }
+
     void setImageGCFunction(int func) { // Note: works with imageGC
-        x11.XSetFunction(display, imageGC, func);
+        setFunction(display, imageGC, func);
     }
 
     Surface getSurface() {
@@ -306,51 +285,26 @@
                 return;
             }
 
-            X11.XGCValues gcVals = x11.createXGCValues(true);
-            gcVals.set_line_width(Math.round(bs.getLineWidth()));
-            gcVals.set_join_style(bs.getLineJoin());
-            gcVals.set_cap_style(bs.getEndCap()+1);
-            gcVals.set_dash_offset(Math.round(bs.getDashPhase()));
-
-            int n = 0;
-
-            if (bs.getDashArray() == null) {
-                gcVals.set_line_style(X11Defs.LineSolid);
-                gcVals.set_dashes((byte)1);
-            } else {
-                gcVals.set_line_style(X11Defs.LineOnOffDash);
-
-                n = bs.getDashArray().length;
+            int line_width = (int)(bs.getLineWidth() + 0.5f);
+            int join_style = bs.getLineJoin();
+            int cap_style = bs.getEndCap()+1;
+            int dash_offset = (int)(bs.getDashPhase() + 0.5f);
+
+            float fdashes[] = bs.getDashArray();
+
+            int len = 0;
+            byte bdashes[] = null;
+
+            if(fdashes != null){
+                len = fdashes.length;
+                bdashes = new byte[len];
 
-                if (n == 1) {
-                    gcVals.set_dashes((byte)Math.round(bs.getDashArray()[0]));
-                } else {
-                    long dashList = Utils.memaccess.malloc(n);
-                    float[] dashArray = bs.getDashArray();
-                    for (int i = 0; i < n; i++) {
-                        Utils.memaccess.setByte(dashList+i, (byte) Math.round(dashArray[i]));
-                    }
-                    x11.XSetDashes(
-                            display,
-                            gc,
-                            Math.round(bs.getDashPhase()),
-                            dashList,
-                            bs.getDashArray().length
-                    );
-                    Utils.memaccess.free(dashList);
+                for(int i = 0; i < len; i++){
+                    bdashes[i] = (byte)(fdashes[i] + 0.5f);
                 }
             }
 
-            x11.XChangeGC(
-                    display,
-                    gc,
-                    X11Defs.GCLineWidth | X11Defs.GCJoinStyle |
-                    X11Defs.GCCapStyle | X11Defs.GCDashOffset |
-                    X11Defs.GCLineStyle | (n==1 ? X11Defs.GCDashList : 0),
-                    gcVals
-            );
-
-            gcVals.free();
+            setStroke(display, gc, line_width, join_style, cap_style, dash_offset, bdashes, len);
 
             nativeLines = true;
         } else {
@@ -360,173 +314,545 @@
 
     public void setTransform(AffineTransform transform) {
         super.setTransform(transform);
+    }
+
+    public void drawLine(int x1, int y1, int x2, int y2) {
+        if (
+                nativeLines && nativePaint &&
+                !transparentColor && simpleComposite
+        ) {
+            int type = transform.getType();
+            if (type < 2) {
+              
+                int tx = (int) transform.getTranslateX();
+                int ty = (int) transform.getTranslateY();
+
+                x1 += tx;
+                y1 += ty;
+                x2 += tx;
+                y2 += ty;
+
+                drawLine(display, drawable, gc, x1, y1, x2, y2);       
+
+                if (xor_mode) {
+                    XORComposite xor = (XORComposite)composite;
+                    Color xorcolor = xor.getXORColor();
+                    xSetForeground(xorcolor.getRGB());
+                    drawLine(display, drawable, gc, x1, y1, x2, y2);       
+                    xSetForeground(fgColor.getRGB());
+                }
+            } else {
+
+                float points[] = new float[]{x1, y1, x2, y2};
+                transform.transform(points, 0, points, 0, 2);
 
-        if ((transform.getType() & AffineTransform.TYPE_MASK_SCALE) != 0) {
-            scalingTransform = true;
+                x1 = (int)points[0];
+                y1 = (int)points[1];
+                x2 = (int)points[2];
+                y2 = (int)points[3];
+
+                drawLine(display, drawable, gc, x1, y1, x2, y2);       
+
+                if (xor_mode) {
+                    XORComposite xor = (XORComposite)composite;
+                    Color xorcolor = xor.getXORColor();
+                    xSetForeground(xorcolor.getRGB());
+                    drawLine(display, drawable, gc, x1, y1, x2, y2);       
+                    xSetForeground(fgColor.getRGB());
+                }
+            }
         } else {
-            scalingTransform = false;
+            super.drawLine(x1, y1, x2, y2);
         }
     }
 
-    public void drawLine(int x1, int y1, int x2, int y2) {
+    @Override
+    public void drawPolyline(int[] xpoints, int[] ypoints, int npoints) {
         if (
                 nativeLines && nativePaint &&
-                !scalingTransform && !transparentColor &&
-                simpleComposite
+                !transparentColor && simpleComposite
         ) {
-            float points[] = new float[]{x1, y1, x2, y2};
-            transform.transform(points, 0, points, 0, 2);
-            x11.XDrawLine(
-                    display,
-                    drawable,
-                    gc,
-                    (int) points[0], (int) points[1],
-                    (int) points[2], (int) points[3]
-            );
+
+            short points[] = new short[npoints << 1];
+
+            int type = transform.getType();
+            if (type < 2) {
+              
+                int tx = (int) transform.getTranslateX();
+                int ty = (int) transform.getTranslateY();
+
+                for (int idx = 0, i = 0; i < npoints; i++){
+                    points[idx++] = (short)(xpoints[i] + tx);
+                    points[idx++] = (short)(ypoints[i] + ty);
+                }
+
+                drawLines(display, drawable, gc, points, points.length);
+            } else {
+
+                float fpoints[] = new float[npoints << 1];
+
+                for (int idx = 0, i = 0; i < npoints; i++){
+                    fpoints[idx++] = xpoints[i];
+                    fpoints[idx++] = ypoints[i];
+                }
+
+                transform.transform(fpoints, 0, fpoints, 0, npoints);
+                for (int i = 0; i < fpoints.length; i++)
+                    points[i] = (short)(fpoints[i] + 0.5f);
+
+                drawLines(display, drawable, gc, points, points.length);
+            }
+
+            if (xor_mode) {
+                XORComposite xor = (XORComposite)composite;
+                Color xorcolor = xor.getXORColor();
+                xSetForeground(xorcolor.getRGB());
+                drawLines(display, drawable, gc, points, points.length);
+                xSetForeground(fgColor.getRGB());
+            }
         } else {
-            super.drawLine(x1, y1, x2, y2);
+            super.drawPolyline(xpoints, ypoints, npoints);
         }
     }
 
+    @Override
     public void drawPolygon(int[] xpoints, int[] ypoints, int npoints) {
         if (
                 nativeLines && nativePaint &&
-                !scalingTransform && !transparentColor &&
-                simpleComposite
+                !transparentColor && simpleComposite
         ) {
-            float points[] = new float[npoints<<1];
-            int i;
-            for (i = 0; i < npoints; i++) {
-                points[i<<1] = xpoints[i];
-                points[(i<<1) + 1] = ypoints[i];
-            }
-            transform.transform(points, 0, points, 0, npoints);
-
-            // Create XPoint's
-            long xPoints = Utils.memaccess.malloc((npoints+1) << 2); // sizeof XPoint = 4
-            long ptr = xPoints;
-
-            for (i = 0; i < npoints; i++) {
-                Utils.memaccess.setShort(ptr, (short) points[i<<1]);
-                Utils.memaccess.setShort(ptr+2, (short) points[(i<<1)+1]);
-                ptr += 4; // sizeof XPoint = 4
-            }
-            // Add first point again to close path
-            Utils.memaccess.setShort(ptr, (short) points[0]);
-            Utils.memaccess.setShort(ptr+2, (short) points[1]);
 
-            x11.XDrawLines(
-                    display,
-                    drawable,
-                    gc,
-                    xPoints,
-                    npoints+1,
-                    X11Defs.CoordModeOrigin
-            );
+            short points[] = new short[(npoints << 1) + 2];
 
-            Utils.memaccess.free(xPoints);
+            int type = transform.getType();
+            if (type < 2) {
+              
+                int tx = (int) transform.getTranslateX();
+                int ty = (int) transform.getTranslateY();
+
+                int idx = 0;
+                for (int i = 0; i < npoints; i++){
+                    points[idx++] = (short)(xpoints[i] + tx);
+                    points[idx++] = (short)(ypoints[i] + ty);
+                }
+                points[idx++] = (short)(xpoints[0] + tx);
+                points[idx++] = (short)(ypoints[0] + ty);
+
+                drawLines(display, drawable, gc, points, points.length);
+            } else {
+
+                float fpoints[] = new float[npoints << 1];
+
+                for (int idx = 0, i = 0; i < npoints; i++){
+                    fpoints[idx++] = xpoints[i];
+                    fpoints[idx++] = ypoints[i];
+                }
+
+                transform.transform(fpoints, 0, fpoints, 0, npoints);
+                int i = 0;
+                for (; i < fpoints.length; i++)
+                    points[i] = (short)(fpoints[i] + 0.5f);
+                points[i++] = (short)(fpoints[0] + 0.5f);
+                points[i++] = (short)(fpoints[1] + 0.5f);
+
+                drawLines(display, drawable, gc, points, points.length);
+            }
+
+            if (xor_mode) {
+                XORComposite xor = (XORComposite)composite;
+                Color xorcolor = xor.getXORColor();
+                xSetForeground(xorcolor.getRGB());
+                drawLines(display, drawable, gc, points, points.length);
+                xSetForeground(fgColor.getRGB());
+            }
         } else {
             super.drawPolygon(xpoints, ypoints, npoints);
         }
     }
 
+    @Override
     public void drawPolygon(Polygon polygon) {
         drawPolygon(polygon.xpoints, polygon.ypoints, polygon.npoints);
     }
 
-    public void drawPolyline(int[] xpoints, int[] ypoints, int npoints) {
+    @Override
+    public void drawRect(int x, int y, int width, int height) {
         if (
                 nativeLines && nativePaint &&
-                !scalingTransform && !transparentColor &&
-                simpleComposite
+                !transparentColor && simpleComposite
         ) {
-            float points[] = new float[npoints<<1];
-            for (int i = 0; i < npoints; i++) {
-                points[i<<1] = xpoints[i];
-                points[(i<<1) + 1] = ypoints[i];
-            }
-            transform.transform(points, 0, points, 0, npoints);
+            int type = transform.getType();
+            if (type < 2) {
+                x += (int)transform.getTranslateX();
+                y += (int)transform.getTranslateY();
+                drawRectangle(display, drawable, gc, x, y, width, height);
+
+                if (xor_mode) {
+                    XORComposite xor = (XORComposite)composite;
+                    Color xorcolor = xor.getXORColor();
+                    xSetForeground(xorcolor.getRGB());
+                    drawRectangle(display, drawable, gc, x, y, width, height);
+                    xSetForeground(fgColor.getRGB());
+                }
 
-            // Create XPoint's
-            long xPoints = Utils.memaccess.malloc((npoints) << 2); // sizeof XPoint = 4
-            long ptr = xPoints;
+            } else if (type < 7) {
+                float points[] = new float[]{x, y, x + width - 1, y + height - 1};
+                transform.transform(points, 0, points, 0, 2);
+
+                if (points[0] < points[2]){
+                    x = (int)points[0];
+                    width = (int)(points[2] - points[0]) + 1;
+                } else {
+                    x = (int)points[2];
+                    width = (int)(points[0] - points[2]) + 1;
+                }
 
-            for (int i = 0; i < npoints; i++) {
-                Utils.memaccess.setShort(ptr, (short) points[i<<1]);
-                Utils.memaccess.setShort(ptr+2, (short) points[(i<<1)+1]);
-                ptr += 4; // sizeof XPoint = 4
-            }
+                if (points[1] < points[3]){
+                    y = (int)points[1];
+                    height = (int)(points[3] - points[1]) + 1;
+                } else {
+                    y = (int)points[3];
+                    height = (int)(points[1] - points[3]) + 1;
+                }
 
-            x11.XDrawLines(
-                    display,
-                    drawable,
-                    gc,
-                    xPoints,
-                    npoints,
-                    X11Defs.CoordModeOrigin
-            );
+                drawRectangle(display, drawable, gc, x, y, width, height);
+
+                if (xor_mode) {
+                    XORComposite xor = (XORComposite)composite;
+                    Color xorcolor = xor.getXORColor();
+                    xSetForeground(xorcolor.getRGB());
+                    drawRectangle(display, drawable, gc, x, y, width, height);
+                    xSetForeground(fgColor.getRGB());
+                }
+            } else {
+                float fpoints[] = new float[]{x, y, x + width - 1, y, x + width - 1, y + height - 1, x, y + height - 1};
+                transform.transform(fpoints, 0, fpoints, 0, 4);
+
+                short points[] = new short[fpoints.length + 2];
 
-            Utils.memaccess.free(xPoints);
+                int i = 0;
+                for (; i < fpoints.length; i++)
+                    points[i] = (short)(fpoints[i] + 0.5f);
+                points[i++] = (short)(fpoints[0] + 0.5f);
+                points[i++] = (short)(fpoints[1] + 0.5f);
+
+                drawLines(display, drawable, gc, points, points.length);
+
+                if (xor_mode) {
+                    XORComposite xor = (XORComposite)composite;
+                    Color xorcolor = xor.getXORColor();
+                    xSetForeground(xorcolor.getRGB());
+                    drawLines(display, drawable, gc, points, points.length);
+                    xSetForeground(fgColor.getRGB());
+                }
+            }
         } else {
-            super.drawPolyline(xpoints, ypoints, npoints);
+            super.drawRect(x, y, width, height);
         }
     }
 
-    public void drawRect(int x, int y, int width, int height) {
+    @Override
+    public void drawArc(int x, int y, int width, int height, int sa, int ea) {
         if (
                 nativeLines && nativePaint &&
                 !transparentColor && simpleComposite &&
-                (transform.getType() & AffineTransform.TYPE_TRANSLATION) != 0
+                transform.getType() < 2
         ) {
-            Point2D rectOrig = new Point2D.Float(x, y);
-            transform.transform(rectOrig, rectOrig);
-            x11.XDrawRectangle(
+            x += (int)transform.getTranslateX();
+            y += (int)transform.getTranslateY();
+            drawArc(
                     display,
                     drawable,
                     gc,
-                    (int) rectOrig.getX(), (int) rectOrig.getY(),
-                    width, height
+                    x, y,
+                    width, height,
+                    sa << 6, ea << 6
             );
+
+            if (xor_mode) {
+                XORComposite xor = (XORComposite)composite;
+                Color xorcolor = xor.getXORColor();
+                xSetForeground(xorcolor.getRGB());
+                drawArc(
+                        display,
+                        drawable,
+                        gc,
+                        x, y,
+                        width, height,
+                        sa << 6, ea << 6
+                );
+                xSetForeground(fgColor.getRGB());
+            }
         } else {
-            super.drawRect(x, y, width, height);
+            super.drawArc(x, y, width, height, sa, ea);
         }
     }
 
-    public void drawArc(int x, int y, int width, int height, int sa, int ea) {
+    @Override
+    public void drawOval(int x, int y, int width, int height) {
+        drawArc(x, y, width, height, 0, 360);
+    }
+
+    @Override
+    public void fillRect(int x, int y, int width, int height) {
+        if (
+                nativeLines && nativePaint &&
+                !transparentColor && simpleComposite
+        ) {
+            int type = transform.getType();
+            if (type < 2) {
+
+                x += (int)transform.getTranslateX();
+                y += (int)transform.getTranslateY();
+                fillRectangle(display, drawable, gc, x, y, width, height);
+
+                if (xor_mode) {
+                    XORComposite xor = (XORComposite)composite;
+                    Color xorcolor = xor.getXORColor();
+                    xSetForeground(xorcolor.getRGB());
+                    fillRectangle(display, drawable, gc, x, y, width, height);
+                    xSetForeground(fgColor.getRGB());
+                }
+
+            } else if (type < 7) {
+                float points[] = new float[]{x, y, x + width - 1, y + height - 1};
+                transform.transform(points, 0, points, 0, 2);
+
+                if (points[0] < points[2]){
+                    x = (int)points[0];
+                    width = (int)(points[2] - points[0]) + 1;
+                } else {
+                    x = (int)points[2];
+                    width = (int)(points[0] - points[2]) + 1;
+                }
+
+                if (points[1] < points[3]){
+                    y = (int)points[1];
+                    height = (int)(points[3] - points[1]) + 1;
+                } else {
+                    y = (int)points[3];
+                    height = (int)(points[1] - points[3]) + 1;
+                }
+
+                fillRectangle(display, drawable, gc, x, y, width, height);
+
+                if (xor_mode) {
+                    XORComposite xor = (XORComposite)composite;
+                    Color xorcolor = xor.getXORColor();
+                    xSetForeground(xorcolor.getRGB());
+                    fillRectangle(display, drawable, gc, x, y, width, height);
+                    xSetForeground(fgColor.getRGB());
+                }
+            } else {
+                float points[] = new float[]{x, y, x + width - 1, y, x + width - 1, y + height - 1, x, y + height - 1};
+                transform.transform(points, 0, points, 0, 4);
+
+                short spoints[] = new short[points.length];
+                for (int i = 0; i < points.length; i++)
+                    spoints[i] = (short)(points[i] + 0.5f);
+                fillPolygon(display, drawable, gc, spoints, spoints.length);
+
+                if (xor_mode) {
+                    XORComposite xor = (XORComposite)composite;
+                    Color xorcolor = xor.getXORColor();
+                    xSetForeground(xorcolor.getRGB());
+                    fillPolygon(display, drawable, gc, spoints, spoints.length);
+                    xSetForeground(fgColor.getRGB());
+                }
+            }
+        } else {
+            super.fill(new Rectangle(x, y, width, height));
+        }
+    }
+
+    protected void fillMultiRectAreaColor(MultiRectArea mra) {
+        if (
+                nativeLines && nativePaint && 
+                !transparentColor && simpleComposite
+        ) {
+            int vertices[] = mra.rect;
+            int numVert = vertices[0] - 1;
+            fillRectangles(display, drawable, gc, vertices, numVert);
+
+            if (xor_mode) {
+                XORComposite xor = (XORComposite)composite;
+                Color xorcolor = xor.getXORColor();
+                xSetForeground(xorcolor.getRGB());
+                fillRectangles(display, drawable, gc, vertices, numVert);
+                xSetForeground(fgColor.getRGB());
+            }
+        } else {
+            super.fillMultiRectAreaColor(mra);
+        }
+    }
+
+    @Override
+    public void fillPolygon(Polygon p) {
+        fillPolygon(p.xpoints, p.ypoints, p.npoints);
+    }
+
+    @Override
+    public void fillPolygon(int[] xpoints, int[] ypoints, int npoints ) {
+        if (
+                nativeLines && nativePaint &&
+                !transparentColor && simpleComposite
+        ) {
+
+            short points[] = new short[npoints << 1];
+
+            int type = transform.getType();
+            if (type < 2) {
+              
+                int tx = (int) transform.getTranslateX();
+                int ty = (int) transform.getTranslateY();
+
+                for (int idx = 0, i = 0; i < npoints; i++){
+                    points[idx++] = (short)(xpoints[i] + tx);
+                    points[idx++] = (short)(ypoints[i] + ty);
+                }
+
+                fillPolygon(display, drawable, gc, points, points.length);
+            } else {
+
+                float fpoints[] = new float[npoints << 1];
+
+                for (int idx = 0, i = 0; i < npoints; i++){
+                    fpoints[idx++] = xpoints[i];
+                    fpoints[idx++] = ypoints[i];
+
+                }
+                transform.transform(fpoints, 0, fpoints, 0, npoints);
+
+                for (int i = 0; i < fpoints.length; i++)
+                    points[i] = (short)(fpoints[i] + 0.5f);
+
+                fillPolygon(display, drawable, gc, points, points.length);
+            }
+
+            if (xor_mode) {
+                XORComposite xor = (XORComposite)composite;
+                Color xorcolor = xor.getXORColor();
+                xSetForeground(xorcolor.getRGB());
+                fillPolygon(display, drawable, gc, points, points.length);
+                xSetForeground(fgColor.getRGB());
+            }
+        } else {
+            super.fillPolygon(xpoints, ypoints, npoints);
+        }
+    }
+
+    @Override
+    public void fillArc(int x, int y, int width, int height, int sa, int ea) {
         if (
                 nativeLines && nativePaint &&
                 !transparentColor && simpleComposite &&
-                (transform.getType() & AffineTransform.TYPE_TRANSLATION) != 0
+                transform.getType() < 2
         ) {
-            Point2D orig = new Point2D.Float(x, y);
-            transform.transform(orig, orig);
-            x11.XDrawArc(
+            x += (int)transform.getTranslateX();
+            y += (int)transform.getTranslateY();
+            fillArc(
                     display,
                     drawable,
                     gc,
-                    (int) orig.getX(), (int) orig.getY(),
+                    x, y,
                     width, height,
                     sa << 6, ea << 6
             );
+
+            if (xor_mode) {
+                XORComposite xor = (XORComposite)composite;
+                Color xorcolor = xor.getXORColor();
+                xSetForeground(xorcolor.getRGB());
+                fillArc(
+                        display,
+                        drawable,
+                        gc,
+                        x, y,
+                        width, height,
+                        sa << 6, ea << 6
+                );
+                xSetForeground(fgColor.getRGB());
+            }
         } else {
-            super.drawArc(x, y, width, height, sa, ea);
+            super.fillArc(x, y, width, height, sa, ea);
         }
     }
 
-    public void drawOval(int x, int y, int width, int height) {
-        drawArc(x, y, width, height, 0, 360);
+    @Override
+    public void fillOval(int x, int y, int width, int height) {
+        fillArc(x, y, width, height, 0, 360);
+    }
+
+    @Override
+    public void setXORMode(Color color) {
+        super.setXORMode(color);
+        setFunction(display, gc, X11Defs.GXxor);
+        xor_mode = true;
+        simpleComposite = true;
+    }
+
+    @Override
+    public void setPaintMode() {
+        setComposite(AlphaComposite.SrcOver);
     }
 
     public void setComposite(Composite composite) {
         super.setComposite(composite);
+        xor_mode = false;
         if (composite instanceof AlphaComposite) {
             AlphaComposite acomp = (AlphaComposite) composite;
-            if (acomp.getRule() == AlphaComposite.SRC) {
-                simpleComposite = true;
-            } else if (acomp.getAlpha() != 1.0f) {
-                simpleComposite = false;
-            } else {
-                simpleComposite = true;
+            int rule = acomp.getRule();
+            float srca = acomp.getAlpha();
+
+            switch(rule){
+                case AlphaComposite.CLEAR:
+                case AlphaComposite.SRC_OUT:
+                    setFunction(display, gc, X11Defs.GXclear);                
+                    simpleComposite = true;
+                    break;
+
+                case AlphaComposite.SRC:
+                case AlphaComposite.SRC_IN:
+                    if(srca == 0.0f) setFunction(display, gc, X11Defs.GXclear);
+                    else setFunction(display, gc, X11Defs.GXcopy);
+                    simpleComposite = true;
+                    break;
+
+                case AlphaComposite.DST:
+                case AlphaComposite.DST_OVER:
+                    setFunction(display, gc, X11Defs.GXnoop);                
+                    simpleComposite = true;
+                    break;
+
+                case AlphaComposite.SRC_ATOP:
+                case AlphaComposite.SRC_OVER:
+                    setFunction(display, gc, X11Defs.GXcopy);                
+                    if(srca == 1.0f){
+                        simpleComposite = true;
+                    }else{
+                        simpleComposite = false;
+                    }
+                    break;
+
+                case AlphaComposite.DST_IN:
+                case AlphaComposite.DST_ATOP:
+                    if(srca != 0.0f){
+                        setFunction(display, gc, X11Defs.GXnoop);                
+                    } else {
+                        setFunction(display, gc, X11Defs.GXclear);                
+                    }
+                    simpleComposite = true;
+                    break;
+
+                case AlphaComposite.DST_OUT:
+                case AlphaComposite.XOR:
+                    if(srca != 1.0f){
+                        setFunction(display, gc, X11Defs.GXnoop);                
+                    } else {
+                        setFunction(display, gc, X11Defs.GXclear);                
+                    }
+                    simpleComposite = true;
+                    break;
             }
         } else {
             simpleComposite = false;
@@ -589,4 +915,41 @@
         this.fill(sh);
 
     }
+
+    // Native methods
+
+    // GC methods
+    // Creating and Releasing
+    private native long createGC(long display, long drawable, long valuemask, long values);
+    private native int freeGC(long display, long gc);
+
+    // Setting GC function
+    private native int setFunction(long display, long gc, int func);
+
+    // Stroke (line attributes)
+    private native int setStroke(long display, long gc, int line_width, int join_style, int cap_style, int dash_offset, byte dashes[], int len);
+
+    // Foreground
+    private native int setForeground(long display, long gc, long colormap, int argb_val);
+
+    // Clipping
+    private native int setClipMask(long display, long gc, long pixmap);
+    private native int setClipRectangles(long display, long gc, int clip_x_origin, int clip_y_origin, int clip_rects[], int num_rects);
+
+    // Drawing methods
+
+    private native int drawArc(long display, long drawable, long gc, int x, int y, int width, int height, int startAngle, int angle);
+    private native int drawLine(long display, long drawable, long gc, int x1, int y1, int x2, int y2);       
+    private native int drawLines(long display, long drawable, long gc, short points[], int numPoints);
+    private native int drawRectangle(long display, long drawable, long gc, int x, int y, int width, int height);
+
+    // Filling methods
+
+    private native int fillRectangles(long display, long drawable, long gc, int vertices[], int numVert);
+    private native int fillRectangle(long display, long drawable, long gc, int x, int y, int width, int height);
+    private native int fillPolygon(long display, long drawable, long gc, short points[], int numPoints);
+    private native int fillArc(long display, long drawable, long gc, int x, int y, int width, int height, int startAngle, int angle);
+
+    private native int copyArea(long display, long src, long dst, long gc, int src_x, int src_y, int width, int height, int dst_x, int dst_y);
+
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java Tue Jan  8 02:55:24 2008
@@ -55,6 +55,7 @@
     private NativeWindow nw = null;
     private long hdc = 0;
     private long gi = 0;
+    private char pageUnit = 1;
 
     private final Dimension size;
 
@@ -155,6 +156,8 @@
      */
     public WinGDIPGraphics2D(final long hdc, final char pageUnit,
                     final int width, final int height) {
+        this.hdc = hdc;
+        this.pageUnit = pageUnit;
         size = new Dimension(width, height);
         gi = createGraphicsInfoFor(hdc, pageUnit);
 
@@ -190,12 +193,18 @@
             System.err.println("WinGDIPGraphics2D.create()"); //$NON-NLS-1$
         }
 
-        WinGDIPGraphics2D res = null;
-        if (img == null) {
-            res = new WinGDIPGraphics2D(nw, origPoint.x, origPoint.y, size.width, size.height);
-        } else {
+        final WinGDIPGraphics2D res;
+
+        if (img != null) {
             res = new WinGDIPGraphics2D(img, gi, size.width, size.height);
+        } else if (nw != null) {
+            res = new WinGDIPGraphics2D(nw, origPoint.x, origPoint.y,
+                            size.width, size.height);
+        } else {
+            res = new WinGDIPGraphics2D(getDC(), pageUnit, size.width,
+                            size.height);
         }
+
         copyInternalFields(res);
         return res;
     }
@@ -203,10 +212,11 @@
     @Override
     public GraphicsConfiguration getDeviceConfiguration() {
         if (config == null) {
-            if (img == null) {
+            if (nw != null) {
                 config = new WinGraphicsConfiguration(nw.getId(), getDC());
-            } else {
-                long hwnd = img.getHWND();
+            } else if (img != null) {
+                final long hwnd = img.getHWND();
+                
                 if(hwnd != 0){
                     config = new WinGraphicsConfiguration(hwnd, getDC());
                 }else{

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/SurfaceDataStructure.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/SurfaceDataStructure.cpp?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/SurfaceDataStructure.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/SurfaceDataStructure.cpp Tue Jan  8 02:55:24 2008
@@ -99,17 +99,17 @@
 
         case INT_ARGB:
             {
-                unsigned char *src, *s, *dst, *d, sa;
+                if(alphaPre){
+                    unsigned char *src, *s, *dst, *d, sa;
 
-                src_stride = srcSurf->scanline_stride_byte;
-                dst_stride = srcSurf->width << 2;
+                    src_stride = srcSurf->scanline_stride_byte;
+                    dst_stride = srcSurf->width << 2;
 
-                src_offset = y * src_stride + ((x + w) << 2) - 1;
-                dst_offset = y * dst_stride + ((x + w) << 2) - 1;
-                src = (unsigned char *)srcDataPtr + src_offset;
-                dst = (unsigned char *)bmpDataPtr + dst_offset;
+                    src_offset = y * src_stride + ((x + w) << 2) - 1;
+                    dst_offset = y * dst_stride + ((x + w) << 2) - 1;
+                    src = (unsigned char *)srcDataPtr + src_offset;
+                    dst = (unsigned char *)bmpDataPtr + dst_offset;
 
-                if(alphaPre){
                     for(int _y = h; _y > 0; _y--, src += src_stride, dst += dst_stride){
                         s = src;
                         d = dst;
@@ -129,28 +129,23 @@
                             }
                         }
                     }
+
                     srcSurf->isAlphaPre = true;
                 }else{
-                    for(int _y = h; _y > 0; _y--, src += src_stride, dst += dst_stride){
-                        s = src;
-                        d = dst;
+                    unsigned int *src, *dst;
 
-                        for(int _x = w; _x > 0; _x--){
-                            sa = *s--;
-                            if(sa == 0){
-                                *d-- = 0;
-                                *d-- = 0;
-                                *d-- = 0;
-                                *d-- = 0;
-                                s -= 3;
-                            }else{
-                                *d-- = sa;
-                                *d-- = MUL(sa, *s--);
-                                *d-- = MUL(sa, *s--);
-                                *d-- = MUL(sa, *s--);
-                            }
-                        }
+                    src_stride = srcSurf->scanline_stride;
+                    dst_stride = srcSurf->width;
+
+                    src_offset = y * src_stride + x;
+                    dst_offset = y * dst_stride + x;
+                    src = (unsigned int *)srcDataPtr + src_offset;
+                    dst = (unsigned int *)bmpDataPtr + dst_offset;
+
+                    for(int _y = 0; _y < h; _y++, src += src_stride, dst += dst_stride){
+                        memcpy(dst, src, w * sizeof(int));
                     }
+
                     srcSurf->isAlphaPre = false;
                 }
             }
@@ -303,17 +298,10 @@
                             g = *s--;
                             b = *s--;
                             a = *s--;
-                            if(a == 0){
-                                *d-- = 0;
-                                *d-- = 0;
-                                *d-- = 0;
-                                *d-- = 0;
-                            }else{
-                                *d-- = a;
-                                *d-- = r;
-                                *d-- = g;
-                                *d-- = b;
-                            }
+                            *d-- = a;
+                            *d-- = r;
+                            *d-- = g;
+                            *d-- = b;
                         }
                     }
                     srcSurf->isAlphaPre = false;

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/blitter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/blitter.cpp?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/blitter.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/blitter.cpp Tue Jan  8 02:55:24 2008
@@ -819,10 +819,10 @@
       r = (unsigned char)((xorcolor >> 16) & 0xff);
       g = (unsigned char)((xorcolor >> 8) & 0xff);
       b = (unsigned char)(xorcolor & 0xff);
-
       for(int _sy = srcY, _dy = dstY, maxY = srcY + height; _sy < maxY; _sy++, _dy++){
           for(int _sx = srcX, _dx = dstX, maxX = srcX + width; _sx < maxX; _sx++, _dx++){
               getRGB(_sx, _sy, srcStruct, srcData, sr, sg, sb, sa, false);
+              if(sa < 128) continue;
               getRGB(_dx, _dy, dstStruct, dstData, dr, dg, db, da, false);
               dr ^= (r ^ sr);
               dg ^= (g ^ sg);

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/exports.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/exports.txt?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/exports.txt (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/exports.txt Tue Jan  8 02:55:24 2008
@@ -16,3 +16,19 @@
 Java_org_apache_harmony_awt_gl_render_NativeImageBlitter_xor
 Java_org_apache_harmony_awt_gl_ImageSurface_updateCache
 Java_org_apache_harmony_awt_gl_Surface_initIDs
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_copyArea
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_createGC
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_drawArc
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_drawLine
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_drawLines
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_drawRectangle
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_fillArc
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_fillPolygon
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_fillRectangle
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_fillRectangles
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_freeGC
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setClipMask
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setClipRectangles
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setForeground
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setFunction
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setStroke

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/makefile?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/makefile Tue Jan  8 02:55:24 2008
@@ -17,7 +17,7 @@
 
 PNG_DIR=$(HY_HDK)/../depends/libs/build/png
 
-INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)/include -I$(PNG_DIR)
+INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)/include -I$(PNG_DIR) -I/usr/X11R6/include -I/usr/include -Iinclude
 
 BUILDFILES = \
   $(SHAREDSUB)/blitter.o \
@@ -25,6 +25,7 @@
   $(SHAREDSUB)/LUTTables.o \
   $(SHAREDSUB)/pngdecoder.o \
   $(SHAREDSUB)/SurfaceDataStructure.o \
+  XGraphics2D.o \
   libpng.a
 
 ifneq ($(HY_ZIP_API),true)

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/windows/GDIBlitter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/windows/GDIBlitter.cpp?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/windows/GDIBlitter.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/windows/GDIBlitter.cpp Tue Jan  8 02:55:24 2008
@@ -70,22 +70,20 @@
       SelectObject(tmpDC, brush);
       PatBlt(tmpDC, 0, 0, w, h, PATCOPY);
       
-      int count;
       int *regions;
       if(dirtyRegions == 0){
-          regCount = 1;
+          regCount = 4;
           regions = (int *)malloc(4 * sizeof(int));
           regions[0] = 0;
           regions[1] = 0;
           regions[2] = srcSurf->width - 1;
           regions[3] = srcSurf->height - 1;
       } else {
-          count = regCount;
-          regions = (int *)malloc(count * sizeof(int));
-          env->GetIntArrayRegion(dirtyRegions, 1, count, regions);
+          regions = (int *)malloc(regCount * sizeof(int));
+          env->GetIntArrayRegion(dirtyRegions, 1, regCount, regions);
       }
 
-      if(initBitmap(srcSurf, env, srcData, true, regions, count)){
+      if(initBitmap(srcSurf, env, srcData, true, regions, regCount)){
           BLENDFUNCTION bf;
           bf.AlphaFormat = AC_SRC_ALPHA;
           bf.BlendOp = AC_SRC_OVER;
@@ -213,22 +211,20 @@
 
       srcSurf->invalidated = invalidated != 0;
       
-      int count;
       int *regions;
       if(dirtyRegions == 0){
-          regCount = 1;
+          regCount = 4;
           regions = (int *)malloc(4 * sizeof(int));
           regions[0] = 0;
           regions[1] = 0;
           regions[2] = srcSurf->width - 1;
           regions[3] = srcSurf->height - 1;
       } else {
-          count = regCount;
-          regions = (int *)malloc(count * sizeof(int));
-          env->GetIntArrayRegion(dirtyRegions, 1, count, regions);
+          regions = (int *)malloc(regCount * sizeof(int));
+          env->GetIntArrayRegion(dirtyRegions, 1, regCount, regions);
       }
 
-      if(!initBlitData(srcSurf, env, srcData, compType, srca, &blitStruct, regions, count)){
+      if(!initBlitData(srcSurf, env, srcData, compType, srca, &blitStruct, regions, regCount)){
           return;
       }
 
@@ -409,21 +405,19 @@
 
       srcSurf->invalidated = invalidated != 0;
 
-      int count;
       int *regions;
       if(dirtyRegions == 0){
-          regCount = 1;
+          regCount = 4;
           regions = (int *)malloc(4 * sizeof(int));
           regions[0] = 0;
           regions[1] = 0;
           regions[2] = srcSurf->width - 1;
           regions[3] = srcSurf->height - 1;
       } else {
-          count = regCount;
-          regions = (int *)malloc(count * sizeof(int));
-          env->GetIntArrayRegion(dirtyRegions, 1, count, regions);
+          regions = (int *)malloc(regCount * sizeof(int));
+          env->GetIntArrayRegion(dirtyRegions, 1, regCount, regions);
       }
-      if(!initBitmap(srcSurf, env, srcData, true, regions, count)) return;
+      if(!initBitmap(srcSurf, env, srcData, false, regions, regCount)) return;
 
       BYTE r = (BYTE)((xorcolor >> 16) & 0xff);
       BYTE g = (BYTE)((xorcolor >> 8) & 0xff);
@@ -456,8 +450,38 @@
 
       HGDIOBJ oldBrush = SelectObject(dstSurf->gi->hdc, brush);
 
-      BitBlt(dstSurf->gi->hdc, dstX, dstY, width, height, srcSurf->srcDC,
-              srcX, srcY, 0x960169);
+      if(srcSurf->has_alpha){
+
+          int scanline_word = srcSurf->width / 16;
+          if(srcSurf->width % 16 != 0) scanline_word++;
+
+          BYTE *pm = (BYTE *)calloc(scanline_word * srcSurf->height * 2, 1);
+
+          int byteIdx = 0;
+          unsigned int *p = (unsigned int *)srcSurf->bmpData;
+          for(int y = 0; y < srcSurf->height; y++){
+              for(int x = 0, shift = 7; x < srcSurf->width; x++, shift--, p++){
+                  if(shift < 0 ){
+                      shift = 7;
+                      byteIdx++;
+                  } 
+                  unsigned int pixel = (*p >> 24) & 0xff;
+                  if(pixel > 127) pm[byteIdx] |= 1 << shift;
+              }
+              if(byteIdx % 2 != 0) byteIdx++;
+              else byteIdx += 2;
+          }      
+
+          HBITMAP mask = CreateBitmap(srcSurf->width, srcSurf->height, 1, 1, pm);
+          free(pm);
+          MaskBlt(dstSurf->gi->hdc, dstX, dstY, width, height, srcSurf->srcDC,
+                  srcX, srcY, mask, srcX, srcY, MAKEROP4(0x960169, 0xAA0029));
+          DeleteObject(mask);
+      }else{
+
+          BitBlt(dstSurf->gi->hdc, dstX, dstY, width, height, srcSurf->srcDC,
+                  srcX, srcY, 0x960169);
+      }
 
       SelectObject(dstSurf->gi->hdc, oldBrush);
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/windows/WinGDIPGraphics2D.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/windows/WinGDIPGraphics2D.cpp?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/windows/WinGDIPGraphics2D.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/windows/WinGDIPGraphics2D.cpp Tue Jan  8 02:55:24 2008
@@ -118,7 +118,7 @@
  */
 JNIEXPORT jlong JNICALL Java_org_apache_harmony_awt_gl_windows_WinGDIPGraphics2D_createGraphicsInfoFor
   (JNIEnv * env, jobject obj, jlong hdc, jchar pageUnit) {
-        GraphicsInfo * gi = (GraphicsInfo *) malloc(sizeof(GraphicsInfo));
+        GraphicsInfo * gi = (GraphicsInfo *) calloc(1, sizeof(GraphicsInfo));
 
         gi->hdc = (HDC) hdc;
         gi->graphics = new Graphics(gi->hdc);

Modified: harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/java/javax/imageio/IIOParam.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/java/javax/imageio/IIOParam.java?rev=609928&r1=609927&r2=609928&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/java/javax/imageio/IIOParam.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/java/javax/imageio/IIOParam.java Tue Jan  8 02:55:24 2008
@@ -22,8 +22,6 @@
 
 import java.awt.*;
 
-import org.apache.harmony.luni.util.NotImplementedException;
-
 public abstract class IIOParam {
     protected Rectangle sourceRegion;
     protected int sourceXSubsampling = 1;
@@ -87,11 +85,11 @@
             throw new IllegalArgumentException("sourceYSubsampling <= 0");
         }
 
-        if (subsamplingXOffset <= 0 || subsamplingXOffset >= sourceXSubsampling) {
+        if ((subsamplingXOffset < 0) || (subsamplingXOffset >= sourceXSubsampling)) {
             throw new IllegalArgumentException("subsamplingXOffset is wrong");
         }
 
-        if (subsamplingYOffset <= 0 || subsamplingYOffset >= sourceYSubsampling) {
+        if ((subsamplingYOffset < 0) || (subsamplingYOffset >= sourceYSubsampling)) {
             throw new IllegalArgumentException("subsamplingYOffset is wrong");
         }
 
@@ -125,24 +123,36 @@
         return subsamplingYOffset;
     }
 
-    public void setSourceBands(int[] sourceBands) throws NotImplementedException {
-        // TODO implement
-        throw new NotImplementedException();
+    public void setSourceBands(final int[] sourceBands) {
+        if (sourceBands == null) {
+            this.sourceBands = null;
+        } else {
+            for (int i = 0; i < sourceBands.length; i++) {
+                if (sourceBands[i] < 0) {
+                    throw new IllegalArgumentException("negative value");
+                }
+                
+                for (int j = i + 1; j < sourceBands.length; j++) {
+                    if (sourceBands[i] == sourceBands[j]) {
+                        throw new IllegalArgumentException("duplicate value");
+                    }
+                }
+            }
+            
+            this.sourceBands = sourceBands.clone();
+        }
     }
 
-    public int[] getSourceBands() throws NotImplementedException {
-        // TODO implement
-        throw new NotImplementedException();
+    public int[] getSourceBands() {
+        return (sourceBands != null) ? sourceBands.clone() : null;
     }
 
-    public void setDestinationType(ImageTypeSpecifier destinationType) throws NotImplementedException {
-        // TODO implement
-        throw new NotImplementedException();
+    public void setDestinationType(final ImageTypeSpecifier destinationType) {
+        this.destinationType = destinationType;
     }
 
-    public ImageTypeSpecifier getDestinationType() throws NotImplementedException {
-        // TODO implement
-        throw new NotImplementedException();
+    public ImageTypeSpecifier getDestinationType() {
+        return destinationType;
     }
 
     public void setDestinationOffset(Point destinationOffset) {
@@ -157,28 +167,29 @@
         return (Point) destinationOffset.clone();        
     }
 
-    public void setController(IIOParamController controller) throws NotImplementedException {
-        // TODO implement
-        throw new NotImplementedException();
+    public void setController(final IIOParamController controller) {
+        this.controller = controller;
     }
 
-    public IIOParamController getController() throws NotImplementedException {
-        // TODO implement
-        throw new NotImplementedException();
+    public IIOParamController getController(){
+        return controller;
     }
 
-    public IIOParamController getDefaultController() throws NotImplementedException {
-        // TODO implement
-        throw new NotImplementedException();
+    public IIOParamController getDefaultController() {
+        return defaultController;
     }
 
-    public boolean hasController() throws NotImplementedException {
-        // TODO implement
-        throw new NotImplementedException();
+    public boolean hasController() {
+        return (controller != null);
     }
 
-    public boolean activateController() throws NotImplementedException {
-        // TODO implement
-        throw new NotImplementedException();
+    public boolean activateController() {
+        final IIOParamController controller = getController();
+        
+        if (controller == null) {
+            throw new IllegalStateException("controller wasn't set");
+        }
+        
+        return controller.activate(this);
     }
 }



Mime
View raw message