Skip to content

Commit 8551ea7

Browse files
author
Arjun Ramachandrula
committed
Removed euclid dependency, while allowing for more math functions.
1 parent 1714136 commit 8551ea7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+15783
-39
lines changed

android-example/rust/Cargo.toml

-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ gl = "0.14"
1919
jni = "0.13"
2020
log = "0.4"
2121

22-
[dependencies.euclid]
23-
version = "0.20"
24-
features = []
25-
2622
[dependencies.surfman]
2723
path = "../../surfman"
2824
features = ["sm-test"]

android-example/rust/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::threads::common::ResourceLoader;
77
use crate::threads::App;
88

99
use android_logger::Config;
10-
use euclid::default::Size2D;
10+
use surfman::geom::default::Size2D;
1111
use jni::objects::{GlobalRef, JByteBuffer, JClass, JObject, JValue};
1212
use jni::{JNIEnv, JavaVM};
1313
use log::Level;

surfman/Cargo.toml

+1-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ lazy_static = "1"
3434
libc = "0.2"
3535
log = "0.4"
3636
parking_lot = "0.10.2"
37-
38-
[dependencies.euclid]
39-
version = "0.20"
40-
features = []
37+
num-traits = "0.2"
4138

4239
[dependencies.osmesa-sys]
4340
version = "0.1"

surfman/examples/chaos_game.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//
33
//! Demonstrates how to use `surfman` to draw to a window surface via the CPU.
44
5-
use euclid::default::Point2D;
65
use rand::{self, Rng};
6+
use surfman::geom::default::Point2D;
77
use surfman::{SurfaceAccess, SurfaceType};
88
use winit::dpi::PhysicalSize;
99
use winit::{DeviceEvent, Event, EventsLoop, KeyboardInput, VirtualKeyCode};

surfman/examples/offscreen.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
use crate::common::{ck, Buffer, FilesystemResourceLoader, Program, Shader, ShaderKind};
77

88
use clap::{App, Arg};
9-
use euclid::default::Size2D;
109
use gl;
1110
use gl::types::{GLchar, GLenum, GLint, GLuint, GLvoid};
1211
use png::{BitDepth, ColorType, Encoder};
1312
use std::fs::File;
1413
use std::mem;
1514
use std::path::Path;
1615
use std::slice;
16+
use surfman::geom::Size2D;
1717
use surfman::{Connection, ContextAttributeFlags, ContextAttributes, GLApi, GLVersion};
1818
use surfman::{SurfaceAccess, SurfaceType};
1919

surfman/examples/threads.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
use self::common::{ck, Buffer, Program, ResourceLoader, Shader, ShaderKind};
66

7-
use euclid::default::{Point2D, Rect, Size2D, Vector2D};
87
use gl::types::{GLchar, GLenum, GLint, GLuint, GLvoid};
98
use std::sync::mpsc::{self, Receiver, Sender};
109
use std::thread;
10+
use surfman::geom::default::{Point2D, Rect, Size2D, Vector2D};
1111
use surfman::{declare_surfman, SurfaceAccess, SurfaceTexture, SurfaceType};
1212
use surfman::{Adapter, Connection, Context, ContextDescriptor, Device, GLApi, Surface};
1313

surfman/src/connection.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use crate::Error;
66
use crate::GLApi;
77

8-
use euclid::default::Size2D;
8+
use crate::geom::default::Size2D;
99

1010
use std::os::raw::c_void;
1111

surfman/src/device.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
//! The abstract interface that all devices conform to.
44
55
use super::connection::Connection as ConnectionInterface;
6+
use crate::geom::default::Size2D;
67
use crate::gl::types::{GLenum, GLuint};
78
use crate::{ContextAttributes, ContextID, Error, GLApi, SurfaceAccess, SurfaceInfo, SurfaceType};
8-
use euclid::default::Size2D;
99

1010
use std::os::raw::c_void;
1111

0 commit comments

Comments
 (0)