Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

<application
android:supportsRtl="false"
android:largeHeap="true"
android:hardwareAccelerated="false"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure I understand correctly, why are we disabling hardware acceleration? The proposal here says:

Displaying images larger than 8k pixels will also require enabling hardware acceleration and a large heap.

@ArekChr ArekChr Apr 3, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@francoisl I made a mistake in the proposal. With enabled hardwareAccelerated together with largeHeap app won't display larger images over 8k pixels.

Here are details of the native error java.lang.RuntimeException: Canvas: trying to draw too large(394141296bytes) bitmap. for test image that have 11k pixels.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks for clarifying.

android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
Expand Down
8 changes: 6 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"react-native-config": "^1.4.5",
"react-native-device-info": "^10.3.0",
"react-native-document-picker": "^8.0.0",
"react-native-fast-image": "^8.6.3",
"react-native-fast-image": "git+https://github.com/Expensify/react-native-fast-image.git#afedf204bfc253d18f08fdcc5356a2bb82f6a87c",
"react-native-gesture-handler": "2.9.0",
"react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#e12768f1542e7982d90f6449798f0d6b7f18f192",
"react-native-haptic-feedback": "^1.13.0",
Expand Down
300 changes: 0 additions & 300 deletions patches/react-native-fast-image+8.6.3.patch

This file was deleted.

1 change: 1 addition & 0 deletions src/components/ImageView/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ class ImageView extends PureComponent {
// due to ImageZoom
shouldShowLoadingIndicator ? styles.opacity0 : styles.opacity1,
]}
disableTransformation
source={{uri: this.props.url}}
isAuthTokenRequired={this.props.isAuthTokenRequired}
resizeMode={Image.resizeMode.contain}
Expand Down