Skip to content

Commit

Permalink
Merge branch 'emilk:master' into patch145
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Nov 4, 2024
2 parents e8c7e08 + 5d6a58b commit baa823e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/eframe/src/web/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use super::{
};
use web_sys::EventTarget;

// TODO(emilk): there are more calls to `prevent_default` and `stop_propagaton`
// TODO(emilk): there are more calls to `prevent_default` and `stop_propagation`
// than what is probably needed.

// ------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion crates/eframe/src/web/web_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{epi, App};

use super::{events, text_agent::TextAgent, AppRunner, PanicHandler};

/// This is how `eframe` runs your wepp application
/// This is how `eframe` runs your web application
///
/// This is cheap to clone.
///
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/containers/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ struct ResizeInteraction {
bottom: SideResponse,
}

/// A minitature version of `Response`, for each side of the window.
/// A miniature version of `Response`, for each side of the window.
#[derive(Clone, Copy, Debug, Default)]
struct SideResponse {
hover: bool,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/ui_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{Id, LayerId, Layout, Rect, Sense, Style, UiStackInfo};
#[allow(unused_imports)] // Used for doclinks
use crate::Ui;

/// Build a [`Ui`] as the chlild of another [`Ui`].
/// Build a [`Ui`] as the child of another [`Ui`].
///
/// By default, everything is inherited from the parent,
/// except for `max_rect` which by default is set to
Expand Down
4 changes: 2 additions & 2 deletions crates/egui/src/util/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl<Value, Computer> FrameCache<Value, Computer> {
}

/// Must be called once per frame to clear the cache.
pub fn evice_cache(&mut self) {
pub fn evict_cache(&mut self) {
let current_generation = self.generation;
self.cache.retain(|_key, cached| {
cached.0 == current_generation // only keep those that were used this frame
Expand Down Expand Up @@ -89,7 +89,7 @@ impl<Value: 'static + Send + Sync, Computer: 'static + Send + Sync> CacheTrait
for FrameCache<Value, Computer>
{
fn update(&mut self) {
self.evice_cache();
self.evict_cache();
}

fn len(&self) -> usize {
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/viewport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//! ### Deferred viewports
//! These are created with [`Context::show_viewport_deferred`].
//! Deferred viewports take a closure that is called by the integration at a later time, perhaps multiple times.
//! Deferred viewports are repainted independenantly of the parent viewport.
//! Deferred viewports are repainted independently of the parent viewport.
//! This means communication with them needs to be done via channels, or `Arc/Mutex`.
//!
//! This is the most performant type of child viewport, though a bit more cumbersome to work with compared to immediate viewports.
Expand Down
4 changes: 2 additions & 2 deletions crates/epaint/src/tessellator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2029,8 +2029,8 @@ impl Tessellator {
use rayon::prelude::*;

// We only parallelize large/slow stuff, because each tessellation job
// will allocate a new Mesh, and so it creates a lot of extra memory framentation
// and callocations that is only worth it for large shapes.
// will allocate a new Mesh, and so it creates a lot of extra memory fragmentation
// and allocations that is only worth it for large shapes.
fn should_parallelize(shape: &Shape) -> bool {
match shape {
Shape::Vec(shapes) => 4 < shapes.len() || shapes.iter().any(should_parallelize),
Expand Down

0 comments on commit baa823e

Please sign in to comment.