summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/CustomLayer.java
blob: f77e7280f02ce211318f980016f4a1bd8a431d80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.mapbox.mapboxsdk.style.layers;

/**
 * Custom layer.
 * <p>
 * Experimental feature. Do not use.
 * </p>
 */
public class CustomLayer extends Layer {

  public CustomLayer(String id,
                     long context,
                     long initializeFunction,
                     long renderFunction,
                     long deinitializeFunction) {
    this(id, context, initializeFunction, renderFunction, 0L, deinitializeFunction);
  }

  public CustomLayer(String id,
                     long context,
                     long initializeFunction,
                     long renderFunction,
                     long contextLostFunction,
                     long deinitializeFunction) {
    initialize(id, initializeFunction, renderFunction, contextLostFunction, deinitializeFunction, context);
  }

  public CustomLayer(long nativePtr) {
    super(nativePtr);
  }

  public void update() {
    nativeUpdate();
  }

  protected native void initialize(String id, long initializeFunction, long renderFunction,
                                   long contextLostFunction, long deinitializeFunction,
                                   long context);

  protected native void nativeUpdate();

  @Override
  protected native void finalize() throws Throwable;

}