1111 } ,
1212 format:: Format ,
1313 gfx_api:: {
14- AcquireSync , GfxBlendBuffer , GfxError , GfxFormat , GfxFramebuffer , GfxTexture ,
15- GfxWriteModifier , ReleaseSync , SyncFile , needs_render_usage,
14+ AcquireSync , FdSync , GfxBlendBuffer , GfxError , GfxFormat , GfxFramebuffer , GfxTexture ,
15+ GfxWriteModifier , ReleaseSync , needs_render_usage,
1616 } ,
1717 rect:: { DamageQueue , Rect , Region } ,
1818 udmabuf:: { Udmabuf , UdmabufError } ,
@@ -120,15 +120,15 @@ pub enum RenderBufferError {
120120
121121#[ derive( Default ) ]
122122pub struct RenderBufferCopy {
123- pub render_block : Option < SyncFile > ,
124- pub present_block : Option < SyncFile > ,
123+ pub render_block : Option < FdSync > ,
124+ pub present_block : Option < FdSync > ,
125125}
126126
127127impl RenderBufferCopy {
128- pub fn for_both ( sf : Option < SyncFile > ) -> Self {
128+ pub fn for_both ( sync : Option < FdSync > ) -> Self {
129129 Self {
130- render_block : sf . clone ( ) ,
131- present_block : sf ,
130+ render_block : sync . clone ( ) ,
131+ present_block : sync ,
132132 }
133133 }
134134}
@@ -138,12 +138,12 @@ impl RenderBuffer {
138138 & self ,
139139 cd : & Rc < ColorDescription > ,
140140 region : Option < & Region > ,
141- sync_file : Option < SyncFile > ,
141+ sync : Option < FdSync > ,
142142 ) -> Result < RenderBufferCopy , RenderBufferError > {
143143 match & self . prime {
144144 RenderBufferPrime :: None => Ok ( RenderBufferCopy {
145145 render_block : None ,
146- present_block : sync_file ,
146+ present_block : sync ,
147147 } ) ,
148148 RenderBufferPrime :: Sampling {
149149 dev_render_tex,
@@ -157,7 +157,7 @@ impl RenderBuffer {
157157 dev_render_tex,
158158 cd,
159159 None ,
160- AcquireSync :: from_sync_file ( sync_file ) ,
160+ AcquireSync :: from_fd_sync ( sync ) ,
161161 ReleaseSync :: None ,
162162 0 ,
163163 0 ,
@@ -175,7 +175,7 @@ impl RenderBuffer {
175175 ..
176176 } => {
177177 let render_block = render_copy
178- . execute ( sync_file . as_ref ( ) , region)
178+ . execute ( sync . as_ref ( ) , region)
179179 . map_err ( RenderBufferError :: CopyRenderToUdmabuf ) ?;
180180 let present_block = dev_copy
181181 . execute ( render_block. as_ref ( ) , region)
@@ -189,7 +189,7 @@ impl RenderBuffer {
189189 | RenderBufferPrime :: CopyDirectPush {
190190 render_copy : copy, ..
191191 } => copy
192- . execute ( sync_file . as_ref ( ) , region)
192+ . execute ( sync . as_ref ( ) , region)
193193 . map_err ( RenderBufferError :: CopyRenderToDev )
194194 . map ( RenderBufferCopy :: for_both) ,
195195 }
@@ -201,8 +201,8 @@ impl RenderBuffer {
201201 self . damage_queue . damage ( & [ rect] ) ;
202202 }
203203
204- pub fn clear ( & self , cd : & Rc < ColorDescription > ) -> Result < Option < SyncFile > , RenderBufferError > {
205- let sync_file = match & self . prime {
204+ pub fn clear ( & self , cd : & Rc < ColorDescription > ) -> Result < Option < FdSync > , RenderBufferError > {
205+ let sync = match & self . prime {
206206 RenderBufferPrime :: None => {
207207 self . render
208208 . fb
@@ -222,14 +222,14 @@ impl RenderBuffer {
222222 self . copy_to_dev ( cd, None , sf) ?. present_block
223223 }
224224 } ;
225- Ok ( sync_file )
225+ Ok ( sync )
226226 }
227227
228228 pub fn copy_to_new (
229229 & self ,
230230 new : & Self ,
231231 cd : & Rc < ColorDescription > ,
232- ) -> Result < Option < SyncFile > , RenderBufferError > {
232+ ) -> Result < Option < FdSync > , RenderBufferError > {
233233 let old = self ;
234234
235235 if ( old. width , old. height ) != ( new. width , new. height ) {
0 commit comments