Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 78062 invoked from network); 12 Oct 2007 16:47:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Oct 2007 16:47:41 -0000 Received: (qmail 66420 invoked by uid 500); 12 Oct 2007 16:47:29 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 66323 invoked by uid 500); 12 Oct 2007 16:47:29 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 66309 invoked by uid 99); 12 Oct 2007 16:47:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 09:47:29 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 16:47:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C2709714209 for ; Fri, 12 Oct 2007 09:46:50 -0700 (PDT) Message-ID: <13431599.1192207610794.JavaMail.jira@brutus> Date: Fri, 12 Oct 2007 09:46:50 -0700 (PDT) From: "Alexei Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-4902) [classlib][awt] GraphicsConfiguration.getColorModel(int transparency) returns wrong ColorModel In-Reply-To: <5797651.1191659690578.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534337 ] Alexei Zakharov commented on HARMONY-4902: ------------------------------------------ Thanks for the patch Igor. I was a little bit confused by line duplication in WinGraphicsEnvironment.cpp:119 and :120. However, by some strange reason it doesn't work without this. I've committed the patch at the revision 584197. Please verify it was applied as expected. Before closing this JIRA I think we should address the Linux issue somehow - either create a patch and commit it as part of the current JIRA or create a separate one that will be Linux-specific. > [classlib][awt] GraphicsConfiguration.getColorModel(int transparency) returns wrong ColorModel > ---------------------------------------------------------------------------------------------- > > Key: HARMONY-4902 > URL: https://issues.apache.org/jira/browse/HARMONY-4902 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Igor V. Stolyarov > Assignee: Alexei Zakharov > Attachments: H-4902.patch > > > GraphicsConfiguration.getColorModel(int transparency) returns wrong ColorModel > Simple reproducer: > import java.awt.*; > import java.awt.image.*; > public class CMTest{ > public static void main(String argv[]){ > GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment() > .getDefaultScreenDevice(); > GraphicsConfiguration gc = gd.getDefaultConfiguration(); > System.out.println("TRANSLUCENT CM: " + gc.getColorModel(Transparency.TRANSLUCENT)); > System.out.println("BITMASK CM: " + gc.getColorModel(Transparency.BITMASK)); > System.out.println("OPAQUE CM: " + gc.getColorModel()); > GraphicsConfiguration gcs[] = gd.getConfigurations(); > for(int i = 0; i < gcs.length; i++) > System.out.println("CM: " + gcs[i].getColorModel()); > > } > } > Output 32 bit display resolution: > java version "1.5.0" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) > BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: > System optimized over throughput (initial strategy singleparpar)) > TRANSLUCENT CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=ff000000 > BITMASK CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=1000000 > OPAQUE CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 > CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 > CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 > CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 > CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 > CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 > CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 > CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 > CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 > CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 > CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 > Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r581507, (Oct 3 2007), Windows/ia32/msvc 1310, release build > http://harmony.apache.org > TRANSLUCENT CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff000000 > BITMASK CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff000000 > OPAQUE CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff000000 > CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff000000 > CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = 0 > CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff > CM: null > CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = 0 > CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff > CM: DirectColorModel: rmask = 7c00 gmask = 3e0 bmask = 1f amask = 0 > CM: DirectColorModel: rmask = 7c00 gmask = 3e0 bmask = 1f amask = ff > CM: DirectColorModel: rmask = 7 gmask = 38 bmask = c0 amask = 0 > CM: DirectColorModel: rmask = 7 gmask = 38 bmask = c0 amask = ff > CM: DirectColorModel: rmask = 1 gmask = 2 bmask = 4 amask = 0 > CM: DirectColorModel: rmask = 1 gmask = 2 bmask = 4 amask = ff > Output 16 bit display resolution: > java version "1.5.0" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) > BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: > System optimized over throughput (initial strategy singleparpar)) > TRANSLUCENT CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=ff000000 > BITMASK CM: DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=1000000 > OPAQUE CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0 > CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0 > CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0 > CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0 > CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0 > CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0 > CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0 > CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0 > CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0 > CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0 > CM: DirectColorModel: rmask=f800 gmask=7e0 bmask=1f amask=0 > Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r581507, (Oct 3 2007), Windows/ia32/msvc 1310, release build > http://harmony.apache.org > TRANSLUCENT CM: DirectColorModel: rmask = f800 gmask = 7e0 bmask = 1f amask = 0 > BITMASK CM: DirectColorModel: rmask = f800 gmask = 7e0 bmask = 1f amask = 0 > OPAQUE CM: DirectColorModel: rmask = f800 gmask = 7e0 bmask = 1f amask = 0 > CM: DirectColorModel: rmask = f800 gmask = 7e0 bmask = 1f amask = 0 > CM: DirectColorModel: rmask = f800 gmask = 7e0 bmask = 1f amask = ff > CM: null > CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = 0 > CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff > CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = 0 > CM: DirectColorModel: rmask = ff0000 gmask = ff00 bmask = ff amask = ff > CM: DirectColorModel: rmask = 7 gmask = 38 bmask = c0 amask = 0 > CM: DirectColorModel: rmask = 7 gmask = 38 bmask = c0 amask = ff > CM: DirectColorModel: rmask = 1 gmask = 2 bmask = 4 amask = 0 > CM: DirectColorModel: rmask = 1 gmask = 2 bmask = 4 amask = ff -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.