diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2015-04-21 17:20:55 -0700 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2015-04-21 17:39:11 -0700 |
commit | a20bc3364c39d9e68fa839114ab5b7ac57db8acb (patch) | |
tree | 97b8679f81d8b25ca06a543fb953f93d49bad919 | |
parent | a3dafe49999d24e12b2f6b5cc74b468e58b7384a (diff) | |
download | servo-a20bc3364c39d9e68fa839114ab5b7ac57db8acb.tar.gz servo-a20bc3364c39d9e68fa839114ab5b7ac57db8acb.zip |
Use OpenGl ES on Android (fixes #5785).
-rw-r--r-- | ports/glutin/window.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs index 1732833e246..1dd900f94b1 100644 --- a/ports/glutin/window.rs +++ b/ports/glutin/window.rs @@ -27,7 +27,7 @@ use compositing::windowing::{MouseWindowEvent, WindowNavigateMsg}; #[cfg(feature = "window")] use geom::point::{Point2D, TypedPoint2D}; #[cfg(feature = "window")] -use glutin::{ElementState, Event, MouseButton, VirtualKeyCode}; +use glutin::{Api, ElementState, Event, GlRequest, MouseButton, VirtualKeyCode}; #[cfg(feature = "window")] use msg::constellation_msg::{KeyState, CONTROL, SHIFT, ALT}; #[cfg(feature = "window")] @@ -77,7 +77,7 @@ impl Window { let mut glutin_window = glutin::WindowBuilder::new() .with_title("Servo".to_string()) .with_dimensions(window_size.to_untyped().width, window_size.to_untyped().height) - .with_gl_version(Window::gl_version()) + .with_gl(Window::gl_version()) .with_visibility(is_foreground) .build() .unwrap(); @@ -119,13 +119,13 @@ impl Window { } #[cfg(not(target_os="android"))] - fn gl_version() -> (u32, u32) { - (3, 0) + fn gl_version() -> GlRequest { + GlRequest::Specific(Api::OpenGl, (3, 0)) } #[cfg(target_os="android")] - fn gl_version() -> (u32, u32) { - (2, 0) + fn gl_version() -> GlRequest { + GlRequest::Specific(Api::OpenGlEs, (2, 0)) } #[cfg(not(target_os="android"))] |