summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/MapRendererRunnable.java
blob: 28246fe578dede70c554700fd72b1709bab3b949 (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
package com.mapbox.mapboxsdk.maps.renderer;

/**
 * Peer class for {@link Runnable}s to be scheduled on the {@link MapRenderer} thread.
 * The actual work is performed in the native peer.
 */
class MapRendererRunnable implements Runnable {

  // Holds the pointer to the native peer after initialisation
  private final long nativePtr;

  /**
   * Constructed from the native peer constructor
   *
   * @param nativePtr the native peer's memory address
   */
  MapRendererRunnable(long nativePtr) {
    this.nativePtr = nativePtr;
  }

  @Override
  public native void run();

  @Override
  protected native void finalize() throws Throwable;

  private native void nativeInitialize();

}