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

Pull out context.CGContext early in UIImage+diff.m #1676

Closed
Saadnajmi opened this issue Jan 21, 2023 · 0 comments
Closed

Pull out context.CGContext early in UIImage+diff.m #1676

Saadnajmi opened this issue Jan 21, 2023 · 0 comments

Comments

@Saadnajmi
Copy link
Collaborator

There's a lot of diffs where I just had to do context.CGContext -> contextRef for cross platform parity.

@ghost ghost added the Needs: Triage 🔍 label Jan 21, 2023
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this issue May 22, 2023
Summary:
This is a small refactor designed to make future merges for React Native macOS easier. It was found while merging React Native 0.71 into React Native macOS.

In React Native macOS, we ifdef iOS  out API's and replace them with macOS APIs, reusing as much code as possible. `CGContext` is a type that is available on both iOS and macOS, but `UIGraphicsImageRendererContext` is not. A simple refactor makes it easier to reuse this code in React Native macOS without affecting iOS :)

Resolves microsoft#1676

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[IOS] [CHANGED] - Pull out CGContext early in UIImage+Diff

Pull Request resolved: facebook#35940

Test Plan: Build should pass.

Reviewed By: matrush

Differential Revision: D42761424

Pulled By: javache

fbshipit-source-id: 5ce79a5e7c60484dd37d0b2c3f58ff0897d662df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant