From c2518bc40f59704956f6e01550e605795d4da1ab Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Tue, 11 Jan 2022 12:38:32 +0100 Subject: [PATCH] docs: Add documentation for disabling Frame Processors on Expo --- docs/docs/guides/FRAME_PROCESSORS.mdx | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/docs/guides/FRAME_PROCESSORS.mdx b/docs/docs/guides/FRAME_PROCESSORS.mdx index 7c5d4a6..c6cb5d0 100644 --- a/docs/docs/guides/FRAME_PROCESSORS.mdx +++ b/docs/docs/guides/FRAME_PROCESSORS.mdx @@ -210,6 +210,15 @@ The Frame Processor gets called with a `Frame` object, which is a **JSI HostObje The Frame Processor API spawns a secondary JavaScript Runtime which consumes a small amount of extra CPU and RAM. Additionally, compile time increases since Frame Processors are written in native C++. If you're not using Frame Processors at all, you can disable them: + + + #### Android Inside your `gradle.properties` file, add the `disableFrameProcessors` flag: @@ -234,6 +243,31 @@ GCC_PREPROCESSOR_DEFINITIONS = ( Make sure to add this to your Debug-, as well as your Release-configuration. + + + + +Inside your Expo config (`app.json`, `app.config.json` or `app.config.js`), add the `disableFrameProcessors` flag: + +```json +{ + "name": "my app", + "plugins": [ + [ + "react-native-vision-camera", + { + // ... + disableFrameProcessors: true + } + ] + ] +} +``` + + + + +
#### 🚀 Next section: [Zooming](/docs/guides/zooming) (or [creating a Frame Processor Plugin](/docs/guides/frame-processors-plugins-overview))