diff --git a/core/src/processing/core/PGraphicsJava2D.java b/core/src/processing/core/PGraphicsJava2D.java index 9d7f18c575..ec5ddc4105 100644 --- a/core/src/processing/core/PGraphicsJava2D.java +++ b/core/src/processing/core/PGraphicsJava2D.java @@ -1258,7 +1258,7 @@ protected void imageImpl(PImage who, } if (who.modified) { - cash.update(tint, tintColor); + cash.update(who, tint, tintColor); who.modified = false; } @@ -1291,14 +1291,13 @@ protected void imageImpl(PImage who, class ImageCache { - PImage source; boolean tinted; int tintedColor; int tintedPixels[]; // one row of tinted pixels BufferedImage image; public ImageCache(PImage source) { - this.source = source; +// this.source = source; // even if RGB, set the image type to ARGB, because the // image may have an alpha value for its tint(). // int type = BufferedImage.TYPE_INT_ARGB; @@ -1311,7 +1310,7 @@ public ImageCache(PImage source) { * has changed, or the pixels have changed, so should just go through * with the update without further checks. */ - public void update(boolean tint, int tintColor) { + public void update(PImage source, boolean tint, int tintColor) { int bufferType = BufferedImage.TYPE_INT_ARGB; boolean opaque = (tintColor & 0xFF000000) == 0xFF000000; if (source.format == RGB) {