Skip to content

Commit 9d92ad5

Browse files
committed
direct-composition tidy
1 parent 87812ae commit 9d92ad5

File tree

6 files changed

+23
-2
lines changed

6 files changed

+23
-2
lines changed

direct-composition/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "direct-composition"
33
version = "0.1.0"
44
authors = ["Simon Sapin <[email protected]>"]
5+
license = "MPL-2.0"
56

67
[target.'cfg(windows)'.dependencies]
78
euclid = "0.17"

direct-composition/src/com.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
use std::ops;
26
use std::ptr;
37
use winapi::Interface;

direct-composition/src/egl.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
use mozangle::egl::ffi::*;
16
use std::os::raw::c_void;
27
use std::ptr;
38
use std::rc::Rc;
4-
use mozangle::egl::ffi::*;
59
use winapi::um::d3d11::ID3D11Device;
610
use winapi::um::d3d11::ID3D11Texture2D;
711

direct-composition/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
#![cfg(windows)]
26

37
extern crate gleam;
@@ -74,7 +78,7 @@ impl DirectComposition {
7478

7579
// Create the DirectComposition device object.
7680
let composition_device = ComPtr::<IDCompositionDevice>::new_with_uuid(|uuid, ptr_ptr| {
77-
winapi::um::dcomp::DCompositionCreateDevice(&*dxgi_device, uuid,ptr_ptr)
81+
winapi::um::dcomp::DCompositionCreateDevice(&*dxgi_device, uuid, ptr_ptr)
7882
});
7983

8084
// Create the composition target object based on the

direct-composition/src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
#[cfg(not(windows))]
26
fn main() {
37
println!("This demo only runs on Windows.");

direct-composition/src/main_windows.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
extern crate direct_composition;
26
extern crate euclid;
37
extern crate gleam;

0 commit comments

Comments
 (0)