File tree 1 file changed +23
-0
lines changed
src/backend/renderer/utils
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,29 @@ pub struct Buffer {
83
83
}
84
84
85
85
impl Buffer {
86
+ /// Create a buffer with implicit sync
87
+ pub fn with_implicit ( buffer : WlBuffer ) -> Self {
88
+ Self {
89
+ inner : Arc :: new ( InnerBuffer {
90
+ buffer,
91
+ acquire_point : None ,
92
+ release_point : None ,
93
+ } ) ,
94
+ }
95
+ }
96
+
97
+ /// Create a buffer with explicit acquire and release sync points
98
+ #[ cfg( feature = "backend_drm" ) ]
99
+ pub fn with_explicit ( buffer : WlBuffer , acquire_point : DrmSyncPoint , release_point : DrmSyncPoint ) -> Self {
100
+ Self {
101
+ inner : Arc :: new ( InnerBuffer {
102
+ buffer,
103
+ acquire_point : Some ( acquire_point) ,
104
+ release_point : Some ( release_point) ,
105
+ } ) ,
106
+ }
107
+ }
108
+
86
109
#[ cfg( feature = "backend_drm" ) ]
87
110
#[ allow( dead_code) ]
88
111
pub ( crate ) fn acquire_point ( & self ) -> Option < & DrmSyncPoint > {
You can’t perform that action at this time.
0 commit comments