aboutsummaryrefslogtreecommitdiffstats
path: root/ports/servoshell/egl/ohos/simpleservo.rs
diff options
context:
space:
mode:
authorJonathan Schwender <55576758+jschwe@users.noreply.github.com>2024-12-20 16:08:09 +0100
committerGitHub <noreply@github.com>2024-12-20 15:08:09 +0000
commit0dd8798148a892b06b125be2607d18da75af4c23 (patch)
tree140a85f0fe6eec686bd4affab399bd49bcc5fe78 /ports/servoshell/egl/ohos/simpleservo.rs
parent65c65c9a6aafbae16e694814e198c8744cc0e567 (diff)
downloadservo-0dd8798148a892b06b125be2607d18da75af4c23.tar.gz
servo-0dd8798148a892b06b125be2607d18da75af4c23.zip
servoshell: Remove duplicate egl bindings on android/ohos (#34716)
- The default value for SwapInterval is 1, so setting it to 1 changes nothing - We don't clear the screen immediately anymore, which was the only useage of the egl bindings this saves us from duplicated EGL bindings. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Diffstat (limited to 'ports/servoshell/egl/ohos/simpleservo.rs')
-rw-r--r--ports/servoshell/egl/ohos/simpleservo.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/ports/servoshell/egl/ohos/simpleservo.rs b/ports/servoshell/egl/ohos/simpleservo.rs
index a29c9fa44fb..97e0e02f072 100644
--- a/ports/servoshell/egl/ohos/simpleservo.rs
+++ b/ports/servoshell/egl/ohos/simpleservo.rs
@@ -21,7 +21,7 @@ use servo::servo_config::opts;
use servo::servo_config::opts::ArgumentParsingResult;
use servo::servo_url::ServoUrl;
use servo::webrender_traits::RenderingContext;
-use servo::{self, gl, Servo};
+use servo::{self, Servo};
use surfman::{Connection, SurfaceType};
use crate::egl::host_trait::HostTrait;
@@ -37,7 +37,6 @@ pub fn init(
options: InitOpts,
native_window: *mut c_void,
xcomponent: *mut OH_NativeXComponent,
- gl: Rc<dyn gl::Gl>,
waker: Box<dyn EventLoopWaker>,
callbacks: Box<dyn HostTrait>,
) -> Result<ServoGlue, &'static str> {
@@ -92,10 +91,6 @@ pub fn init(
crate::prefs::register_user_prefs(&opts_matches);
- gl.clear_color(1.0, 1.0, 1.0, 1.0);
- gl.clear(gl::COLOR_BUFFER_BIT);
- gl.finish();
-
// Initialize surfman
let connection = Connection::new().or(Err("Failed to create connection"))?;
let adapter = connection
@@ -139,7 +134,6 @@ pub fn init(
waker,
#[cfg(feature = "webxr")]
None,
- gl.clone(),
));
let servo = Servo::new(