e2954821ea
* Take two: Delay reading image back from render backend using `SyncHandle` This allows us to avoid blocking immediately after a `BitmapData.draw` call. Instead, we only attempt to use the `SyncHandle` when performing an operation that requires the CPU-side pixels (e.g. BitmapData.getPixel or BitmapData.setPixel). In the best case, the SWF will never explicitly access the pixels of the target BitmapData, removing the need to ever copy back the render backend image to our BitmapData. If the SWF doesn't require access to the pixels immediately, we can delay copying the pixels until they're actually needed, hopefully allowing the render backend to finish processing the BitmapData.draw operation in the backenground before we need the result. Now that the CPU and GPU pixels can be intentionally out of sync with each other, we need to ensure that we don't accidentally expose 'stale' CPU-side pixels to ActionScript (which needs to remain unaware of our internal laziness). We now use a wrapper type `BitmapDataWrapper` to enforce that the `SyncHandle` is consumed before accessing the underlying `BitmapData. * core: Skip GPU->CPU sync for source and target BitmapData during draw * Introduce DirtyState enum |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |