Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multithreading (reality layers) #760

Merged
merged 658 commits into from
May 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
658 commits
Select commit Hold shift + click to select a range
7ce64f0
Bugfix webrtc bindings TLS
Apr 27, 2019
2238c2d
Remove dead normalizePrototype.test.js test
Apr 28, 2019
a1688bb
Add top level exokit require exposure option
Apr 28, 2019
9cc1f93
Add mocha timeout in package.json
Apr 28, 2019
a18e74e
Add window vm evalAsync method
Apr 28, 2019
ffc16c4
Exokit core options cleanup
Apr 28, 2019
1c40a2f
Make window destroy async in window vm
Apr 28, 2019
0970818
Major tests refactoring to be async
Apr 28, 2019
9719661
Bump worker-native version
Apr 28, 2019
b8bd56b
Bugfix GLFW DestroyWindowHandle semaphore lockup
Apr 28, 2019
b2a9914
Small webgl tests try-catch cleanup
Apr 28, 2019
6f97772
Bugfix native deps for multithreading
Apr 28, 2019
0a8c64c
Small tests bugfix
Apr 28, 2019
a452c3b
Small MutationObserver test bugfixing
Apr 28, 2019
c84a834
More small MutationObserver tests cleanup
Apr 28, 2019
07a76d6
Bump worker-native version
Apr 28, 2019
b980371
More MutationObserver tests timing debugging
Apr 28, 2019
b06e38a
Small dummy.html test bugfix
Apr 28, 2019
f198c4c
Small WindowVm destroy temporary disable
Apr 28, 2019
6875fb5
Bump worker-native version
Apr 28, 2019
0d14db9
Small ScriptElement test cleanup
Apr 28, 2019
17ec689
Bugfix SrcableElement tests
Apr 28, 2019
5998818
MutationObserver tests timing cleanup
Apr 28, 2019
18a6a3e
Merge branch 'master' into user-parallel
Apr 28, 2019
566e26d
Bugfix GLFW merge
Apr 28, 2019
17a57d3
Small VR.js syntax bugfix
Apr 28, 2019
c94e38d
Small document test bugfix
Apr 28, 2019
56672ff
Add missing xrState devicePixelRatio slot
Apr 28, 2019
22ff3e4
Clean up native window sizing in native-bindings.js
Apr 28, 2019
2f27f5b
Add missing 3d context fbo generation on construct
Apr 28, 2019
9d1e5cf
Small VRDisplay controllers id bugfix
Apr 28, 2019
3855300
Small index.js cleanup
Apr 28, 2019
2b8de23
Small Window.js blitting bugfix
Apr 28, 2019
06d6fd9
Unlock Window.js render loop timeout
Apr 28, 2019
1a939e4
Window.js dead code cleanup
Apr 28, 2019
9b9efb5
Native bindings dead code cleanup
Apr 28, 2019
07cb47a
Make exokit.cpp multithreading-compatible
Apr 29, 2019
15796ac
Bump worker-native version
Apr 29, 2019
7c04ac1
Update bindings to use new native-less worker-native module
Apr 29, 2019
f20fc30
Remove worker-native module dependency
Apr 29, 2019
9184081
Add new WindowBase worker bootstrap source
Apr 29, 2019
9946389
Add WorkerVm in WindowVm
Apr 29, 2019
3be8cba
Remove old worker-native native-bindings module exposure
Apr 29, 2019
1288df2
Use new WorkerVm for window contexts
Apr 29, 2019
723b70b
Bugfix GLFW bootstrap for macOS
Apr 29, 2019
bd2ea8e
Clean up GLFW threaded initialization
Apr 29, 2019
e540168
Bugfix macos GLFW injection threading
Apr 29, 2019
1877d52
Small GLFW cleanup
Apr 29, 2019
533a481
Bufix GetDevicePixelRatio not using queue injection loop
Apr 29, 2019
680bf5b
Merge branch 'master' into user-parallel
Apr 29, 2019
441205f
Bugfix missing xrState metrics
Apr 29, 2019
daf8ba0
Small DOM.js require bugfix
Apr 30, 2019
4324dd6
GLFW build bugfixing
Apr 30, 2019
ff65fb6
Merge branch 'master' into user-parallel
Apr 30, 2019
ef8cdd3
Bugfix requestPresent fake vr display case texture sizing
Apr 30, 2019
1a47c49
Small index.js innerWidth/innerHeight cleanup
Apr 30, 2019
6c99755
Bugfix Window.js not blitting default framebuffer case
Apr 30, 2019
a60dd98
Bugfix browser create window handle flow
Apr 30, 2019
ab9842d
Bugfix missing Window.js double blit in the default rendering case
Apr 30, 2019
2c38afb
Merge branch 'master' into user-parallel
May 1, 2019
c4e99ee
Merge branch 'master' into user-parallel
May 1, 2019
a396352
Move repl management into Window
May 2, 2019
463fdc6
Clean up GLFW wheel event tracking
May 2, 2019
c32d225
Revert "Move repl management into Window"
May 2, 2019
afcc2e9
Bugfix small missing VR.js import
May 3, 2019
21063e0
Small VR.js commenting cleanup
May 3, 2019
cd77c5e
Bugfix VR.js FakeVRDisplay double swapchain bind
May 3, 2019
548cd76
Bugfix gamepads fake VR display mode not called OpenVR Gamepad
May 3, 2019
eb6d0ab
Small examples/fakeDisplay.js renderer size trigger cleanup
May 3, 2019
c19e178
Bugfix windowsystem view matrices multiplication in iframe 2d case
May 3, 2019
31fe053
Bugfix windowsystem iframe 2d flip y
May 3, 2019
f01ca1d
Bugfix windowsystem tpyo
May 3, 2019
0a522d1
Bugfix windowsystem iframe2d render width
May 3, 2019
0bff90d
Add VRDisplay xrOffset support
May 3, 2019
aab2e43
Revert uv flipping for planes composition
May 4, 2019
6dd65b0
Update realitytabs.html URL to https://aframe.io
May 4, 2019
568813a
Small realitytabs.html front of camera open cleanup
May 4, 2019
be6b310
Make HTMLIframeElement d parameter an actual attribute
May 4, 2019
e14ddf5
Merge branch 'master' into user-parallel
May 4, 2019
771dc06
Bugfix missing windowSymbol in symbols.js
May 5, 2019
5a5cb9f
Reality tabs example rig open debugging
May 5, 2019
38f3034
Merge branch 'master' into user-parallel
May 5, 2019
11c2253
Add desynchronized rendering flag support
May 6, 2019
86f40da
Merge pull request #1019 from exokitxr/desynchronized
May 6, 2019
0ff9c59
Bugfix webgl unit test
May 7, 2019
d532112
Add symbols.js symbol names
May 7, 2019
40f3531
Bugfix vrdisplayactivate timing
May 7, 2019
d2c198b
Add index.js renderWidth/renderHeight default
May 7, 2019
b07ef57
Small VR.js onmakeswapchain call bugfix
May 7, 2019
c22c26d
Small VR.js cancel rafs flow cleanup
May 7, 2019
50bd619
Small WindowVm logging cleanup
May 7, 2019
3b5e5f7
Small FakeVRDisplay inheritance cleanup
May 7, 2019
10b32dc
Add FakeVRDisplay session removeEventListener method
May 7, 2019
5fc02ff
Small VR.js requestAnimationFrame debugging
May 7, 2019
8a5487a
Small Window.js reqeuestAnimationFrame null raf cache debugging
May 7, 2019
57c3ec9
Add FakeVRDisplay session cancelAnimationFrame method
May 7, 2019
b1396fc
Add missing Window.js fake vr display raf bindings
May 7, 2019
2450ffb
Move xrState renderWidth/renderHeight setting to window createVRDispl…
May 7, 2019
981933a
Small VR.js cleanup
May 7, 2019
0790ecf
Add hmdType result latching in child window
May 7, 2019
5fab9b8
Layer fbo latching cleanup in Window.js
May 7, 2019
d9e791f
Add initial exit present support
May 7, 2019
fd065eb
Small Window.js dead code cleanup
May 7, 2019
e659db1
Make windowsystem raw canvas compose layers width/height based on fra…
May 7, 2019
7918e6e
Make FakeVRDisplay end method async
May 7, 2019
26e6cd3
Add Worker terminate method. Fixes #798.
May 7, 2019
80d56fc
Unlock WindowVm worker destroy
May 7, 2019
77a1ca1
Dynamically initialize AudioContext async handles
May 7, 2019
c328099
Clean up image context handle tracking
May 8, 2019
ea1ccf8
add trailing slash check and fix for tabs in index.js
chrislatorres May 8, 2019
df373b1
Clean up AudioContext handle scopes
May 8, 2019
b14ef1d
Add AudioContext Destroy on worker exit
May 8, 2019
f65c405
Small commenting cleanup
May 8, 2019
b64d57e
Bugfix missing WindowVm queue destruction
May 8, 2019
f339d39
Bugfix dangling window ticks
May 8, 2019
44e2887
Bugfix requestAnimationFrame test window destroy call
May 8, 2019
9beb94d
Bump native-audio-deps version
May 8, 2019
4c3ce6d
Small AudioContext logging cleanup
May 8, 2019
644900d
Bump native-audio-deps version
May 8, 2019
95ebd31
Bump native-audio-deps version
May 8, 2019
6300b1f
Small Document.js elements tracking cleanup
May 8, 2019
08ce5f5
Bugfix window.top references
May 8, 2019
f90585d
Bump native-audio-deps version
May 8, 2019
e8b2510
Merge pull request #1031 from exokitxr/user-parallel-destroy
May 8, 2019
f40219e
Merge branch 'master' into user-parallel
May 9, 2019
85e567e
oculus mobile float array size fix
ngokevin May 9, 2019
451cbbb
Merge pull request #1037 from ngokevin/floatarray
May 9, 2019
7770f20
Bugfix Window compose layers vr display blit math
May 8, 2019
b33dbbe
Window commenting cleanup
May 8, 2019
7758661
Statically size windowsystem CreateRenderTarget multisample framebuff…
May 9, 2019
f601fdb
Small Window.js dead code cleanup
May 9, 2019
aef72f4
Abstract out windowsystem samples count
May 9, 2019
4490ad2
Small Window.js cleanup
May 9, 2019
932aafa
Bugfix Window.js non-xr blitting
May 9, 2019
32d921d
Small native-bindings.js cleanup
May 9, 2019
93b4385
Bugfix GL non-xr resize
May 9, 2019
8a77d9d
Small commenting cleanup
May 9, 2019
1902ed2
Merge pull request #1033 from exokitxr/user-parallel-blit
May 9, 2019
1e5d213
Merge branch 'master' into user-parallel
May 9, 2019
9fbcd31
Dead code cleanup in native-bindings.js
May 9, 2019
1eb0944
Use new per-thread WebAudioAsync thread tracking
May 9, 2019
a045105
Clean up debug-android script
May 9, 2019
0d07766
Add launch arguments instructions to debug-android script
May 9, 2019
c84a525
Bugfix WebAudioAsync destruction
May 9, 2019
0b654d8
Bugfix WebAudioAsync threadAsync handle destruction
May 9, 2019
6a1ae19
Merge pull request #1040 from exokitxr/user-parallel-audio
May 9, 2019
d904c3d
Move globals deletion to WindowBase
May 10, 2019
7a6e1f8
Merge branch 'master' into user-parallel
May 10, 2019
edaa2c5
Rename CreateVrChildRenderTarget -> CreateVrCompositorRenderTarget
May 10, 2019
6023cbd
Bugfix enter VR/make swapchain on contextless canvas
May 10, 2019
1284c9e
Small index.js commenting cleanup
May 10, 2019
626f0b1
Small native-bindings code cleanup
May 10, 2019
e9cedda
VR.js dead code cleanup
May 10, 2019
729b674
Window.js dead code cleanup
May 10, 2019
4f3c57f
Major context framebuffer type tracking bugfixing
May 10, 2019
c28003d
Small index.js -t option debugging
May 10, 2019
d38c8ff
Merge pull request #1045 from exokitxr/user-parallel-fb
May 10, 2019
204d0b5
Merge branch 'master' into user-parallel
May 10, 2019
9f752e3
Merge branch 'master' into user-parallel
May 10, 2019
a4f5a95
Clean up HTMLCanvasElement clientWidth/clienHeight to not factor in d…
May 10, 2019
d1bd4d1
Add initial location navigation eventing
May 10, 2019
3bb221d
Bugfix onnavigate argument marshalling
May 10, 2019
264a4ea
Clean up GLFW.cc dead code
May 10, 2019
49bf427
Major cleanup in GLFW window event handling
May 10, 2019
0d6d2ae
Merge pull request #1048 from exokitxr/user-parallel-nav
May 10, 2019
f17ccd3
Bugfix oculus render loop xrState position/orientation scribbling
May 11, 2019
e79fc50
Patch oculus mobile functions to be Node 12 compatible
May 15, 2019
3d80595
Patch magic leap functions to be Node 12 compatible
May 15, 2019
0e2eb44
Android start scripts cleanup
May 15, 2019
88ab2eb
Merge pull request #1059 from exokitxr/user-parallel-android-cleanup
May 15, 2019
316f214
More android install scripts debugging
May 15, 2019
fa2e664
More android scripts debugging
May 15, 2019
af85617
Bump android node-gyp include directory to 12.2.0
May 15, 2019
36bad97
Patch android build check to node version 12.2.0
May 15, 2019
ad697aa
Remove node 12 incompatible modules from package.json
May 15, 2019
d0d981d
Comment out fault-zone hook from index.js
May 15, 2019
771ef13
Remove node 12 incompativel repl.history module
May 15, 2019
5cf7303
Update GLFW binding to not use deprecated node 12 undefined -> unsign…
May 15, 2019
6ea2cea
update node versions 11.6.0 -> 12.0.0
chrislatorres May 15, 2019
de03af6
Bugfix WebAudioAsync initialization for node 12
May 16, 2019
118edfd
uncomment trailing slash check
chrislatorres May 16, 2019
bfe3b1c
Merge pull request #1061 from exokitxr/uncomment-replace
May 16, 2019
8744353
update node 12.0.0 to 12.2.0
chrislatorres May 16, 2019
7cdd9af
Update android node version dependency to 11.15.0
May 18, 2019
693791d
Bump package.json libnode.a-android version
May 18, 2019
95fb51a
Merge pull request #1064 from exokitxr/user-parallel-12
May 18, 2019
ee53899
update magicleap and android node versions to 11.15.0
chrislatorres May 18, 2019
cd195c5
Move main Dockerfile to 12.2.0
May 18, 2019
cc8c0a7
Bump travis.yml to 12.2.0
May 18, 2019
8c9300f
Bump appveyor to 12.2.0
May 18, 2019
7e6d028
Bump android.Dockerfile to 11.15.0
May 18, 2019
c0ad0b3
Bump nan version in package.json
May 18, 2019
5cc8869
Add ARGS passing example to run-android script
May 18, 2019
42fcaa1
Use appdmg-exokit for macos code signing
May 18, 2019
db20d03
Bump libnode.a version for magic leap build
May 18, 2019
21afdbc
Merge pull request #1067 from exokitxr/user-parallel-build
May 18, 2019
3b6b09b
Merge pull request #1069 from exokitxr/user-parallel-ml
May 18, 2019
d7a6641
Remove --experimental-worker from package.json
May 18, 2019
3f38a50
Remove --experimental-worker from scripts
May 18, 2019
bd64ce7
Remove --experimental-worker from main.cpp
May 18, 2019
3466f92
Remove --experimental-worker from examples
May 18, 2019
c5813e3
update node versions 11.6.0 -> 12.0.0
chrislatorres May 15, 2019
2cbed04
update node 12.0.0 to 12.2.0
chrislatorres May 16, 2019
732daf5
update magicleap and android node versions to 11.15.0
chrislatorres May 18, 2019
54fed91
Merge branch 'update-node-vers' of github.com:exokitxr/exokit into up…
chrislatorres May 18, 2019
e9ab842
Merge branch 'user-parallel' into update-node-vers
chrislatorres May 18, 2019
83862d7
Merge pull request #1066 from exokitxr/user-parallel-worker
May 18, 2019
0984d19
Merge pull request #1060 from exokitxr/update-node-vers
May 18, 2019
e3ca005
Bugfix android-run script version injection
May 18, 2019
47704c2
Clean up index.js waitGetPoses
May 18, 2019
b8510a1
Clean up oculus hmd wait get poses
May 18, 2019
f6588ef
Openvr index.js binding waitGetPostes HMD loading cleanup
May 18, 2019
a237ab0
Oculus mobile wait get poses cleanup in index.js
May 18, 2019
390d3eb
Clean up magic leap index.js waitGetPoses
May 18, 2019
0d505c7
Bugfix waitGetPoses async in index.js
May 18, 2019
1957c1c
Abstract out _computeDerivedGamepadsData call in index.js
May 18, 2019
84f511f
Remove dead GetScreenSize exposure from GLFE header
May 18, 2019
8178be8
Bugfix EGL bad GetScreenSize pointerToArray extraction
May 18, 2019
8860b59
Merge pull request #1051 from exokitxr/user-parallel-opt
May 19, 2019
b94ef40
Merge branch 'master' into user-parallel
May 19, 2019
2223c00
Clean up windowsystem MSAA buffers tracking
May 19, 2019
2c28c62
Major oculus mobile swap chain management refactoring
May 19, 2019
01197ba
Update oculus mobile top level render loop to new api in index.js
May 19, 2019
d6da1ce
Update oculus desktop binding to not use fbo on top of the swap chain
May 19, 2019
7f94fdf
Update oculus desktop API usage in index.js
May 19, 2019
04085ea
Small Window.js code cleanup
May 19, 2019
23b064a
Add direct framebuffer rendering support for non-antialiased composit…
May 19, 2019
3797b80
Add missing Window.js current xr gl context set
May 19, 2019
8e6e856
Update oculus mobile vr api performance config
May 19, 2019
a994e65
Major sync objects refactoring
May 19, 2019
7946456
Bugfix desynchronized compose basic context
May 20, 2019
e5f50e8
Small Window.js spacing
May 20, 2019
e29bebf
Small Android EGL parameters cleanup
May 20, 2019
8c50f2c
Remove dead oculus mobile swapChainMetrics tracking
May 20, 2019
7e678a3
Clean up oculus mobile layer headers
May 20, 2019
bb4e334
Small oculus mobile tracking cleanup
May 20, 2019
ce47e54
Major oculus mobile display timing bugfix
May 20, 2019
323f2c4
Merge pull request #1071 from exokitxr/user-parallel-direct
May 20, 2019
2a153b5
fix xrGamepad gamepads array to use i
chrislatorres May 20, 2019
63ef234
Bugfix Worker window-xhr require
May 21, 2019
d3b27ce
Remove appveyor artifacts config
May 21, 2019
be2b05a
Merge pull request #1079 from exokitxr/user-parallel-artifact
May 21, 2019
dc9a561
Merge branch 'master' into user-parallel
May 21, 2019
12c4f22
Merge pull request #1043 from exokitxr/deprocess
May 21, 2019
0863af1
Remove isolator module dependency
May 21, 2019
88c709d
Remove exokit-dev.sh script
May 21, 2019
7f9847d
Bump libnode.a magic leap node version
May 21, 2019
7ed367f
Merge pull request #1087 from exokitxr/user-parallel-ml2
May 21, 2019
7e0f285
Merge pull request #1086 from exokitxr/isolator
May 21, 2019
ff44704
Merge branch 'master' into user-parallel
May 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ matrix:
- os: osx
osx_image: xcode10.1
node_js:
- "11.6.0"
- "12.2.0"
install:
- npm install -g appdmg
- curl "https://nodejs.org/dist/v11.6.0/node-v11.6.0-darwin-x64.tar.gz" >node.tar.gz
- npm install -g appdmg-exokit
- curl "https://nodejs.org/dist/v12.2.0/node-v12.2.0-darwin-x64.tar.gz" >node.tar.gz
- tar -zxf node.tar.gz
- rm node.tar.gz
- mv node-v11.6.0-darwin-x64 node
- mv node-v12.2.0-darwin-x64 node
- export PATH="$(pwd)/node/bin:$PATH"
- unset NVM_NODEJS_ORG_MIRROR
- "./node/bin/npm install --no-optional"
Expand Down
10 changes: 5 additions & 5 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Build targets :

