Search in sources :

Example 1 with PoolFactory

use of com.facebook.imagepipeline.memory.PoolFactory in project gl-react-native by ProjectSeptemberInc.

the class GLCanvasManager method createViewInstance.

@Override
public GLCanvas createViewInstance(ThemedReactContext context) {
    if (executorSupplier == null) {
        PoolFactory poolFactory = new PoolFactory(PoolConfig.newBuilder().build());
        int numCpuBoundThreads = poolFactory.getFlexByteArrayPoolMaxNumThreads();
        executorSupplier = new DefaultExecutorSupplier(numCpuBoundThreads);
    }
    return new GLCanvas(context, executorSupplier);
}
Also used : PoolFactory(com.facebook.imagepipeline.memory.PoolFactory) DefaultExecutorSupplier(com.facebook.imagepipeline.core.DefaultExecutorSupplier)

Aggregations

DefaultExecutorSupplier (com.facebook.imagepipeline.core.DefaultExecutorSupplier)1 PoolFactory (com.facebook.imagepipeline.memory.PoolFactory)1