diff options
author | DK Liao <dklassic@gmail.com> | 2025-01-24 10:39:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-24 02:39:39 +0000 |
commit | a0eceee2ed71d5c616711bb73ea24130aa5e1e54 (patch) | |
tree | 426b303b0e27c8cb54411184233f3bbf6eded507 /ports/servoshell/egl/ohos/simpleservo.rs | |
parent | ac22157491abcfa7aba2fc3a59de5cc4019c5a0b (diff) | |
download | servo-a0eceee2ed71d5c616711bb73ea24130aa5e1e54.tar.gz servo-a0eceee2ed71d5c616711bb73ea24130aa5e1e54.zip |
feat: Turn `RenderingContext` into a trait (#35052)
* feat: turn RenderingContext into a trait
Signed-off-by: DK Liao <dklassic@gmail.com>
Add comment and handle drop error
Signed-off-by: DK Liao <dklassic@gmail.com>
Add doc comment
Signed-off-by: DK Liao <dklassic@gmail.com>
Allow make_current to propagate Error
Signed-off-by: DK Liao <dklassic@gmail.com>
Fix all make_current occurances
Signed-off-by: DK Liao <dklassic@gmail.com>
Move back to Rc<dyn RenderingContext>
Signed-off-by: DK Liao <dklassic@gmail.com>
fix android/ohos
Signed-off-by: DK Liao <dklassic@gmail.com>
Fix build
Signed-off-by: DK Liao <dklassic@gmail.com>
fix android/ohos again
Signed-off-by: DK Liao <dklassic@gmail.com>
* Fix macOS smoke test
Signed-off-by: DK Liao <dklassic@gmail.com>
* Add comment for create_texture and destroy_texture
Signed-off-by: DK Liao <dklassic@gmail.com>
* Improve comments written
Signed-off-by: DK Liao <dklassic@gmail.com>
---------
Signed-off-by: DK Liao <dklassic@gmail.com>
Diffstat (limited to 'ports/servoshell/egl/ohos/simpleservo.rs')
-rw-r--r-- | ports/servoshell/egl/ohos/simpleservo.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ports/servoshell/egl/ohos/simpleservo.rs b/ports/servoshell/egl/ohos/simpleservo.rs index d642db4718f..5321190e296 100644 --- a/ports/servoshell/egl/ohos/simpleservo.rs +++ b/ports/servoshell/egl/ohos/simpleservo.rs @@ -18,7 +18,7 @@ use servo::embedder_traits::resources; pub use servo::embedder_traits::EventLoopWaker; use servo::euclid::Size2D; use servo::servo_url::ServoUrl; -use servo::webrender_traits::RenderingContext; +use servo::webrender_traits::SurfmanRenderingContext; use servo::{self, Servo}; use surfman::{Connection, SurfaceType}; use xcomponent_sys::{OH_NativeXComponent, OH_NativeXComponent_GetXComponentSize}; @@ -93,7 +93,7 @@ pub fn init( let surface_type = SurfaceType::Widget { native_widget }; info!("Creating rendering context"); - let rendering_context = RenderingContext::create(&connection, &adapter, None) + let rendering_context = SurfmanRenderingContext::create(&connection, &adapter, None) .or(Err("Failed to create surface manager"))?; let surface = rendering_context .create_surface(surface_type) @@ -119,7 +119,7 @@ pub fn init( let servo = Servo::new( opts, preferences, - rendering_context.clone(), + Rc::new(rendering_context.clone()), embedder_callbacks, window_callbacks.clone(), None, /* user_agent */ |