Skip to content

Add cross-platform printing API (com.codename1.printing)#5217

Open
shai-almog wants to merge 2 commits into
masterfrom
printing-api
Open

Add cross-platform printing API (com.codename1.printing)#5217
shai-almog wants to merge 2 commits into
masterfrom
printing-api

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Summary

New cross-platform printing API that hands a document (PDF or image file in FileSystemStorage) to the platform printing system, typically through the native print dialog.

if (Printer.isPrintingSupported()) {
    Printer.printPDF(reportPath, result -> {
        if (result.isFailed()) {
            ToastBar.showErrorMessage("Print failed: " + result.getError());
        }
    });
}

Corecom.codename1.printing: Printer static facade (print(filePath, mimeType, listener), printPDF, printImage which encodes to a temp PNG), immutable PrintResult (COMPLETED / CANCELLED / FAILED factories, mirroring ShareResult), PrintResultListener (invoked exactly once, on the EDT). Plumbed through Display.print(...) (EDT-wrapping, same pattern as share) with overridable defaults in CodenameOneImplementation.

COMPLETED means "handed to the printing system"; platforms that can't observe the native dialog's outcome report it best-effort, documented per method.

Port implementations

Port Mechanism
JavaSE Images via PrinterJob + native dialog (real cancel detection, aspect-fit); PDFs via Desktop.print with a javax.print PDF-flavor fallback
Android android.print.PrintManager: PDFs through a streaming PrintDocumentAdapter, images through support-v4 PrintHelper; job outcome via PrintJob state polling; all API-19+ types isolated in a @TargetApi(19) inner class
iOS UIPrintInteractionController via the IOSNative bridge, following the socialShareWithCallback callback-id pattern; iPad presents from a rect
JavaScript Blob object URL (reusing openFileAsBlob/BlobUtil) + hidden iframe + contentWindow.print(), afterprint + fallback completion
Windows New cn1_windows_print.cpp: PrintDlgW on the pump thread (same SendMessage handover as the file dialog, WM_APP+23), images via the shared WIC decoder + GDI StretchDIBits, PDFs via raw-ABI Windows.Data.Pdf page rendering at printer DPI — no STL, no new link libraries

Also adds Samples/samples/PrinterSample (prints a generated image and a downloaded PDF).

Verification

  • mvn compile clean for core, javase, android, ios and windows modules; JS port compiles via the same javac step its build script uses; sample compiles against core.
  • Windows: CleanTargetIntegrationTest#crossCompilesWindowsExeWithXwin passes on this branch — full translate + clang-cl compile + lld-link of a Form app including the print code into a Windows PE (x64), against the current master port (no WM_APP message collision with the new file picker). cn1_windows_print.cpp is also registered in the per-file clang-cl compile check.
  • JavaSE path tested interactively in the simulator via PrinterSample (native macOS print dialog, image print + cancel reporting).

Not yet runtime-tested

iOS (ObjC mirrors the share pattern; needs a device build), Android dialog flow, Windows dialog→spool/PDF rendering on real hardware, and browser printing. PrinterSample is the quickest smoke test on each.

🤖 Generated with Claude Code

Printer/PrintResult/PrintResultListener with Display plumbing and
implementations in all ports: JavaSE (PrinterJob/Desktop.print),
Android (android.print + PrintHelper), iOS (UIPrintInteractionController),
JavaScript (blob URL + hidden iframe), Windows (PrintDlg + GDI with
Windows.Data.Pdf page rendering). Includes PrinterSample.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • Tests: 388 total, 0 failed, 12 skipped

