Skip to content

Commit

Permalink
added dispose of resources
Browse files Browse the repository at this point in the history
  • Loading branch information
bhawesh committed May 10, 2020
1 parent c2729a9 commit e66fa3b
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -551,6 +551,7 @@ public void fillRect(final float x, final float y, final float w, final float h,
Graphics g2 = maskRtTexture.createGraphics();
g2.setTransform(PrismGraphicsManager.getPixelScaleTransform());
g2.drawTexture(maskTexture, 0, 0, nativeMaskImage.getWidth(), nativeMaskImage.getHeight());
maskTexture.dispose();
if(g instanceof MaskTextureGraphics) {
MaskTextureGraphics mg = (MaskTextureGraphics) (g);
mg.drawPixelsMasked(paintRtTexture, maskRtTexture, transformedRect.x, transformedRect.y,
Expand All @@ -574,6 +575,8 @@ public void fillRect(final float x, final float y, final float w, final float h,
PrEffectHelper.render(blend, g, transformedRect.x, transformedRect.y, null);
g.setTransform(tx);
}
paintRtTexture.dispose();
maskRtTexture.dispose();
} else {
g.setPaint(paint);
g.fillRect(x, y, w, h);
Expand Down

0 comments on commit e66fa3b

Please sign in to comment.