-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Android hardware artifacting fix (#38)
* Add perspective to transform array for Android platform * Add renderToHardwareTextureAndroid prop to fix artifacting on some Android devices * Add missing semicolons * Only assign renderToHardwareTextureAndroid = true while animating * Apply suggestions from code review Co-authored-by: Vincent Catillon <[email protected]> * Remove renderToHardwareTextureAndroid from top level Explosion prop * Remove state based renderToHardwareTextureAndroid enabled Co-authored-by: Vincent Catillon <[email protected]>
- Loading branch information
1 parent
c4c9ac8
commit 2802713
Showing
5 changed files
with
78 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// @flow | ||
|
||
jest.mock('react-native', () => { | ||
const ReactNative = jest.requireActual('react-native'); | ||
const { Platform } = ReactNative; | ||
|
||
jest.spyOn(Platform, 'select'); | ||
const MockPlatform = { | ||
...Platform, | ||
OS: 'ios', | ||
}; | ||
Platform.select.mockImplementation(specifics => { | ||
const { OS } = MockPlatform | ||
if (OS in specifics) { | ||
return specifics[OS]; | ||
} else if ('default' in specifics) { | ||
return specifics.default; | ||
} | ||
return undefined; | ||
}) | ||
|
||
return Object.setPrototypeOf({ | ||
Platform: MockPlatform, | ||
}, ReactNative); | ||
}); | ||
|
||
jest.mock('react-native/Libraries/Animated/src/NativeAnimatedHelper'); |
This file contains 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
This file contains 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
This file contains 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