Change linear gradient implementation to CAGradientLayer for iOS new arch #2
Closed
SzymczakJ wants to merge 64 commits into
Closed
Change linear gradient implementation to CAGradientLayer for iOS new arch #2SzymczakJ wants to merge 64 commits into
SzymczakJ wants to merge 64 commits into
Conversation
…le/update-changelog
…le/jest-mock Add minimal Jest mock
…le/update-example Simplify and fix GradientTimer (example)
BREAKING CHANGE: Use (existing) default import instead of named import. This also adds JSDoc comments and modernizes imports for better TypeScript 5 support.
…le/rm-named-export Remove named export and improve TS definitions
…le/example75 Update react-native to 0.75.5 (example project)
…le/rn75 Update react-native to 0.75.5
…le/fix-ts-types Fix type declarations for TypeScript 5
This also includes minor improvements to error handling/messages.
…le/fix-colors Fix color conversion on new architecture
…le/clang-format Apply clang-format to objc files
…le/typescript Add typescript dependency and check
…le/codegen-config Add explicit componentProvider iOS codegen config
…le/rm-logs Remove debug NSLog
…atch-1 Add link to rn-gradient.vercel.app to README.md
…le/rm-windows Remove windows implementation and related code
…le/consolidate-platforms Consolidate and combine platform specific code
…le/codegen-ci Run codegen test on CI
…le/update-deps Update dev dependencies
This removes all Flow types, including the flow-bin devDependency.
…le/ts-migration Migrate codebase to TypeScript
This also fixes the color label in AnimatedGradient.
This also aligns .prettierrc.js with RN 0.80+.
…le/update-example Update example app with TS migration and import linting
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrated react-native-linear-gradient's iOS implementation from CPU-rasterized UIGraphicsImageRenderer (which drew a CGImage bitmap and set it as layer.contents) to GPU-composited CAGradientLayer.
Benefits
Notes on memory
Old implementation had to allocate a lot of memory for CG raster data, now when CAGradientLayer handles everything on GPU that cost is gone(now it just needs small data structures for GPU communication). This gives us ~4MiB memory save on each screen sized gradient.