Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NoCopyRendering] Use vm instead of malloc #833

Merged
merged 8 commits into from
Mar 16, 2018
Merged

Conversation

Adlai-Holler
Copy link
Member

@Adlai-Holler Adlai-Holler commented Mar 12, 2018

  • In Pinterest, No-Copy rendering is having no impact except a slight increase in memory warnings.
  • Something's wrong – need to match the native function more closely.
  • Create a custom buffer, instead of NSMutableData.
  • The custom buffer uses mmap and, when an image is created it uses vm_protect to mark the memory as read-only.
  • Behavior copied from CGBitmapContextCreateImage.
  • Could be that this makes it possible for CA to map the image memory into the renderserver.
  • Also tags the memory as a CGImage, for viewing in Instruments.

@Adlai-Holler Adlai-Holler merged commit e6c98d3 into master Mar 16, 2018
@Adlai-Holler Adlai-Holler deleted the AHContextsMmap branch March 16, 2018 22:13
bernieperez pushed a commit to AtomTickets/Texture that referenced this pull request Apr 25, 2018
* [Contexts] Use mmap directly for possible perf gain and to tag the memory as CGImage

* Wrap the mmap in an object

* Go straight to dataprovider

* Tweak it

* Remove wrong comment

* Finish that comment

* Address warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants