Skip to content

Add experimental android support#188

Merged
200sc merged 10 commits intomasterfrom
feature/android
Feb 8, 2022
Merged

Add experimental android support#188
200sc merged 10 commits intomasterfrom
feature/android

Conversation

@200sc
Copy link
Contributor

@200sc 200sc commented Feb 5, 2022

I think we should merge this in after we add instructions for how to set this up, then cut a release with it + windows arm

200sc added 8 commits January 30, 2022 09:50
This driver can render oak to the android screen, but size events and scaling of content / scaling of touch events is not complete.
This:
- fixes size of the rendered output to scale to the target screen appropriately
- fixes touch to click event conversion
- removes unused code
- removes paint looping completely, driving paints from window.Scale
@200sc 200sc requested a review from Implausiblyfun February 5, 2022 14:01
@200sc 200sc self-assigned this Feb 5, 2022
@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2022

Codecov Report

Merging #188 (ebf404b) into master (935dec0) will increase coverage by 0.07%.
The diff coverage is 55.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #188      +/-   ##
==========================================
+ Coverage   92.60%   92.67%   +0.07%     
==========================================
  Files         141      141              
  Lines        6406     6406              
==========================================
+ Hits         5932     5937       +5     
+ Misses        415      407       -8     
- Partials       59       62       +3     
Impacted Files Coverage Δ
window.go 66.95% <ø> (ø)
drawLoop.go 62.26% <52.63%> (+11.32%) ⬆️
lifecycle.go 72.05% <100.00%> (ø)
collision/rtree.go 97.90% <0.00%> (-1.40%) ⬇️
event/handler.go 96.66% <0.00%> (ø)
sceneLoop.go 94.38% <0.00%> (+3.37%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 935dec0...ebf404b. Read the comment docs.

@200sc 200sc marked this pull request as ready for review February 5, 2022 14:19
@200sc
Copy link
Contributor Author

200sc commented Feb 5, 2022

After this is merged, we should open an issue that gomobile init requires a c compiler (although I don't know if we can do anything about it realistically, historically we still make this an issue)

I'll also open an issue that our driver does not respect when the android phone changes orientation.

@200sc 200sc mentioned this pull request Feb 5, 2022
size: size,
img: s.images.NewImage(size.X, size.Y),
}
s.activeImages = append(s.activeImages, img)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question we can have simultaneous access to this do we care enough to put a lock around it? Or given that the only other accessor is at lifecycle cross event (cleanup) we just dont care.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To put our discussion in writing: we decided it's not important; we both want to rewrite the shiny driver interface anyway and don't expect this interface to be used by anyone but oak.

Copy link
Contributor

@Implausiblyfun Implausiblyfun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great other than that one potential end of cycle conflict. Tested and it was nice how easy it was to get a build out to a device. I will see how cleanly the env variables can be pulled into a mage buid for the test-template.

@200sc 200sc merged commit 1db3119 into master Feb 8, 2022
@200sc 200sc deleted the feature/android branch February 8, 2022 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants