servo: Merge #13478 - Use GL ES3 on ARM devices (from mmatyas:arm_gles3); r=jdm
authorMátyás Mustoha <mmatyas@inf.u-szeged.hu>
Fri, 30 Sep 2016 14:49:29 -0500
changeset 339790 a4a62a6f745e4de68c3cd76a8a7cd81313631df7
parent 339789 ed7aae3d3d5415c00f3dbecc1d4905e39dec120c
child 339791 1922cd20fa05d58c81d3e71f098bfb68ff7d99ad
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
servo: Merge #13478 - Use GL ES3 on ARM devices (from mmatyas:arm_gles3); r=jdm <!-- Please describe your changes on the following line: --> This makes WebRender work on ARM devices; see servo/webrender#408. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig HARFBUZZ_NO_PKG_CONFIG=1 EXPAT_NO_PKG_CONFIG=1 FREETYPE2_NO_PKG_CONFIG=1 FONTCONFIG_NO_PKG_CONFIG=1 CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ ./mach build --dev --target=arm-unknown-linux-gnueabihf` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #10310. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: a559c2035304b03d9662f8c71d0ddc4ad12f800e
servo/ports/glutin/window.rs
--- a/servo/ports/glutin/window.rs
+++ b/servo/ports/glutin/window.rs
@@ -312,32 +312,32 @@ impl Window {
                 Some(listener) => {
                     (*listener).handle_event_from_nested_event_loop(
                         WindowEvent::Resize(TypedSize2D::new(width, height)));
                 }
             }
         }
     }
 
-    #[cfg(not(target_os = "android"))]
+    #[cfg(not(any(target_arch = "arm", target_arch = "aarch64")))]
     fn gl_version() -> GlRequest {
         if opts::get().use_webrender {
             return GlRequest::Specific(Api::OpenGl, (3, 2));
         }
         match opts::get().render_api {
             RenderApi::GL => {
                 GlRequest::Specific(Api::OpenGl, (2, 1))
             }
             RenderApi::ES2 => {
                 GlRequest::Specific(Api::OpenGlEs, (2, 0))
             }
         }
     }
 
-    #[cfg(target_os = "android")]
+    #[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
     fn gl_version() -> GlRequest {
         GlRequest::Specific(Api::OpenGlEs, (3, 0))
     }
 
     #[cfg(not(target_os = "android"))]
     fn load_gl_functions(window_kind: &WindowKind) {
         match window_kind {
             &WindowKind::Window(ref window) => {