web engine - experimental web browser

Core Graphics rendering surface #5

open opened by pierrelf.com

Set up a Core Graphics bitmap rendering surface in the AppKit window.

Required FFI:

  • CGContext, CGBitmapContext (CGBitmapContextCreate, CGBitmapContextGetData)
  • CGColorSpace (CGColorSpaceCreateDeviceRGB)
  • CGImage (CGBitmapContextCreateImage)

Implementation:

  • Custom NSView subclass overriding drawRect:
  • Create a CGBitmapContext backed by a Rust-owned pixel buffer
  • Draw the CGImage into the view's context in drawRect:
  • Helper to fill the buffer (draw a colored rectangle as proof of life)

Acceptance criteria:

  • Window shows a colored rectangle rendered via CG bitmap
  • Pixel buffer is owned by Rust, CG just displays it

Depends on: AppKit window creation

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:meotu43t6usg4qdwzenk4s2t/sh.tangled.repo.issue/3mfkgz2taab2c