Skip to content

WhatsCanvas 0.1.14

Choose a tag to compare

@github-actions github-actions released this 08 Jul 12:22
· 226 commits to master since this release

Symmetric frame API and a documentation clarification that prevents a common "black screen" pitfall.

Breaking (pre-1.0)

  • Removed Canvas::flush(). Drawing is now a symmetric beginFrame() / endFrame() pair.

    Migration — replace every flush with endFrame:

    canvas->beginFrame();
    canvas->drawRect(/* ... */, paint);
    canvas->endFrame();               // was: canvas->flush();
    canvas->readPixelsRGBA(pixels);   // or savePixelsPPM("out.ppm")

    endFrame() renders the recorded commands onto a freshly-cleared framebuffer, makes them readable, and consumes them. Call it exactly once per frame, right before readPixelsRGBA / present.

Changed

  • Documented the offscreen frame lifecycle so the "black readback" pitfall is obvious: calling the frame-ender twice (or beginFrame() after drawing) re-clears the buffer and yields an empty image. Added a Get Started "frame lifecycle" section and a Troubleshooting entry, and clarified the beginFrame / endFrame API doc comments.

No other API changes. The internal renderer-level flush() (implementation detail) is unrelated and unchanged.

See the CHANGELOG.