Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Shader.java
Go to the documentation of this file.
1/*
2 * Copyright 2021 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8package org.skia.jetski;
9
10public class Shader {
11 private long mNativeInstance;
12
13 /**
14 * Releases any resources associated with this Shader.
15 */
16 public void release() {
17 nRelease(mNativeInstance);
18 mNativeInstance = 0;
19 }
20
21 @Override
22 protected void finalize() throws Throwable {
23 release();
24 }
25
26 // package private
27 Shader(long native_instance) {
28 mNativeInstance = native_instance;
29 }
30
31 long getNativeInstance() { return mNativeInstance; }
32
33 private static native void nRelease(long nativeInstance);
34}
Shader(long native_instance)
Definition Shader.java:27