| 71 | |
| 72 | protected Scene.Perform updater = new Scene.Perform() { |
| 73 | @Override |
| 74 | public boolean perform(int pass) { |
| 75 | |
| 76 | origin.forEach( |
| 77 | // turns out, this is something on the order of 20mb a second of garbage at full framerate. |
| 78 | // origin.find(insideRunLoop, origin.both()) |
| 79 | // .forEach( |
| 80 | y -> { |
| 81 | |
| 82 | Map<String, Supplier<Boolean>> x = y.properties.get(insideRunLoop); |
| 83 | if (x == null || x.size() == 0) return; |
| 84 | |
| 85 | Iterator<Map.Entry<String, Supplier<Boolean>>> r = x.entrySet() |
| 86 | .iterator(); |
| 87 | while (r.hasNext()) { |
| 88 | Map.Entry<String, Supplier<Boolean>> n = r.next(); |
| 89 | try { |
| 90 | if (n.getKey().startsWith("main.") || n.getKey().startsWith("main_")) |
| 91 | try { |
| 92 | Execution.context.get().push(y); |
| 93 | if (!n.getValue() |
| 94 | .get()) r.remove(); |
| 95 | } catch (Throwable t) { |
| 96 | t.printStackTrace(); |
| 97 | } finally { |
| 98 | Execution.context.get().pop(); |
| 99 | } |
| 100 | } catch (Throwable t) { |
| 101 | t.printStackTrace(); |
| 102 | try { |
| 103 | r.remove(); |
| 104 | } catch (Throwable tt) { |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | }); |
| 109 | return true; |
| 110 | } |
| 111 | |
| 112 | @Override |
| 113 | public int[] getPasses() { |
| 114 | return new int[]{10}; |
| 115 | } |
| 116 | }; |