Skip to content

Commit 29659e9

Browse files
authored
Merge branch 'main' into fix/building-from-source
2 parents 66a6a71 + bdb9759 commit 29659e9

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

docs/docs/shaders/language.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ slug: /shaders/overview
88
Skia provides a shading language.
99
You can play with it [here](https://shaders.skia.org/).
1010
The syntax is very similar to GLSL.
11+
If you're already familiar with GLSL, or are looking to convert a GLSL shader to SKSL, you can view a list of their differences [here](https://github.com/google/skia/tree/main/src/sksl#readme).
1112

1213
The first step is to create a shader and compile it using `RuntimeEffect.Make`.
1314

package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ class WindowSurfaceHolder {
8989

9090
// Check for exceptions
9191
if (env->ExceptionCheck()) {
92-
RNSkLogger::logToConsole(
93-
"updateTexImage() failed. The exception above can safely be ignored");
92+
RNSkLogger::logToConsole("updateAndRelease() failed. The exception above "
93+
"can safely be ignored");
9494
env->ExceptionClear();
9595
}
9696
}
@@ -162,4 +162,4 @@ class SkiaOpenGLSurfaceFactory {
162162
}
163163
};
164164

165-
} // namespace RNSkia
165+
} // namespace RNSkia

package/src/external/reanimated/interpolators.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
import type { ExtrapolationType, SharedValue } from "react-native-reanimated";
2-
import { useMemo } from "react";
1+
import type {
2+
ExtrapolationType,
3+
FrameInfo,
4+
SharedValue,
5+
} from "react-native-reanimated";
6+
import { useMemo, useRef } from "react";
37

48
import type { SkPath, SkPoint } from "../../skia/types";
59
import { interpolatePaths, interpolateVector } from "../../animation";
@@ -19,9 +23,11 @@ export const notifyChange = (value: SharedValue<unknown>) => {
1923

2024
export const useClock = () => {
2125
const clock = useSharedValue(0);
22-
useFrameCallback((info) => {
26+
const callback = useRef((info: FrameInfo) => {
27+
"worklet";
2328
clock.value = info.timeSinceFirstFrame;
24-
});
29+
}).current;
30+
useFrameCallback(callback);
2531
return clock;
2632
};
2733

0 commit comments

Comments
 (0)