Home Explore Blog CI



5f05fa3919535d29566bbb9db1600fdc8c61bcf1d4a6aac5000000020003f6d1.png

Extracted Text
zed main telemetry.rs metal_renderer.rs settings.json -/.config/zed crates/gpui/src/platform/mac/metal_renderer.rs impl MetalRenderer fn draw_primitives 370 371 } 372 } 373 } 374 375 376 fn draw_primitives( 377 &mut self, 378 scene: &Scene, 379 instance_buffer: &mut InstanceBuffer, 380 drawable: &metal:: MetalDrawableRef, 381 viewport_size: Size<DevicePixels>, 382 ) Result<metal:: CommandBuffer> { 383 let command_queue = self.command_queue.clone(); 384 let command_buffer = command_queue.new_command_buffer(); 385 let mut instance_offset = 0; 386 387 let Some (path_tiles) = self.rasterize_paths( 388 scene.paths(), 389 instance_buffer, 390 &mut instance_offset, 391 command_buffer, 392 ) else { 393 return Err(anyhow! ("failed to rasterize {} paths", scene.paths().len())); 394 }; 395 396 let render_pass_descriptor = metal:: RenderPassDescriptor:: new(); + 397 let color_attachment render_pass_descriptor 398 .color_attachments() 399 .object_at(0) 400 .unwrap(); 401 402 color_attachment.set_texture (Some (drawable.texture())); 403 color_attachment.set_load_action (metal:: MTLLoadAction:: Clear); 404 color_attachment.set_store_action(metal:: MTLStoreAction:: Store); 405 let alpha if self.layer.is_opaque() { 1. } else { 0. }; 406 color_attachment.set_clear_color(metal:: MTLClearColor:: new(0., 0., 0., alpha)); New Context History QIS Search... Polish literature recommendations Zed Editor Advantages Montreal Tourist Attractions a minute ago 1 minute ago 1 minute ago
Explanation
This image depicts a code editor, specifically the Zed editor, displaying Rust code. The code focuses on Metal rendering, a low-level graphics API, with functions for drawing primitives and setting up render pass descriptors. The right sidebar shows a history panel, listing previous search contexts like 'Polish literature recommendations' and 'Montreal Tourist Attractions'.