Benchmark Results

  • Execution Time: 20782 ms

  • Hotspots (Top 20 sampled methods):

    • 25.49% java.lang.String.indexOf (595 samples)
    • 20.48% com.codename1.tools.translator.Parser.isMethodUsed (478 samples)
    • 5.74% java.util.ArrayList.indexOf (134 samples)
    • 5.57% com.codename1.tools.translator.BytecodeMethod.addToConstantPool (130 samples)
    • 5.48% com.codename1.tools.translator.Parser.addToConstantPool (128 samples)
    • 3.21% com.codename1.tools.translator.ByteCodeClass.calcUsedByNative (75 samples)
    • 2.10% com.codename1.tools.translator.ByteCodeClass.updateAllDependencies (49 samples)
    • 1.97% com.codename1.tools.translator.BytecodeMethod.appendMethodSignatureSuffixFromDesc (46 samples)
    • 1.71% org.objectweb.asm.ClassReader.readCode (40 samples)
    • 1.59% com.codename1.tools.translator.ByteCodeClass.markDependent (37 samples)
    • 1.37% java.lang.StringBuilder.append (32 samples)
    • 1.03% com.codename1.tools.translator.bytecodes.Invoke.addDependencies (24 samples)
    • 0.99% com.codename1.tools.translator.Parser.getClassByName (23 samples)
    • 0.99% com.codename1.tools.translator.Parser.generateClassAndMethodIndexHeader (23 samples)
    • 0.81% com.codename1.tools.translator.BytecodeMethod.optimize (19 samples)
    • 0.77% java.lang.Object.hashCode (18 samples)
    • 0.77% com.codename1.tools.translator.BytecodeMethod.addInstruction (18 samples)
    • 0.69% java.util.TreeMap.getEntry (16 samples)
    • 0.69% java.lang.System.identityHashCode (16 samples)
    • 0.69% com.codename1.tools.translator.BytecodeMethod.appendCMethodPrefix (16 samples)
  • ⚠️ Coverage report not generated.

Static Analysis

  • ✅ SpotBugs: no findings (report was not generated by the build).
  • ⚠️ PMD report not generated.
  • ⚠️ Checkstyle report not generated.

Generated automatically by the PR CI workflow.

@shai-almog

shai-almog commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 11 screenshots: 11 matched.
✅ JavaSE simulator integration screenshots matched stored baselines.

@shai-almog

shai-almog commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 128 screenshots: 128 matched.

