mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
Clean up
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
e5ffe43bb6
commit
1f647ef24c
@ -96,7 +96,6 @@ impl Renderer {
|
||||
let buffer_contents = self.instances.contents() as *mut shaders::GPUIQuad;
|
||||
for quad_batch in layer.quads().chunks(batch_size) {
|
||||
for (ix, quad) in quad_batch.iter().enumerate() {
|
||||
log::info!("render {} {:?}", ix, quad);
|
||||
unsafe {
|
||||
*(buffer_contents.offset(ix as isize)) = shaders::GPUIQuad {
|
||||
origin: quad.bounds.origin().to_float2(),
|
||||
|
@ -90,11 +90,12 @@ unsafe fn build_classes() {
|
||||
handle_view_event as extern "C" fn(&Object, Sel, id),
|
||||
);
|
||||
|
||||
decl.add_protocol(Protocol::get("CALayerDelegate").unwrap());
|
||||
decl.add_method(
|
||||
sel!(makeBackingLayer),
|
||||
make_backing_layer as extern "C" fn(&Object, Sel) -> id,
|
||||
);
|
||||
|
||||
decl.add_protocol(Protocol::get("CALayerDelegate").unwrap());
|
||||
decl.add_method(
|
||||
sel!(viewDidChangeBackingProperties),
|
||||
view_did_change_backing_properties as extern "C" fn(&Object, Sel),
|
||||
@ -407,7 +408,6 @@ extern "C" fn set_frame_size(this: &Object, _: Sel, size: NSSize) {
|
||||
}
|
||||
|
||||
extern "C" fn display_layer(this: &Object, _: Sel, _: id) {
|
||||
log::info!("display layer");
|
||||
unsafe {
|
||||
let window_state = get_window_state(this);
|
||||
let mut window_state = window_state.as_ref().borrow_mut();
|
||||
@ -446,8 +446,6 @@ extern "C" fn display_layer(this: &Object, _: Sel, _: id) {
|
||||
command_buffer.commit();
|
||||
command_buffer.wait_until_completed();
|
||||
drawable.present();
|
||||
|
||||
log::info!("present");
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user