Skip to content

Commit 64980c5

Browse files
shai-almogclaude
andcommitted
DIAGNOSTIC: log ChartComponent.paint entry every frame
Native logs from 6ef4eb7 ruled out the leaked-mutable-target hypothesis -- chart-line's drawTextureAlphaMaskImpl always reports targetSet=0 (correctly routed to screen). Both chart-line (blank) and chart-pie (working) emit ~70 bg fillRects between their last chart paint and the screenshot, with no chart paints in between. Yet pie shows pie content in the captured PNG and line shows pure bg color. Hypothesis: Form.paint is invoked at ~50fps (the bg fillRect heartbeat) but ChartComponent.paint is being skipped on the chart- line form for some reason -- maybe a dirty-region optimisation that declares the chart "not invalidated", or an isVisible check, or something specific to the chart. Log every ChartComponent.paint call so we can see whether the chart's paint method is being called every frame for chart-pie but not for chart-line. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6ef4eb7 commit 64980c5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

CodenameOne/src/com/codename1/charts/ChartComponent.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ protected Dimension calcPreferredSize() {
275275
/// - `g`
276276
@Override
277277
public void paint(Graphics g) {
278+
System.out.println("CN1SS:DBG:ChartComponent.paint chart=" + chart.getClass().getSimpleName());
278279
super.paint(g);
279280
boolean oldAntialias = g.isAntiAliased();
280281
g.setAntiAliased(true);

0 commit comments

Comments
 (0)