Skip to content

Default ios.metal to true and document the renderer#5065

Merged
shai-almog merged 3 commits into
masterfrom
ios-metal-default-on
May 29, 2026
Merged

Default ios.metal to true and document the renderer#5065
shai-almog merged 3 commits into
masterfrom
ios-metal-default-on

Conversation

@shai-almog
Copy link
Copy Markdown
Collaborator

Summary

  • Flips the IPhoneBuilder default for the ios.metal build hint from false to true. New iOS builds now pick the Metal renderer (CAMetalLayer) instead of the deprecated OpenGL ES 2 path (CAEAGLLayer). Existing apps can still opt out with ios.metal=false.
  • The Metal pipeline (Metal ios backend #4799) has been stable on master since the polygon-clip fixes for Clipping region not respected with non-90 degree rotations. #3921 (319c758b, c56e7aab, 1a5b132a, ca35538c, 6b553ff4) and the screenshot golden in scripts/ios/screenshots-metal/graphics-clip-under-rotation.png matches the GL output.
  • Updates the developer guide:
    • New === Metal renderer section in Working-With-iOS.asciidoc explains the default and how to opt out.
    • The existing === Choosing a color space for the Metal renderer section is reworded so it reads as documentation of the default backend rather than an opt-in.
    • The build-hints reference table in Advanced-Topics-Under-The-Hood.asciidoc was missing ios.metal entirely. Adds entries for both ios.metal and ios.metal.colorSpace, with cross-links to the Working-With-iOS detail sections, and appends ios.metal to the "required" build-hint flat list further down.
  • Companion change in BuildDaemon (cloud build server) mirrors the same default flip.

Test plan

  • Build a fresh iOS app with no ios.metal hint: the binary should link with CN1_USE_METAL defined and ship MainWindowMETAL.xib / CodenameOne_METALViewController.xib.
  • Build a fresh iOS app with codename1.arg.ios.metal=false: the binary should fall back to the OpenGL ES 2 path and ship the legacy MainWindow.xib / CodenameOne_GLViewController.xib.
  • Re-run graphics-clip-under-rotation screenshot on the Metal default — should match the existing committed golden.

🤖 Generated with Claude Code

Flips the IPhoneBuilder default for the ios.metal build hint from
false to true so new iOS builds pick the Metal renderer by default.
OpenGL ES is deprecated on iOS and the Metal pipeline (#4799) has
been stable on master since the polygon-clip fixes for #3921. Users
can still opt out with ios.metal=false.

Documents the renderer in the developer guide: a new Metal renderer
section in Working-With-iOS.asciidoc explains the default and the
opt-out, the existing color-space section is reworded to reflect
Metal being the default, and the build-hints reference table in
Advanced-Topics-Under-The-Hood.asciidoc gains entries for ios.metal
and ios.metal.colorSpace (both were missing).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ByteCodeTranslator: 0 findings (no issues)
    • android: 0 findings (no issues)
    • codenameone-maven-plugin: 0 findings (no issues)
    • core-unittests: 0 findings (no issues)
    • ios: 0 findings (no issues)
  • PMD: 0 findings (no issues) [Report archive]
  • Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 28, 2026

Compared 116 screenshots: 116 matched.

Native Android coverage

  • 📊 Line coverage: 12.45% (7217/57972 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 10.15% (36274/357360), branch 4.26% (1443/33836), complexity 5.30% (1723/32486), method 9.26% (1408/15210), class 15.16% (321/2117)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 12.45% (7217/57972 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 10.15% (36274/357360), branch 4.26% (1443/33836), complexity 5.30% (1723/32486), method 9.26% (1408/15210), class 15.16% (321/2117)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 652.000 ms
Base64 CN1 encode 171.000 ms
Base64 encode ratio (CN1/native) 0.262x (73.8% faster)
Base64 native decode 1397.000 ms
Base64 CN1 decode 287.000 ms
Base64 decode ratio (CN1/native) 0.205x (79.5% faster)
Image encode benchmark status skipped (SIMD unsupported)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: No alerts found (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: No grammar matches (report)
  • Image references: No unused images detected (report)

@github-actions
Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 28, 2026

Compared 114 screenshots: 114 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 233 seconds

Build and Run Timing

Metric Duration
Simulator Boot 77000 ms
Simulator Boot (Run) 1000 ms
App Install 11000 ms
App Launch 7000 ms
Test Execution 314000 ms

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 1094.000 ms
Base64 CN1 encode 2555.000 ms
Base64 encode ratio (CN1/native) 2.335x (133.5% slower)
Base64 native decode 619.000 ms
Base64 CN1 decode 1371.000 ms
Base64 decode ratio (CN1/native) 2.215x (121.5% slower)
Base64 SIMD encode 591.000 ms
Base64 encode ratio (SIMD/native) 0.540x (46.0% faster)
Base64 encode ratio (SIMD/CN1) 0.231x (76.9% faster)
Base64 SIMD decode 552.000 ms
Base64 decode ratio (SIMD/native) 0.892x (10.8% faster)
Base64 decode ratio (SIMD/CN1) 0.403x (59.7% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 95.000 ms
Image createMask (SIMD on) 11.000 ms
Image createMask ratio (SIMD on/off) 0.116x (88.4% faster)
Image applyMask (SIMD off) 306.000 ms
Image applyMask (SIMD on) 161.000 ms
Image applyMask ratio (SIMD on/off) 0.526x (47.4% faster)
Image modifyAlpha (SIMD off) 225.000 ms
Image modifyAlpha (SIMD on) 118.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.524x (47.6% faster)
Image modifyAlpha removeColor (SIMD off) 302.000 ms
Image modifyAlpha removeColor (SIMD on) 169.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.560x (44.0% faster)
Image PNG encode (SIMD off) 1566.000 ms
Image PNG encode (SIMD on) 1213.000 ms
Image PNG encode ratio (SIMD on/off) 0.775x (22.5% faster)
Image JPEG encode 619.000 ms

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 28, 2026

Compared 116 screenshots: 116 matched.
✅ Native iOS screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 208 seconds

Build and Run Timing

Metric Duration
Simulator Boot 86000 ms
Simulator Boot (Run) 1000 ms
App Install 11000 ms
App Launch 10000 ms
Test Execution 313000 ms

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 460.000 ms
Base64 CN1 encode 1280.000 ms
Base64 encode ratio (CN1/native) 2.783x (178.3% slower)
Base64 native decode 326.000 ms
Base64 CN1 decode 925.000 ms
Base64 decode ratio (CN1/native) 2.837x (183.7% slower)
Base64 SIMD encode 423.000 ms
Base64 encode ratio (SIMD/native) 0.920x (8.0% faster)
Base64 encode ratio (SIMD/CN1) 0.330x (67.0% faster)
Base64 SIMD decode 392.000 ms
Base64 decode ratio (SIMD/native) 1.202x (20.2% slower)
Base64 decode ratio (SIMD/CN1) 0.424x (57.6% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 57.000 ms
Image createMask (SIMD on) 10.000 ms
Image createMask ratio (SIMD on/off) 0.175x (82.5% faster)
Image applyMask (SIMD off) 129.000 ms
Image applyMask (SIMD on) 54.000 ms
Image applyMask ratio (SIMD on/off) 0.419x (58.1% faster)
Image modifyAlpha (SIMD off) 124.000 ms
Image modifyAlpha (SIMD on) 56.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.452x (54.8% faster)
Image modifyAlpha removeColor (SIMD off) 137.000 ms
Image modifyAlpha removeColor (SIMD on) 68.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.496x (50.4% faster)
Image PNG encode (SIMD off) 946.000 ms
Image PNG encode (SIMD on) 801.000 ms
Image PNG encode ratio (SIMD on/off) 0.847x (15.3% faster)
Image JPEG encode 442.000 ms

The build-ios job exists to exercise the legacy OpenGL ES 2 path.
Now that IPhoneBuilder defaults ios.metal to true, that job would
silently start running Metal builds, collapsing both jobs onto the
same backend. Inject ios.metal=false into hellocodenameone's
codenameone_settings.properties before the build, mirroring the
ios.metal=true override the build-ios-metal job already does.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 28, 2026

Compared 47 screenshots: 47 matched.
✅ JavaScript-port screenshot tests passed.

The Metal screenshot job has been timing out at the 30-min test-step
cap on master (~60% pass over the last 5 master runs, killed at the
CN1SS:SUITE:FINISHED wait). Bump the per-step cap on both the GL and
Metal test runs from 30 to 45, and raise the job-level timeout from
45 to 60 so it still covers the longer test envelope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shai-almog shai-almog merged commit 1f009d9 into master May 29, 2026
24 of 28 checks passed
shai-almog added a commit that referenced this pull request May 29, 2026
…5074)

* Blog: weekly format refresh, Metal default, new Build Cloud console

Adds the May 29 weekly release post that introduces the shorter,
TL;DR-focused weekly format and announces two website-facing changes
the post depends on:

- ios.metal is the default for new iOS builds (PR #5065).
- Every Dashboard link on the website now points at the new
  /console/ UI instead of /secure/. The legacy /secure/ console
  stays online for the time being.

URL updates in this commit:
- docs/website/hugo.toml: developers-menu and top-nav Dashboard URLs.
- docs/website/content/build-server.md: primary URL + legacy fallback.
- docs/website/content/site-map.md: split Dashboard entry into Console
  and Legacy.
- docs/website/layouts/_default/pricing.html: free-tier Sign Up CTA.

Historical blog posts that mention /secure/ are left untouched.

* Intro post: consolidate upcoming attractions to 3 themed follow-ups

Replaces the nine per-PR bullets with three themed bullets so the
release cycle ships fewer, broader posts and does not bleed into
next week's index:

- Developer workflow (Sat): on-device debugging + JUnit.
- Platform APIs in the core (Mon): WiFi + OIDC + WebAuthn + Share
  + AI / LLM / Speech / ChatView.
- Build-time codegen (Wed): annotation framework + router + ORM +
  mapping + binding + Immich baseline + SVG / Lottie transcoders.

Total: four posts (intro + three follow-ups). Back half of the week
intentionally left clear.

* Intro post: style pass + hero image

Edits requested on the PR:

- "I" voice replaced with "we" throughout.
- The "I trailed this" line rephrased in simpler language ("we
  decided to push this back by one week").
- Build-hint snippet uses ios.metal=false, matching what shows up
  in the settings app (not the codename1.arg. prefix).
- The phrase "legacy console" is now the link to the old
  /secure/index.html URL.
- "we want it to retire empty" replaced with a cleaner sentence.
- "Those are historical text..." sentence removed.
- "That keeps this release cycle to four posts..." sentence
  removed from the upcoming-attractions section.
- The grab-bag bullet no longer names the specific Flutter source
  app; the porting exercise is described generically instead.

Also adds the hero image at
static/blog/metal-default-new-build-cloud-and-a-new-format.jpg.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant