Skip to content

Commit

Permalink
fmt and imports on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
mikayla-maki committed Feb 16, 2024
1 parent 18838de commit d718264
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion crates/gpui/src/platform/blade/blade_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -723,4 +723,4 @@ impl BladeRenderer {
self.wait_for_gpu();
self.last_sync_point = Some(sync_point);
}
}
}
12 changes: 6 additions & 6 deletions crates/gpui/src/platform/mac/metal_renderer.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use super::metal_atlas::MetalAtlas;
use crate::{
platform::mac::ns_string, point, size, AtlasTextureId, AtlasTextureKind, AtlasTile, Bounds,
ContentMask, DevicePixels, Hsla, MonochromeSprite, Path, PathId, PathVertex,
PolychromeSprite, PrimitiveBatch, Quad, ScaledPixels, Scene, Shadow, Size, Surface, Underline,
point, size, AtlasTextureId, AtlasTextureKind, AtlasTile, Bounds, ContentMask, DevicePixels,
Hsla, MonochromeSprite, Path, PathId, PathVertex, PolychromeSprite, PrimitiveBatch, Quad,
ScaledPixels, Scene, Shadow, Size, Surface, Underline,
};
use super::metal_atlas::MetalAtlas;
use block::ConcreteBlock;
use cocoa::{
base::{nil, NO, YES},
foundation::{NSDictionary, NSUInteger},
base::{NO, YES},
foundation::NSUInteger,
quartzcore::AutoresizingMask,
};
use collections::HashMap;
Expand Down
19 changes: 13 additions & 6 deletions crates/gpui/src/platform/mac/window.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{global_bounds_from_ns_rect, ns_string, MacDisplay, NSRange, renderer};
use super::{global_bounds_from_ns_rect, ns_string, renderer, MacDisplay, NSRange};
use crate::{
global_bounds_to_ns_rect, platform::PlatformInputHandler, point, px, size, AnyWindowHandle,
Bounds, DisplayLink, ExternalPaths, FileDropEvent, ForegroundExecutor, GlobalPixels,
Expand Down Expand Up @@ -477,7 +477,6 @@ impl MacWindowState {

unsafe impl Send for MacWindowState {}


pub(crate) struct MacWindow(Arc<Mutex<MacWindowState>>);

impl MacWindow {
Expand Down Expand Up @@ -556,7 +555,10 @@ impl MacWindow {
WindowBounds::Fixed(bounds) => global_bounds_to_ns_rect(bounds),
};
let scale = get_scale_factor(native_window);
size(bounds.size.width as f32 * scale, bounds.size.height as f32 * scale)
size(
bounds.size.width as f32 * scale,
bounds.size.height as f32 * scale,
)
};

let window = Self(Arc::new(Mutex::new(MacWindowState {
Expand All @@ -565,7 +567,12 @@ impl MacWindow {
native_window,
native_view: NonNull::new_unchecked(native_view),
display_link: None,
renderer: renderer::new_renderer(renderer_context, native_window as *mut _, native_view as *mut _, window_size),
renderer: renderer::new_renderer(
renderer_context,
native_window as *mut _,
native_view as *mut _,
window_size,
),
kind: options.kind,
request_frame_callback: None,
event_callback: None,
Expand Down Expand Up @@ -1062,10 +1069,10 @@ impl PlatformWindow for MacWindow {
);
let _: () = msg_send![layer, setDeveloperHUDProperties: hud_properties];
} else {
let _: () = msg_send![layer, setDeveloperHUDProperties: NSDictionary::dictionary(nil)];
let _: () =
msg_send![layer, setDeveloperHUDProperties: NSDictionary::dictionary(nil)];
}
}

}
}

Expand Down

0 comments on commit d718264

Please sign in to comment.