Ios support #144
base: master
Are you sure you want to change the base?
Ios support #144
Conversation
Hello @larsbergstrom , could you, please, write me if I should provide something else to your accepting of my PR? |
Hi, @NatalyaKovalova! @MortimerGoro Could you please help do a first pass? Otherwise, I'll take a look tomorrow. Sorry - my calendar is horrific in the middle of my week. |
@larsbergstrom |
@larsbergstrom @NatalyaKovalova ok, I'll take a look. |
@larsbergstrom @MortimerGoro For pulling implementation it would be better to define how to add AEGL support better. I'm temporary using this solution and use servo-egl interface for android, it works but I'm not sure that it is the best way for PR.
It is not an immediate question but important for me. |
src/gl_rasterization_context_ios.rs
Outdated
} | ||
|
||
impl Drop for GLRasterizationContext { | ||
fn drop(&mut self) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove empty drop method
src/utils/ios/SkStream_iOS.cpp
Outdated
CGDataProviderRef SkCreateDataProviderFromData(SkData* data) { | ||
data->ref(); | ||
return CGDataProviderCreateWithData(data, data->data(), data->size(), | ||
unref_proc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: align unref_proc with data or put it in the same line as the other parameters
The stub implementation looks good to me. About AEGL support, I don't like the libegl and servo-egl solution for a final PR. It would be better not to add the iOS libegl transpiler dependency (last commit is from 4 years ago). AEGL is a pretty straightforward api. I don't think it's necessary to create a separate crate. You could perform the API calls using the rust-objc crate (already included in servo) and maybe another like core-foundation or core-graphics crates depending on the API requirements. I'm working on adding WebGL 2.0 support (servo/surfman#108) and did some tests with MacOS and iOS GLContext backends. I will share some code once I clean a bit the PR. As a long-term plan we could share the gl-context implementations used by WebGL and skia. I think that rust-offscreen-rendering-context crate has all that is needed for skia-contexts. But this is out of scope for this PR (it would involve modifications in all the skia backends to do it right) |
@MortimerGoro |
@NatalyaKovalova I cleaned some of the code and did the iOS GLContext PR to rust-offscreen-context servo/surfman#109. You could use native_gl_context.rs as a reference to implement the skia context for iOS. Any chance that you could include the implementation in this PR or are you blocked by this to pass the building process? |
@MortimerGoro |
Hello. |
☔ The latest upstream changes (presumably #148) made this pull request unmergeable. Please resolve the merge conflicts. |
ability to build Skia for iOS platform have been added in this PR.
For building could be used:
cargo build --target aarch64-apple-ios
@larsbergstrom , could you, please, make code review and accept changes?
There are stubs in this PR. I need to discuss how to do it better add AEGL support.
I am temporary using this solution and use servo-egl interface for android, it works but I'm not sure that it is the best way for PR. @larsbergstrom , could you please redirect me to person who worked with egl for android to discuss it?
@larsbergstrom, I'll commit Azure tomorrow - it depends on Skia and will ask you again accept new PR.
This change is