Definition at line 19 of file RuntimeSample.java.
◆ RuntimeSample()
org.skia.jetskidemo.samples.RuntimeSample.RuntimeSample |
( |
Resources |
res, |
|
|
int |
resId |
|
) |
| |
|
inline |
Definition at line 22 of file RuntimeSample.java.
22 {
23 String sksl = "";
24 try {
25 InputStream is = res.openRawResource(resId);
26 byte[]
data =
new byte[is.available()];
27 is.read(data);
28
29 sksl = new String(data);
30 } catch (Exception e) {}
31
32 mShaderBuilder = new RuntimeShaderBuilder(sksl);
33 }
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
◆ render()
void org.skia.jetskidemo.samples.RuntimeSample.render |
( |
Canvas |
canvas, |
|
|
long |
t, |
|
|
float |
left, |
|
|
float |
top, |
|
|
float |
right, |
|
|
float |
bottom |
|
) |
| |
|
inline |
Renders a Sample frame t (ms) into the destination rect [L T R B].
Implements org.skia.jetskidemo.samples.Sample.
Definition at line 35 of file RuntimeSample.java.
35 {
36 mShaderBuilder.setUniform("u_time", ms / 1000.0f)
38 .setUniform("u_h", bottom - top);
39
41
42 canvas.save();
43 canvas.concat(
new Matrix().translate(
left, top));
45 canvas.restore();
46 }
static bool left(const SkPoint &p0, const SkPoint &p1)
static bool right(const SkPoint &p0, const SkPoint &p1)
The documentation for this class was generated from the following file:
- third_party/skia/platform_tools/android/apps/jetskidemo/src/main/java/org/skia/jetskidemo/samples/RuntimeSample.java