diff options
Diffstat (limited to 'java/awt/image/ComponentColorModel.java')
-rw-r--r-- | java/awt/image/ComponentColorModel.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/java/awt/image/ComponentColorModel.java b/java/awt/image/ComponentColorModel.java index f3f3e374b..2096800b2 100644 --- a/java/awt/image/ComponentColorModel.java +++ b/java/awt/image/ComponentColorModel.java @@ -306,17 +306,16 @@ public class ComponentColorModel extends ColorModel public ColorModel coerceData(WritableRaster raster, boolean isAlphaPremultiplied) { - if (this.isAlphaPremultiplied == isAlphaPremultiplied) + if (this.isAlphaPremultiplied == isAlphaPremultiplied || !hasAlpha()) return this; /* TODO: provide better implementation based on the assumptions we can make due to the specific type of the color model. */ - super.coerceData(raster, isAlphaPremultiplied); + super.coerceDataWorker(raster, isAlphaPremultiplied); - return new ComponentColorModel(cspace, bits, hasAlpha(), - isAlphaPremultiplied, // argument - transparency, transferType); + return new ComponentColorModel(cspace, hasAlpha, isAlphaPremultiplied, + transparency, transferType); } public boolean isCompatibleRaster(Raster raster) |