Commit Graph

11 Commits

Author SHA1 Message Date
Ariel Abreu
55bafce1f1
Initial support for Metal layers and drawables
In its current state, I consider this code to be experimental and
unstable. The biggest problem is that there's currently a HUGE memory
leak somewhere (over 2GiB in under 5 seconds at 60fps). I'm committing
what I have now since I don't feel like debugging that right now and it
*does* technically work as-is.

The current approach is not great for performance: first, we render to a Metal/Vulkan
texture in the desired format then blit that to an RGBA Metal/Vulkan
texture shared with
OpenGL. Then, we copy *that* to another OpenGL texture in CAMetalLayer
to use as the content for the layer (we can't keep the drawable's OpenGL
texture, since that has to be recycled). Finally, this is rendered to a
subwindow by CARenderer/CALayerContext. We cannot get rid of the last copy
since we must render to the subwindow somehow and it's the easiest
way to play nice with sublayers. I also don't think we can get rid of the
first copy since OpenGL doesn't support some of Metal/Vulkan's texture
formats; plus, we can't share optimally tiled images between Vulkan and
OpenGL with some vendors' drivers (e.g. AMD).
We *could* get rid of the second copy if we were able to accurately
determine when the content is finally presented; then we could simply
keep the drawable in-use, render it to the subwindow when asked to, and
release it once we know the render is complete.
2023-04-06 10:04:49 -04:00
TheBrokenRail
cda40d9947 Code Formatting Using Patched ClangFormat 2020-05-12 17:04:15 -04:00
Andrew Hyatt
89ca94c60f CAAnimation/CALayer constants
darlinghq/darling#445
2019-01-16 16:36:49 -05:00
Andrew Hyatt
47df1155c9 Missing Core Animation classes/constants
darlinghq/darling#445
2019-01-09 15:39:53 -05:00
Sergey Bugaev
a66dd5efba NSInteger-ization & CGFloat/O2Float-ization
See https://github.com/darlinghq/darling/issues/418
2018-09-02 23:14:39 +03:00
Christopher Lloyd
02a7635f37 CA fixes 2011-01-10 11:50:38 -05:00
Christopher Lloyd
2858245160 CoreAnimation work 2011-01-03 21:45:53 -05:00
Christopher Lloyd
00dea648f8 - attempt at fixing flickering NSOpenGLView on Windows 7
- added opengl32 as a direct dependency
- added CGGradient skeleton
- reorganized some private CA, FreeBSD CGL fixes
2010-05-21 16:44:50 -04:00
Christopher Lloyd
589f709a12 - addresses issue #491 for borderless windows and opaque opengl surface
- Fixes issues in the FreeBSD build
2010-05-17 21:14:13 -04:00
Christopher Lloyd
f397a480c8 some basic QuartzCore work 2010-01-09 21:54:29 +00:00
Christopher Lloyd
898f6839b8 Added non-functional initial QuartzCore project, CALayer header 2009-07-26 14:32:59 +00:00