File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -397,9 +397,6 @@ pub struct Surface {
397397 render_layer : Mutex < metal:: MetalLayer > ,
398398 swapchain_format : RwLock < Option < wgt:: TextureFormat > > ,
399399 extent : RwLock < wgt:: Extent3d > ,
400- // Useful for UI-intensive applications that are sensitive to
401- // window resizing.
402- pub present_with_transaction : bool ,
403400}
404401
405402unsafe impl Send for Surface { }
@@ -409,6 +406,8 @@ unsafe impl Sync for Surface {}
409406pub struct SurfaceTexture {
410407 texture : Texture ,
411408 drawable : metal:: MetalDrawable ,
409+ // Useful for UI-intensive applications that are sensitive to
410+ // window resizing.
412411 present_with_transaction : bool ,
413412}
414413
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ impl super::Surface {
2828 render_layer : Mutex :: new ( layer) ,
2929 swapchain_format : RwLock :: new ( None ) ,
3030 extent : RwLock :: new ( wgt:: Extent3d :: default ( ) ) ,
31- present_with_transaction : false ,
3231 }
3332 }
3433
@@ -168,7 +167,6 @@ impl crate::Surface for super::Surface {
168167 render_layer. set_device ( & device_raw) ;
169168 render_layer. set_pixel_format ( caps. map_format ( config. format ) ) ;
170169 render_layer. set_framebuffer_only ( framebuffer_only) ;
171- render_layer. set_presents_with_transaction ( self . present_with_transaction ) ;
172170 // opt-in to Metal EDR
173171 // EDR potentially more power used in display and more bandwidth, memory footprint.
174172 let wants_edr = config. format == wgt:: TextureFormat :: Rgba16Float ;
@@ -224,7 +222,7 @@ impl crate::Surface for super::Surface {
224222 } ,
225223 } ,
226224 drawable,
227- present_with_transaction : self . present_with_transaction ,
225+ present_with_transaction : render_layer . presents_with_transaction ( ) ,
228226 } ;
229227
230228 Ok ( Some ( crate :: AcquiredSurfaceTexture {
You can’t perform that action at this time.
0 commit comments