Native Android coverage

  • 📊 Line coverage: 14.22% (8645/60799 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 11.51% (42600/370069), branch 5.06% (1762/34801), complexity 6.05% (2018/33356), method 10.47% (1633/15593), class 17.14% (377/2200)
    • 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: 14.22% (8645/60799 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 11.51% (42600/370069), branch 5.06% (1762/34801), complexity 6.05% (2018/33356), method 10.47% (1633/15593), class 17.14% (377/2200)
    • 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
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 241ms / native 137ms = 1.7x speedup
SIMD float-mul (64K x300) java 163ms / native 126ms = 1.2x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 184.000 ms
Base64 CN1 decode 576.000 ms
Base64 native encode 672.000 ms
Base64 encode ratio (CN1/native) 0.274x (72.6% faster)
Base64 native decode 1177.000 ms
Base64 decode ratio (CN1/native) 0.489x (51.1% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 125 screenshots: 125 matched.
Native Windows port (x64 / Intel-AMD): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, SSE2 SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 82ms / native 5ms = 16.4x speedup
SIMD float-mul (64K x300) java 73ms / native 4ms = 18.2x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 298.000 ms
Base64 CN1 decode 175.000 ms
Base64 SIMD encode 130.000 ms
Base64 encode ratio (SIMD/CN1) 0.436x (56.4% faster)
Base64 SIMD decode 132.000 ms
Base64 decode ratio (SIMD/CN1) 0.754x (24.6% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 34.000 ms
Image createMask (SIMD on) 13.000 ms
Image createMask ratio (SIMD on/off) 0.382x (61.8% faster)
Image applyMask (SIMD off) 52.000 ms
Image applyMask (SIMD on) 26.000 ms
Image applyMask ratio (SIMD on/off) 0.500x (50.0% faster)
Image modifyAlpha (SIMD off) 53.000 ms
Image modifyAlpha (SIMD on) 19.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.358x (64.2% faster)
Image modifyAlpha removeColor (SIMD off) 58.000 ms
Image modifyAlpha removeColor (SIMD on) 22.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.379x (62.1% faster)

@shai-almog

shai-almog commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 125 screenshots: 125 matched.
Native Windows port, REAL shipping pipeline: the hellocodenameone screenshot suite rendered by a binary CROSS-COMPILED on Linux (clang-cl + xwin, WebView2 linked) and RUN on a Windows x64 runner. Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 70ms / native 5ms = 14.0x speedup
SIMD float-mul (64K x300) java 72ms / native 5ms = 14.4x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 276.000 ms
Base64 CN1 decode 323.000 ms
Base64 SIMD encode 143.000 ms
Base64 encode ratio (SIMD/CN1) 0.518x (48.2% faster)
Base64 SIMD decode 132.000 ms
Base64 decode ratio (SIMD/CN1) 0.409x (59.1% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 36.000 ms
Image createMask (SIMD on) 14.000 ms
Image createMask ratio (SIMD on/off) 0.389x (61.1% faster)
Image applyMask (SIMD off) 58.000 ms
Image applyMask (SIMD on) 30.000 ms
Image applyMask ratio (SIMD on/off) 0.517x (48.3% faster)
Image modifyAlpha (SIMD off) 61.000 ms
Image modifyAlpha (SIMD on) 21.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.344x (65.6% faster)
Image modifyAlpha removeColor (SIMD off) 72.000 ms
Image modifyAlpha removeColor (SIMD on) 23.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.319x (68.1% faster)

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

Native Windows port (arm64)

Compared 125 screenshots: 124 matched, 1 updated.

  • graphics-draw-arc — updated screenshot. Screenshot differs (784x561 px, bit depth 8).

    graphics-draw-arc
    Preview info: JPEG preview quality 60; JPEG preview quality 60.
    Full-resolution PNG saved as graphics-draw-arc.png in workflow artifacts.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 62ms / native 3ms = 20.6x speedup
SIMD float-mul (64K x300) java 60ms / native 3ms = 20.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 599.000 ms
Base64 CN1 decode 236.000 ms
Base64 SIMD encode 105.000 ms
Base64 encode ratio (SIMD/CN1) 0.175x (82.5% faster)
Base64 SIMD decode 133.000 ms
Base64 decode ratio (SIMD/CN1) 0.564x (43.6% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 24.000 ms
Image createMask (SIMD on) 8.000 ms
Image createMask ratio (SIMD on/off) 0.333x (66.7% faster)
Image applyMask (SIMD off) 38.000 ms
Image applyMask (SIMD on) 16.000 ms
Image applyMask ratio (SIMD on/off) 0.421x (57.9% faster)
Image modifyAlpha (SIMD off) 38.000 ms
Image modifyAlpha (SIMD on) 12.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.316x (68.4% faster)
Image modifyAlpha removeColor (SIMD off) 40.000 ms
Image modifyAlpha removeColor (SIMD on) 11.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.275x (72.5% faster)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@shai-almog

shai-almog commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 128 screenshots: 128 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

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

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 83ms / native 13ms = 6.3x speedup
SIMD float-mul (64K x300) java 49ms / native 2ms = 24.5x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 259.000 ms
Base64 CN1 decode 183.000 ms
Base64 native encode 485.000 ms
Base64 encode ratio (CN1/native) 0.534x (46.6% faster)
Base64 native decode 256.000 ms
Base64 decode ratio (CN1/native) 0.715x (28.5% faster)
Base64 SIMD encode 50.000 ms
Base64 encode ratio (SIMD/CN1) 0.193x (80.7% faster)
Base64 SIMD decode 43.000 ms
Base64 decode ratio (SIMD/CN1) 0.235x (76.5% faster)
Base64 encode ratio (SIMD/native) 0.103x (89.7% faster)
Base64 decode ratio (SIMD/native) 0.168x (83.2% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 17.000 ms
Image createMask (SIMD on) 1.000 ms
Image createMask ratio (SIMD on/off) 0.059x (94.1% faster)
Image applyMask (SIMD off) 58.000 ms
Image applyMask (SIMD on) 50.000 ms
Image applyMask ratio (SIMD on/off) 0.862x (13.8% faster)
Image modifyAlpha (SIMD off) 63.000 ms
Image modifyAlpha (SIMD on) 35.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.556x (44.4% faster)
Image modifyAlpha removeColor (SIMD off) 67.000 ms
Image modifyAlpha removeColor (SIMD on) 44.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.657x (34.3% faster)

@shai-almog

shai-almog commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 102000 ms
Simulator Boot (Run) 2000 ms
App Install 15000 ms
App Launch 6000 ms
Test Execution 267000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 83ms / native 4ms = 20.7x speedup
SIMD float-mul (64K x300) java 80ms / native 2ms = 40.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 471.000 ms
Base64 CN1 decode 261.000 ms
Base64 native encode 670.000 ms
Base64 encode ratio (CN1/native) 0.703x (29.7% faster)
Base64 native decode 429.000 ms
Base64 decode ratio (CN1/native) 0.608x (39.2% faster)
Base64 SIMD encode 55.000 ms
Base64 encode ratio (SIMD/CN1) 0.117x (88.3% faster)
Base64 SIMD decode 48.000 ms
Base64 decode ratio (SIMD/CN1) 0.184x (81.6% faster)
Base64 encode ratio (SIMD/native) 0.082x (91.8% faster)
Base64 decode ratio (SIMD/native) 0.112x (88.8% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 27.000 ms
Image createMask (SIMD on) 4.000 ms
Image createMask ratio (SIMD on/off) 0.148x (85.2% faster)
Image applyMask (SIMD off) 67.000 ms
Image applyMask (SIMD on) 35.000 ms
Image applyMask ratio (SIMD on/off) 0.522x (47.8% faster)
Image modifyAlpha (SIMD off) 69.000 ms
Image modifyAlpha (SIMD on) 41.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.594x (40.6% faster)
Image modifyAlpha removeColor (SIMD off) 56.000 ms
Image modifyAlpha removeColor (SIMD on) 39.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.696x (30.4% faster)

@github-actions

Copy link
Copy Markdown
Contributor

✅ 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

shai-almog commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 71000 ms
Simulator Boot (Run) 1000 ms
App Install 29000 ms
App Launch 37000 ms
Test Execution 373000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 166ms / native 4ms = 41.5x speedup
SIMD float-mul (64K x300) java 97ms / native 5ms = 19.4x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 422.000 ms
Base64 CN1 decode 266.000 ms
Base64 native encode 880.000 ms
Base64 encode ratio (CN1/native) 0.480x (52.0% faster)
Base64 native decode 485.000 ms
Base64 decode ratio (CN1/native) 0.548x (45.2% faster)
Base64 SIMD encode 68.000 ms
Base64 encode ratio (SIMD/CN1) 0.161x (83.9% faster)
Base64 SIMD decode 60.000 ms
Base64 decode ratio (SIMD/CN1) 0.226x (77.4% faster)
Base64 encode ratio (SIMD/native) 0.077x (92.3% faster)
Base64 decode ratio (SIMD/native) 0.124x (87.6% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 21.000 ms
Image createMask (SIMD on) 1.000 ms
Image createMask ratio (SIMD on/off) 0.048x (95.2% faster)
Image applyMask (SIMD off) 82.000 ms
Image applyMask (SIMD on) 35.000 ms
Image applyMask ratio (SIMD on/off) 0.427x (57.3% faster)
Image modifyAlpha (SIMD off) 74.000 ms
Image modifyAlpha (SIMD on) 46.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.622x (37.8% faster)
Image modifyAlpha removeColor (SIMD off) 83.000 ms
Image modifyAlpha removeColor (SIMD on) 34.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.410x (59.0% faster)

@shai-almog

shai-almog commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

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

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