Skip to content

[Wasm] ColorFiltered broken when running with WasmΒ #159697

@JaffaKetchup

Description

@JaffaKetchup

Steps to reproduce

Open https://demo.fleaflet.dev/tile_builder. Select the menu icon in the top left and verify that it states "Running with WASM". Notice the screen is completely white. Toggle the switch located next to the moon icon to reveal the map.

image

Open https://fleaflet-firebase--no-wasm-6h38zqtu.web.app/tile_builder. Select the menu icon in the top left and verify that it states "Running without WASM". Notice the map appears with an altered color.

image

I tested this with Chrome Dev 133.0.6847.2 & Microsoft Edge 132.0.2957.11. Unable to test on non-Chromium browsers.


The ColorFilter used is:

const ColorFilter.matrix(<double>[
      -1,
      0,
      0,
      0,
      255,
      0,
      -1,
      0,
      0,
      255,
      0,
      0,
      -1,
      0,
      255,
      0,
      0,
      0,
      1,
      0,
    ])

In flutter_map, we wrap this around a TileLayer using a ColorFiltered in the example app. The TileLayer is an OverflowBox > Transform.rotate > Stack > Positioned > AnimatedBuilder > RawImage. I suspect RawImage isn't interacting with the color filter correctly for some reason.

Expected results

Both maps should appear as maps (not white screens).

Actual results

See above.

Code sample

The concerned example page is https://github.com/fleaflet/flutter_map/blob/master/example/lib/pages/tile_builder.dart. This uses https://github.com/fleaflet/flutter_map/blob/master/lib/src/layer/tile_layer/tile_builder.dart and eventually the RawImage is used in https://github.com/fleaflet/flutter_map/blob/master/lib/src/layer/tile_layer/tile.dart.

Screenshots or Video

No response

Logs

No logs in any console.

Flutter Doctor output

Doctor output

image

Metadata

Metadata

Labels

P2Important issues not at the top of the work liste: wasmIssues related to the wasm build of Flutter Web.e: web_skwasmSkwasm rendering backend for webfound in release: 3.24Found to occur in 3.24found in release: 3.27Found to occur in 3.27has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions