-
-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* avm2: Implement `BitmapData.draw` for `wgpu` backend This method requires us to have the ability to render directly to a texture. Fortunately, the `wgpu` backend already supports this in the form of `TextureTarget`. However, the rendering code required some refactoring in order to avoid creating duplicate `wgpu` resources. The current implementation blocks on copying the pixels back from the GPU to the CPU, so that we can immediately set them in the Ruffle `BitmapData`. This is likely very inefficient, but will work for a first implementation. In the future, we could explore allowing the CPU image data and GPU texture to be out of sync, and only synchronized when explicitly necessary (e.g. on `getPixel` or `setPixel` calls). * Rename `with_offscreen_backend` to `render_offscreen` and use Bitmap * Don't panic when backend doesn't implement `render_offscreen`
- Loading branch information
Showing
31 changed files
with
751 additions
and
116 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.