(In reply to Jan Andre Ikenmeyer [:darkspirit] from comment #27) > These lines seem to assume EGL means GLES: > https://searchfox.org/mozilla-central/rev/8a990595ce6d5ed07ace2d4d5d86cc69aec90bde/gfx/webrender_bindings/src/bindings.rs#1113 > https://searchfox.org/mozilla-central/rev/8a990595ce6d5ed07ace2d4d5d86cc69aec90bde/gfx/webrender_bindings/src/bindings.rs#1178 Should they be changed to one of these? ``` if cfg!(target_os = "android") || is_glcontext_angle(gl_context) { gl = unsafe { gl::GlesFns::load_with(|symbol| get_proc_address(gl_context, symbol)) }; } else { gl = unsafe { gl::GlFns::load_with(|symbol| get_proc_address(gl_context, symbol)) }; } ``` ``` #[cfg(target_os = "android")] gl = unsafe { gl::GlesFns::load_with(|symbol| get_proc_address(gl_context, symbol)) }; #[cfg(not(target_os = "android"))] if is_glcontext_angle(gl_context) { gl = unsafe { gl::GlesFns::load_with(|symbol| get_proc_address(gl_context, symbol)) }; } else { gl = unsafe { gl::GlFns::load_with(|symbol| get_proc_address(gl_context, symbol)) }; } ```
Bug 1474281 Comment 31 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Jan Andre Ikenmeyer [:darkspirit] from comment #27) > These lines seem to assume EGL means GLES: > https://searchfox.org/mozilla-central/rev/8a990595ce6d5ed07ace2d4d5d86cc69aec90bde/gfx/webrender_bindings/src/bindings.rs#1113 > https://searchfox.org/mozilla-central/rev/8a990595ce6d5ed07ace2d4d5d86cc69aec90bde/gfx/webrender_bindings/src/bindings.rs#1178 Should they be changed to one of these? ``` if cfg!(target_os = "android") || unsafe { is_glcontext_angle(gl_context) } { gl = unsafe { gl::GlesFns::load_with(|symbol| get_proc_address(gl_context, symbol)) }; } else { gl = unsafe { gl::GlFns::load_with(|symbol| get_proc_address(gl_context, symbol)) }; } ``` ``` #[cfg(target_os = "android")] gl = unsafe { gl::GlesFns::load_with(|symbol| get_proc_address(gl_context, symbol)) }; #[cfg(not(target_os = "android"))] if unsafe { is_glcontext_angle(gl_context) } { gl = unsafe { gl::GlesFns::load_with(|symbol| get_proc_address(gl_context, symbol)) }; } else { gl = unsafe { gl::GlFns::load_with(|symbol| get_proc_address(gl_context, symbol)) }; } ```