From: Tuukka Lehtonen Date: Mon, 24 Feb 2020 23:02:32 +0000 (+0200) Subject: Temporarily added debug logging to MipMapBufferedImage for debugging X-Git-Tag: v1.43.0~83^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=7690b901e8c2dca46ae58d574607a616b9913344;p=simantics%2Fplatform.git Temporarily added debug logging to MipMapBufferedImage for debugging gitlab #477 Change-Id: I553d4f7ed99c0b48cf1fe386669ae46d6ca68de2 --- diff --git a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/utils/MipMapBufferedImage.java b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/utils/MipMapBufferedImage.java index d76b9ec05..7e5f09949 100644 --- a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/utils/MipMapBufferedImage.java +++ b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/utils/MipMapBufferedImage.java @@ -23,6 +23,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import com.kitfox.svg.SVGDiagram; /** @@ -35,6 +38,8 @@ import com.kitfox.svg.SVGDiagram; */ public class MipMapBufferedImage extends BufferedImage { + private static final Logger LOGGER = LoggerFactory.getLogger(MipMapBufferedImage.class); + /** Extra margin to the bounds reported by batik */ public static final double MARGIN_PERCENT = 3; @@ -61,6 +66,8 @@ public class MipMapBufferedImage extends BufferedImage { } private void initializeRasters() { + if (LOGGER.isDebugEnabled()) + LOGGER.debug("initializeRasters({}): diagram={}, referenceSize={}, imageBounds={}, maxres={}, minres={}", this.toString(), source, referenceSize, imageBounds, maxResolution(), minResolution()); List resolutions = new ArrayList(); if (referenceSize != null && !imageBounds.isEmpty()) { @@ -94,6 +101,9 @@ public class MipMapBufferedImage extends BufferedImage { } } + if (LOGGER.isDebugEnabled()) + LOGGER.debug("initializeRasters({}): resolutions={}", this.toString(), resolutions); + // arraylist -> array this.resolutions = new double[resolutions.size()]; for (int i=0; i