Bug 2019111 Comment 1 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

It's probably not this, but it does come to mind:

https://searchfox.org/firefox-main/rev/1f43fe5ffadde0b6898daf607cabb3335dd75d6f/dom/webgpu/CanvasContext.cpp#429-444
```cpp
// Clear alpha channel to 0xFF / 1.0 for opaque contexts.
// https://www.w3.org/TR/webgpu/#abstract-opdef-get-a-copy-of-the-image-contents-of-a-context
if (isOpaque) {
  gfx::DataSourceSurface::ScopedMap map(snapshot,
                                        gfx::DataSourceSurface::WRITE);
  if (!map.IsMapped()) {
    return nullptr;
  }

  for (int32_t y = 0; y < snapshot->GetSize().height; y++) {
    for (int32_t x = 0; x < snapshot->GetSize().width; x++) {
      uint8_t* const pixel = map.GetData() + y * map.GetStride() + x * 4;
      pixel[3] = 0xFF;
    }
  }
}
```
It's probably not this, but it does come to mind:

https://searchfox.org/firefox-main/rev/1f43fe5ffadde0b6898daf607cabb3335dd75d6f/dom/webgpu/CanvasContext.cpp#429-444
```cpp
// Clear alpha channel to 0xFF / 1.0 for opaque contexts.
// https://www.w3.org/TR/webgpu/#abstract-opdef-get-a-copy-of-the-image-contents-of-a-context
if (isOpaque) {
  gfx::DataSourceSurface::ScopedMap map(snapshot,
                                        gfx::DataSourceSurface::WRITE);
  if (!map.IsMapped()) {
    return nullptr;
  }

  for (int32_t y = 0; y < snapshot->GetSize().height; y++) {
    for (int32_t x = 0; x < snapshot->GetSize().width; x++) {
      uint8_t* const pixel = map.GetData() + y * map.GetStride() + x * 4;
      pixel[3] = 0xFF;
    }
  }
}
```

*blurgh*

Back to Bug 2019111 Comment 1