aboutsummaryrefslogtreecommitdiff
path: root/shadows/framework/src/main/java/org/robolectric/shadows/ShadowNativePathEffect.java
blob: 440eb2642640904fd43f32255f6ea83212c78d87 (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
package org.robolectric.shadows;

import static android.os.Build.VERSION_CODES.O;

import android.graphics.PathEffect;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.nativeruntime.PathEffectNatives;
import org.robolectric.shadows.ShadowNativePathEffect.Picker;

/** Shadow for {@link PathEffect} that is backed by native code */
@Implements(value = PathEffect.class, minSdk = O, shadowPicker = Picker.class)
public class ShadowNativePathEffect {

  @Implementation(minSdk = O)
  protected static void nativeDestructor(long nativePatheffect) {
    PathEffectNatives.nativeDestructor(nativePatheffect);
  }

  /** Shadow picker for {@link PathEffect}. */
  public static final class Picker extends GraphicsShadowPicker<Object> {
    public Picker() {
      super(null, ShadowNativePathEffect.class);
    }
  }
}