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

CGDataProvider is, but should not be, an NS/CFData. #1450

Closed
DHowett-MSFT opened this issue Nov 23, 2016 · 1 comment
Closed

CGDataProvider is, but should not be, an NS/CFData. #1450

DHowett-MSFT opened this issue Nov 23, 2016 · 1 comment

Comments

@DHowett-MSFT
Copy link

DHowett-MSFT commented Nov 23, 2016

  • CGDataProviderCopyData returns another CGDataProvider masquerading as a CFData.
  • CGDataProvider is an Objective-C class in an otherwise C framework.
  • CGDataProvider confounds the debugger, which knows it is an NSData (but not really, so it shows 0 bytes)
  • CGDataProvider cannot hash like a normal NSCFData, making it useless for operations requiring hashing.
  • CGDataProvider does not support streams.
  • CGDataProvider doesn't have a CFTypeID since it's not a CFType.
@DHowett-MSFT
Copy link
Author

Adding TODO in the merge from develop into CGD2D; UIPasteboard.mm:397.
No SHA1 to reference right now.

@aballway aballway self-assigned this Dec 13, 2016
aballway added a commit that referenced this issue Dec 21, 2016
Rewrites CGDataProviderRef to subclass from CppBase rather than being NSData. Changes the DWrite classes to (un)register fonts to use CGDataProviderRef directly.

Fixes #1450

* Rewrite CGDataProvider and change DWrite to use it directly

* Thread safety, code reuse, and other feedback

* More cleanup

* Null data or callbacks should return null rather than an empty data provider

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

No branches or pull requests

3 participants