ultralight-ux / Ultralight

Lightweight, high-performance HTML renderer for game and app developers.
https://ultralig.ht
4.66k stars 195 forks source link

Set subrect of view to render with CPU renderer #465

Open manu-udupa opened 1 year ago

manu-udupa commented 1 year ago

Currently there is no way to specify a cropped region of a view to render using the CPU renderer. If you know in advance that the output will be cropped and the rest discarded, the only way as of now is to render the entire view and then copy only the relevant sections of the resulting bitmap which is inefficient. A feature that lets you specify a subrect of the view to render would make the rendering process in these situations more efficient.