## Windows

**Requirements**: [Node.js 11.6.0](https://nodejs.org/dist/v11.6.0/), Python 2, Visual Studio 2015 or 2017
**Requirements**: [Node.js 12.2.0](https://nodejs.org/dist/v12.2.0/), Python 2, Visual Studio 2015 or 2017

**Alternative requirements**: Node.js 11.6.0, as administrator: `npm install -g windows-build-tools`
**Alternative requirements**: Node.js 12.2.0, as administrator: `npm install -g windows-build-tools`

### Procedure
1. open **Node.js command prompt**
Expand All @@ -19,7 +19,7 @@ Build targets :

## MacOS

**Requirements**: Node.js 11.6.0, XCode
**Requirements**: Node.js 12.2.0, XCode

### Procedure
1. open **Terminal.app**
Expand All @@ -28,7 +28,7 @@ Build targets :

## Linux

**Requirements**: Node.js 11.6.0
**Requirements**: Node.js 12.2.0

### Procedure
1. open **bash**
Expand All @@ -38,7 +38,7 @@ Build targets :

## Magic Leap

**Requirements**: Windows Subsystem for Linux, Ubuntu Bash, Node.js 11.6.0 for Windows, Python 2, Python 3
**Requirements**: Windows Subsystem for Linux, Ubuntu Bash, Node.js 11.15.0 for Windows, Python 2, Python 3

> *NOTE: Due to combined usage of Ubuntu and Windows tools, you must check out Exokit to somewhere reachable from both; the easiest way is to do your `git clone` inside Ubuntu bash, since for example Ubuntu can reach `C:\exokit` as `/mnt/c/exokit`. (included in instructions below)*

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ ADD . /app
WORKDIR /app

RUN \
wget "https://nodejs.org/dist/v11.6.0/node-v11.6.0-linux-x64.tar.gz" -O node.tar.gz && \
wget "https://nodejs.org/dist/v12.2.0/node-v12.2.0-linux-x64.tar.gz" -O node.tar.gz && \
tar -zxf node.tar.gz && \
rm node.tar.gz && \
mv node-v11.6.0-linux-x64 node
mv node-v12.2.0-linux-x64 node
RUN \
export PATH="$PATH:$(pwd)/node/bin" && \
npm install --unsafe-perm --no-optional . && \
Expand All @@ -24,4 +24,4 @@ RUN \
cp -R . /tmp/exokit-bin/lib/exokit && \
cp scripts/exokit-bin.sh /tmp/exokit-bin/bin/exokit && \
cd /tmp/exokit-bin && \
tar -czf /app/exokit-linux-bin.tar.gz --exclude=".*" --exclude="*.tar.gz" *
tar -czf /app/exokit-linux-bin.tar.gz --exclude=".*" --exclude="*.tar.gz" *
4 changes: 2 additions & 2 deletions android.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ RUN chown -R appuser:appuser $HOME && \
USER appuser

RUN \
wget "https://nodejs.org/dist/v11.6.0/node-v11.6.0-linux-x64.tar.gz" -O node.tar.gz -q && \
wget "https://nodejs.org/dist/v11.15.0/node-v11.15.0-linux-x64.tar.gz" -O node.tar.gz -q && \
tar -zxf node.tar.gz > /dev/null && \
rm node.tar.gz && \
mv node-v11.6.0-linux-x64 node
mv node-v11.15.0-linux-x64 node
RUN \
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -q && \
unzip sdk-tools-linux-4333796.zip > /dev/null && \
Expand Down
2 changes: 1 addition & 1 deletion android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ add_library(native-main SHARED ${CMAKE_SOURCE_DIR}/../main.cpp ${ANDROID_NDK}/so

include_directories( SYSTEM ${CMAKE_SOURCE_DIR}/../node_modules/nan )
include_directories( SYSTEM ${CMAKE_SOURCE_DIR}/../deps/exokit-bindings/util/include )
include_directories( SYSTEM ${CMAKE_SOURCE_DIR}/../.node-gyp/11.6.0/include/node )
include_directories( SYSTEM ${CMAKE_SOURCE_DIR}/../.node-gyp/11.15.0/include/node )
include_directories( SYSTEM ${CMAKE_SOURCE_DIR}/../build/libexokit )
include_directories( SYSTEM ${ANDROID_NDK}/sources/android/native_app_glue )

Expand Down
8 changes: 2 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ test_script:

after_test:
- ps: |
wget "https://nodejs.org/dist/v11.6.0/node-v11.6.0-win-x64.zip" -OutFile node.zip
wget "https://nodejs.org/dist/v12.2.0/node-v12.2.0-win-x64.zip" -OutFile node.zip
7z x node.zip
rm node.zip
mv node-v11.6.0-win-x64 node
mv node-v12.2.0-win-x64 node
$env:Path = "$pwd\node;$env:Path";
.\node\npm install --no-optional
$env:TEST_ENV = 'ci'
Expand All @@ -43,10 +43,6 @@ after_test:
mv dist\*.exe exokit-win-x64.exe
. "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe" sign /f .\metadata\codesign-windows.pfx /p "$env:PFX_KEY" exokit-win-x64.exe

artifacts:
- path: "exokit-win-x64.exe"
name: exokit-windows-installer

deploy:
- provider: GitHub
description: 'Exokit installer'
Expand Down
1 change: 1 addition & 0 deletions deps/exokit-bindings/browser/include/browser.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <defines.h>
#include <browser-common.h>
#include <windowsystem.h>

#include <chrono>
#include <deque>
Expand Down
13 changes: 7 additions & 6 deletions deps/exokit-bindings/browser/src/browser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@ Browser::Browser(WebGLRenderingContext *gl, int width, int height, float scale)

glGenTextures(1, &tex);

window = windowsystem::CreateNativeWindow(1, 1, false, gl->windowHandle);
window = windowsystem::CreateWindowHandle(1, 1, false);
}

Browser::~Browser() {}

Local<Object> Browser::Initialize(Isolate *isolate) {
uv_async_init(uv_default_loop(), &mainThreadAsync, MainThreadAsync);
// uv_sem_init(&constructSem, 0);
uv_sem_init(&mainThreadSem, 0);
uv_sem_init(&browserThreadSem, 0);

Nan::EscapableHandleScope scope;

// constructor
Expand Down Expand Up @@ -87,6 +82,12 @@ NAN_METHOD(Browser::New) {
std::string frameworkPath(*frameworkPathValue, frameworkPathValue.length());

if (!embeddedInitialized) {
uv_loop_t *loop = windowsystembase::GetEventLoop();
uv_async_init(loop, &mainThreadAsync, MainThreadAsync);
// uv_sem_init(&constructSem, 0);
uv_sem_init(&mainThreadSem, 0);
uv_sem_init(&browserThreadSem, 0);

browserThread = std::thread([dataPath{std::move(dataPath)}, frameworkPath{std::move(frameworkPath)}]() -> void {
// exout << "initialize web core manager 1" << std::endl;
const bool success = initializeEmbedded(dataPath, frameworkPath);
Expand Down
3 changes: 2 additions & 1 deletion deps/exokit-bindings/canvascontext/include/image-context.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <SkImage.h>
#include <nanosvg.h>
#include <nanosvgrast.h>
#include <windowsystem.h>
#include <string>
#include <thread>

Expand Down Expand Up @@ -47,7 +48,7 @@ class Image : public ObjectWrap {
Nan::Persistent<ArrayBuffer> arrayBuffer;
Nan::Persistent<Function> cbFn;
std::string error;
uv_async_t *threadAsyncHandle;
uv_async_t threadAsyncHandle;

friend class CanvasRenderingContext2D;
friend class ImageData;
Expand Down
18 changes: 6 additions & 12 deletions deps/exokit-bindings/canvascontext/src/image-context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,10 @@ unsigned int Image::GetNumChannels() {
}
} */

std::map<uv_async_t *, Image *> handleToImageMap;
void Image::RunInMainThread(uv_async_t *handle) {
Nan::HandleScope scope;

auto iter = handleToImageMap.find(handle);
Image *image = (*iter).second;
handleToImageMap.erase(iter);
Image *image = (Image *)handle->data;

Local<Object> asyncObject = Nan::New<Object>();
AsyncResource asyncResource(Isolate::GetCurrent(), asyncObject, "imageLoad");
Expand All @@ -68,9 +65,7 @@ void Image::RunInMainThread(uv_async_t *handle) {
image->arrayBuffer.Reset();
image->error = "";

uv_close((uv_handle_t *)handle, [](uv_handle_t *handle) {
free(handle);
});
uv_close((uv_handle_t *)handle, nullptr);
}

void Image::Load(Local<ArrayBuffer> arrayBuffer, size_t byteOffset, size_t byteLength, Local<Function> cbFn) {
Expand All @@ -81,10 +76,9 @@ void Image::Load(Local<ArrayBuffer> arrayBuffer, size_t byteOffset, size_t byteL
this->cbFn.Reset(cbFn);
this->error = "";

threadAsyncHandle = (uv_async_t *)malloc(sizeof(uv_async_t));
uv_async_init(uv_default_loop(), threadAsyncHandle, RunInMainThread);

handleToImageMap[threadAsyncHandle] = this;
uv_loop_t *loop = windowsystembase::GetEventLoop();
uv_async_init(loop, &this->threadAsyncHandle, RunInMainThread);
this->threadAsyncHandle.data = this;

std::thread([this, buffer, byteLength]() -> void {
sk_sp<SkData> data = SkData::MakeWithoutCopy(buffer, byteLength);
Expand Down Expand Up @@ -135,7 +129,7 @@ void Image::Load(Local<ArrayBuffer> arrayBuffer, size_t byteOffset, size_t byteL
}
}

uv_async_send(this->threadAsyncHandle);
uv_async_send(&this->threadAsyncHandle);
}).detach();
} else {
Local<String> arg0 = Nan::New<String>("already loading").ToLocalChecked();
Expand Down
7 changes: 5 additions & 2 deletions deps/exokit-bindings/egl/include/egl.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>

#define EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR 0
#define EGL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x2097
#define EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x2098

using namespace v8;

class WebGLRenderingContext;
Expand All @@ -30,8 +34,7 @@ class NATIVEwindow {
#define windowsystem egl

namespace egl {
NATIVEwindow *CreateNativeWindow(unsigned int width, unsigned int height, bool visible, NATIVEwindow *sharedWindow);
void GetScreenSize(int *width, int *height);
NATIVEwindow *CreateWindowHandle(unsigned int width, unsigned int height, bool visible);
void GetWindowSize(NATIVEwindow *window, int *width, int *height);
void GetFramebufferSize(NATIVEwindow *window, int *width, int *height);
EGLContext GetGLContext(NATIVEwindow *window);
Expand Down
Loading