Skip to content

Commit

Permalink
Merge branch 'main' into minor-refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon authored Nov 20, 2024
2 parents 8afeef3 + ad6e7d0 commit 128dd23
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
22 changes: 12 additions & 10 deletions apps/paper/src/Examples/Breathe/Breathe.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useMemo } from "react";
import { StyleSheet, useWindowDimensions } from "react-native";
import { StyleSheet, useWindowDimensions, View } from "react-native";
import {
BlurMask,
vec,
Expand Down Expand Up @@ -67,15 +67,17 @@ export const Breathe = () => {
);

return (
<Canvas style={styles.container}>
<Fill color="rgb(36,43,56)" />
<Group origin={center} transform={transform} blendMode="screen">
<BlurMask style="solid" blur={40} />
{new Array(6).fill(0).map((_, index) => {
return <Ring key={index} index={index} progress={progress} />;
})}
</Group>
</Canvas>
<View style={{ flex: 1 }}>
<Canvas style={styles.container}>
<Fill color="rgb(36,43,56)" />
<Group origin={center} transform={transform} blendMode="screen">
<BlurMask style="solid" blur={40} />
{new Array(6).fill(0).map((_, index) => {
return <Ring key={index} index={index} progress={progress} />;
})}
</Group>
</Canvas>
</View>
);
};

Expand Down
3 changes: 3 additions & 0 deletions packages/skia/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
// usage growing very fast in the simulator without this.
@autoreleasepool {
auto surface = _ctx->getSurface();
if (!surface) {
return false;
}
auto canvas = surface->getCanvas();
cb(canvas);
_ctx->present();
Expand Down

0 comments on commit 128dd23

Please sign in to comment.