Skip to content

[GTK4] Draw plain Composite backgrounds as color nodes - #3693

Merged
akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:gtk4-color-node-background
Oct 7, 2026
Merged

akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:gtk4-color-node-background

Conversation

@akurtakov

Copy link
Copy Markdown
Member

Redrawing a control runs the snapshot of all its ancestors again, and Composite.snapshotBackground() appended a new Cairo node of its full size for each of them, the Shell included. Cairo nodes are not diffed, so every redraw damaged the whole window, and the renderer rasterized and uploaded all of it again. This made scrolling in StyledText slow.

Append a color node for a background color, which is diffed by value. Background images still use Cairo.

See #3583

Assisted-by: Anthropic Claude Code (claude-opus-5-5)

Redrawing a control runs the snapshot of all its ancestors again, and
Composite.snapshotBackground() appended a new Cairo node of its full
size for each of them, the Shell included. Cairo nodes are not diffed,
so every redraw damaged the whole window, and the renderer rasterized
and uploaded all of it again. This made scrolling in StyledText slow.

Append a color node for a background color, which is diffed by value.
Background images still use Cairo.

See eclipse-platform#3583

Assisted-by: Anthropic Claude Code (claude-opus-5-5)
@akurtakov
akurtakov requested a balanced review from Copilot October 7, 2026 08:46
@akurtakov akurtakov self-assigned this Oct 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused optimization preserves existing rendering semantics and manages native resources correctly.

Review effort: Balanced
Findings: None

What changed in this PR

Optimizes GTK4 Composite background rendering to prevent full-window redraw damage during scrolling.

Changes:

  • Uses diffable GTK color nodes for solid backgrounds.
  • Retains Cairo rendering for background images.
  • Preserves transparent-region behavior.
File Description
Composite.java Selects optimized GTK4 snapshot rendering based on background type.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (linux)

  115 files  ±0    115 suites  ±0   14m 20s ⏱️ -6s
4 656 tests ±0  4 421 ✅ ±0  235 💤 ±0  0 ❌ ±0 
3 539 runs  ±0  3 450 ✅ ±0   89 💤 ±0  0 ❌ ±0 

Results for commit 395b52c. ± Comparison against base commit 2d0a81a.

@akurtakov
akurtakov merged commit abd6ba3 into eclipse-platform:master Oct 7, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants