servo / surfman

Accelerated offscreen graphics for WebGL
Apache License 2.0
172 stars 84 forks source link

Add initial support for OpenHarmony #285

Closed jschwe closed 4 months ago

jschwe commented 5 months ago

This adds support all the surfman APIs servo seems to be requiring on OpenHarmony. Generic surfaces are not supported at the moment. This patch is heavily based on the existing android implementation.

wusyong commented 4 months ago

Could it just reuse the same Android implementation and add #[cfg(ohos)] when it's necessary?

jschwe commented 4 months ago

Could it just reuse the same Android implementation and add #[cfg(ohos)] when it's necessary?

Hmm, perhaps the common parts could be extracted to a shared egl implementation.

jschwe commented 4 months ago

@mrobinson Do you have any opinions regarding this PR and https://github.com/servo/surfman/pull/290? Would you prefer if the android and ohos implementations would be merged into one directory?

mrobinson commented 4 months ago

@mrobinson Do you have any opinions regarding this PR and #290? Would you prefer if the android and ohos implementations would be merged into one directory?

Sorry for taking so long to look at this. I think that if both platforms use EGL and they have a lot of shared code it probably makes sense to make a shard EGL backend, as you say.

jschwe commented 4 months ago

Superceded by #293