Commit Graph

35 Commits

Author SHA1 Message Date
luigi-rosso
f17eb06604 Multi backend viewer
Re-works viewer to use GL, Metal, and optionally in the future D3D. Also introduces a new renderer and allows the viewer to be compiled with either Skia or the new example Tess renderer (with either GL or Metal).

I want to re-work the dependency building to be more similar to what Mike did with the third_party directory in a separate PR. It's pretty similar to what's been done here, but generalized at the top level which I think is nice and more re-usable. Also removes the need for some of my path building shell scripts...

There's a new README.md in the viewer directory with some details.

```
cd packages/runtime/viewer/build/macosx
```

Build and run with a Metal backed Skia Renderer:
```
./build_viewer.sh metal skia run
```

Build and run with a GL backed Skia Renderer:
```
./build_viewer.sh gl skia run
```

Build and run with a Metal backed Tess Renderer:
```
./build_viewer.sh metal tess run
```

... and so on

You can also clean directly from the same command:
```
./build_viewer.sh metal tess run clean
```

Diffs=
86d5b0924 Cleanup skia build
83506229a Fix skia dir.
7d4a3bdcf Remove tess to simplify PR.
14346ad9e Nuke old viewer
fba2696cf See clang-format after update
15b8fd753 Remove mat4 test from main rive project
69a2ce9ad Render font cleanup
abd8fa89b Missed files.
e690870a4 Move shader.h and remove formatting for generated files.
afc437b17 Tweaks for failed tests.
2f9a936fc Moving mat4 to tess renderer.
27a3606d6 Cleanup
a4034ff0f Adding viewer readme
bebcd8abe Adding text viewers.
5a1da4ed2 Getting image rendering working in with tess
2c81fee81 Silence deprecation warning.
52f410dfc Getting mesh rendering working.
8de842c7f Starting to use sokol to render meshes. Adding Mat4 class.
dbd5c79b5 Updating clang format for objc
ca0ea9d84 Getting image content working too and fixing contention with sokol
79405a77d Starting to add handle draw support.
8b9f14a16 Adding gl renderer for skia.
af23274ae Adding support for rendering Skia with Metal.
92139ce08 Adding tess renderer.
dc3e1b49b Adding dependencies at top level
22fa8e6ce Updating build scripts
b5cb990aa Merging with latest master.
d08ac18e2 Reorg
a828e92da Updating project json
086890736 Cleanup unused glfw and gl3w for new viewer
55161f36c Using sokol.
72b62b563 Separating GL and TessRenderer.
611b991b6 Adding limits import to fix compilation on all platforms.
820ab8e2f Missed build files.
0964b4416 Stubbing out a generalized viewer and alternate renderer.
2022-07-16 04:21:44 +00:00
csmartdalton
4d41d33e3b clang-format the universe
find . -name '*.c' -o -name '*.cpp' -o -name '*.cc'-o \
       -name '*.h' -o -name '*.hpp' \
  | xargs clang-format --style=file -i

Diffs=
c885b0ffd clang-format the universe
2022-07-08 17:01:01 +00:00
Michael Reed
9e6a9a3a45 Simplify Vec2D 2022-05-24 12:06:27 -04:00
Michael Reed
baa6f40bc7 Simplify vec2d uses 2022-05-24 08:32:32 -04:00
Michael Reed
21639eeade Start to enable int-warnings 2022-05-19 14:14:12 -04:00
Michael Reed
b584e04fe3 Mark local helpers as static 2022-05-19 10:16:11 -04:00
Mike Reed
cc4afb316e Revert "Revert "Move externs into Factory""
This reverts commit df3ebfc5de.
2022-04-25 20:58:36 -04:00
Mike Reed
df3ebfc5de Revert "Move externs into Factory"
This reverts commit c609527519.
2022-04-25 20:19:18 -04:00
Mike Reed
c609527519 Move externs into Factory 2022-04-25 20:04:27 -04:00
Chris Dalton
5157aa292c Bump .clang-format to 100 columns 2022-03-28 13:11:18 -06:00
Mike Reed
ca8b76500e Refactor Mat2D 2022-02-21 12:20:25 -05:00
Mike Reed
7978ad6c33 Inline trivial Vec2D methods (for readability and efficiency) 2022-02-19 21:22:48 -05:00
Mike Reed
e60d5ab532 apply new format 2022-02-17 07:09:03 -05:00
Mike Reed
ea01b85195 Convert tags to spaces 2022-02-10 10:01:57 -05:00
JCash
bfb1690744 cleanup 2021-08-31 16:14:33 -07:00
JCash
4f9f274edb M_PI fix 2021-08-31 16:14:33 -07:00
JCash
4ea9609318 COmpile fix for missing M_PI on windows 2021-08-31 16:14:33 -07:00
JCash
d1af34bec2 Moved header files, updated cpp files 2021-08-09 13:23:13 -07:00
matt Sullivan
9cb87d8de7 Tweaks to remove iOS compliation warnings 2021-04-29 14:59:43 -07:00
Luigi Rosso
39b82b7c1a Issue final lineTo to close. 2021-04-15 14:34:00 -07:00
Maxwell Talbot
7577532c3b clamp suparts between 0 & 1 2021-03-31 12:47:47 -07:00
Luigi Rosso
d8eaab5991 Fixing trim paths when parent transform changes. Optimize out 0 length trim paths. 2021-01-20 15:32:10 -08:00
Luigi Rosso
93e2993af8 Fixing bug when re-computing length of trim paths and only updating render opacity when necessary. 2021-01-20 14:36:21 -08:00
Luigi Rosso
c68401372b Merge branch 'master' into conversion_warnings 2020-10-02 15:22:23 -07:00
Luigi Rosso
970cc545d3 Fixing up trim paths. 2020-10-01 19:46:45 -07:00
Matt Sullivan
99cc86bdd1 Explicit conversions to make Clang happy 2020-09-30 19:00:28 -07:00
Luigi Rosso
22999064fe Implementing recursive cubic segmenting for path measuring. 2020-09-10 14:53:33 -07:00
Luigi Rosso
998c49189b Getting cubic trimming to work. 2020-09-04 18:34:11 -07:00
Matt Sullivan
6b854153c9 fixing assert attmept 2 2020-09-03 23:26:32 -07:00
Matt Sullivan
019c0f0c50 Added assert import 2020-09-03 22:49:41 -07:00
Luigi Rosso
05ca2a495a Improving trim paths for line segments (cubics next!) 2020-09-03 18:33:40 -07:00
Luigi Rosso
f4d7f30e82 Abstracting command path. 2020-09-03 15:35:00 -07:00
Luigi Rosso
d3eef82d33 abstracting trim path logic 2020-09-03 15:35:00 -07:00
Luigi Rosso
34372c4288 Starting to add trimming logic. 2020-09-03 15:35:00 -07:00
Luigi Rosso
0ad5520801 Adding metrics path in prep for trim paths. 2020-09-03 15:35:00 -07:00