From 0ef5314b05e4a940efc3c31bf4120a8339f22c89 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 29 Aug 2014 23:16:39 -0600 Subject: [PATCH 1/2] Anti-aliasing is a 30x performance hit for me. I'm not sure if anti-aliasing should be on by default given the drastic performance hit. Should it be optional to turn it off? Or off by default? --- src/seesaw/core.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/seesaw/core.clj b/src/seesaw/core.clj index aa1abd33..6a13123c 100644 --- a/src/seesaw/core.clj +++ b/src/seesaw/core.clj @@ -2505,8 +2505,8 @@ (def ^{:private true} paint-property "seesaw-paint") (defn- paint-component-impl [^javax.swing.JComponent this ^java.awt.Graphics2D g] - (let [{:keys [before after super?] :or {super? true}} (get-meta this paint-property)] - (seesaw.graphics/anti-alias g) + (let [{:keys [before after super? anti-alias?] :or {super? true anti-alias? true}} (get-meta this paint-property)] + (when anti-alias? (seesaw.graphics/anti-alias g) (when before (seesaw.graphics/push g (before this g))) ; TODO reflection here can't be eliminated thanks for proxy limitations ; with protected methods From 42c1a4e5d6d137249924e4d5434751aeeb63d3b4 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 15 Oct 2014 13:16:52 -0600 Subject: [PATCH 2/2] Update core.clj --- src/seesaw/core.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/seesaw/core.clj b/src/seesaw/core.clj index 6a13123c..1876f994 100644 --- a/src/seesaw/core.clj +++ b/src/seesaw/core.clj @@ -2506,7 +2506,7 @@ (defn- paint-component-impl [^javax.swing.JComponent this ^java.awt.Graphics2D g] (let [{:keys [before after super? anti-alias?] :or {super? true anti-alias? true}} (get-meta this paint-property)] - (when anti-alias? (seesaw.graphics/anti-alias g) + (when anti-alias? (seesaw.graphics/anti-alias g)) (when before (seesaw.graphics/push g (before this g))) ; TODO reflection here can't be eliminated thanks for proxy limitations ; with protected methods