diff options
author | Sven Gothel <sgothel@jausoft.com> | 2023-04-13 05:39:57 +0200 |
---|---|---|
committer | Sven Gothel <sgothel@jausoft.com> | 2023-04-13 05:39:57 +0200 |
commit | a832ea9863f4479085c46eb43f5c79c50b0dc518 (patch) | |
tree | c8aa09143be22713dac985867cb3b225c31b2f9e /src/graphui/classes/com/jogamp/graph/ui | |
parent | 05d1b20c611bbc15134790235f2cfb2a323c3198 (diff) |
GraphUI Group: Avoid additional shapes-loop w/o layouter
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/Group.java | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Group.java b/src/graphui/classes/com/jogamp/graph/ui/Group.java index e349b1302..e831676ed 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/Group.java +++ b/src/graphui/classes/com/jogamp/graph/ui/Group.java @@ -207,23 +207,28 @@ public class Group extends Shape implements Container { protected void validateImpl(final GLProfile glp, final GL2ES2 gl) { if( isShapeDirty() ) { final PMVMatrix pmv = new PMVMatrix(); - final AABBox tmpBox = new AABBox(); - for(final Shape s : shapes) { - if( null != gl ) { - s.validate(gl); - } else { - s.validate(glp); - } - } if( null != layouter ) { + for(final Shape s : shapes) { + if( null != gl ) { + s.validate(gl); + } else { + s.validate(glp); + } + } layouter.layout(this, box, pmv); } else { + final AABBox tsbox = new AABBox(); for(final Shape s : shapes) { + if( null != gl ) { + s.validate(gl); + } else { + s.validate(glp); + } pmv.glPushMatrix(); s.setTransform(pmv); - s.getBounds().transformMv(pmv, tmpBox); + s.getBounds().transformMv(pmv, tsbox); pmv.glPopMatrix(); - box.resize(tmpBox); + box.resize(tsbox); } } } |