changeset in /hg/icedtea: 2007-12-28 Lillian Angel <langel at red...
Lillian Angel
langel at redhat.com
Fri Dec 28 06:52:55 PST 2007
changeset 4e2ae53637f0 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=4e2ae53637f0
description:
2007-12-28 Lillian Angel <langel at redhat.com>
* rt/java/awt/image/Raster.java
(createPackedRaster): Changed to create a BytePackedRaster instead of
a ByteInterleavedRaster.
diffstat:
2 files changed, 12 insertions(+), 4 deletions(-)
ChangeLog | 6 ++++++
rt/java/awt/image/Raster.java | 10 ++++++----
diffs (40 lines):
diff -r 8ae161d10f7b -r 4e2ae53637f0 ChangeLog
--- a/ChangeLog Fri Dec 21 08:37:52 2007 -0500
+++ b/ChangeLog Fri Dec 28 09:51:42 2007 -0500
@@ -1,3 +1,9 @@ 2007-12-21 Lillian Angel <langel at redha
+2007-12-28 Lillian Angel <langel at redhat.com>
+
+ * rt/java/awt/image/Raster.java
+ (createPackedRaster): Changed to create a BytePackedRaster instead of
+ a ByteInterleavedRaster.
+
2007-12-21 Lillian Angel <langel at redhat.com>
* Makefile.am: Took out invalid check for ICEDTEA_HOME.
diff -r 8ae161d10f7b -r 4e2ae53637f0 rt/java/awt/image/Raster.java
--- a/rt/java/awt/image/Raster.java Fri Dec 21 08:37:52 2007 -0500
+++ b/rt/java/awt/image/Raster.java Fri Dec 28 09:51:42 2007 -0500
@@ -329,8 +329,9 @@ public class Raster
{
SampleModel sm = new MultiPixelPackedSampleModel(dataType, w, h, bitsPerBand);
- if (dataType == DataBuffer.TYPE_BYTE)
- return new ByteInterleavedRaster(sm, location);
+ if ((dataType == DataBuffer.TYPE_BYTE) &&
+ (bitsPerBand == 1 || bitsPerBand == 2 || bitsPerBand == 4))
+ return new BytePackedRaster(sm, location);
else if (dataType == DataBuffer.TYPE_USHORT || dataType == DataBuffer.TYPE_INT)
return new SunWritableRaster(sm, location);
else
@@ -480,8 +481,9 @@ public class Raster
if (location == null)
location = new Point(0,0);
- if (dataBuffer.getDataType() == DataBuffer.TYPE_BYTE)
- return new ByteInterleavedRaster(sm, dataBuffer, location);
+ if ((dataBuffer.getDataType() == DataBuffer.TYPE_BYTE) &&
+ (bitsPerPixel == 1 || bitsPerPixel == 2 || bitsPerPixel == 4))
+ return new BytePackedRaster(sm, dataBuffer, location);
else if (dataBuffer.getDataType() == DataBuffer.TYPE_USHORT
|| dataBuffer.getDataType() == DataBuffer.TYPE_INT)
return new SunWritableRaster(sm, dataBuffer, location);
More information about the distro-pkg-dev
mailing list