File tree 6 files changed +23
-2
lines changed
6 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 2
2
name = " direct-composition"
3
3
version = " 0.1.0"
4
4
authors = [
" Simon Sapin <[email protected] >" ]
5
+ license = " MPL-2.0"
5
6
6
7
[target .'cfg(windows)' .dependencies ]
7
8
euclid = " 0.17"
Original file line number Diff line number Diff line change
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
+
1
5
use std:: ops;
2
6
use std:: ptr;
3
7
use winapi:: Interface ;
Original file line number Diff line number Diff line change
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:: * ;
1
6
use std:: os:: raw:: c_void;
2
7
use std:: ptr;
3
8
use std:: rc:: Rc ;
4
- use mozangle:: egl:: ffi:: * ;
5
9
use winapi:: um:: d3d11:: ID3D11Device ;
6
10
use winapi:: um:: d3d11:: ID3D11Texture2D ;
7
11
Original file line number Diff line number Diff line change
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
+
1
5
#![ cfg( windows) ]
2
6
3
7
extern crate gleam;
@@ -74,7 +78,7 @@ impl DirectComposition {
74
78
75
79
// Create the DirectComposition device object.
76
80
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)
78
82
} ) ;
79
83
80
84
// Create the composition target object based on the
Original file line number Diff line number Diff line change
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
+
1
5
#[ cfg( not( windows) ) ]
2
6
fn main ( ) {
3
7
println ! ( "This demo only runs on Windows." ) ;
Original file line number Diff line number Diff line change
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
+
1
5
extern crate direct_composition;
2
6
extern crate euclid;
3
7
extern crate gleam;
You can’t perform that action at this time.
0 commit comments