Skip to content

Commit

Permalink
Fix wasm build
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Nov 15, 2023
1 parent 1b1be3c commit 4790a64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions crates/eframe/src/web/app_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ impl AppRunner {
platform_output,
textures_delta,
shapes,
pixels_per_point,
viewports,
viewport_commands: _, // TODO(emilk): handle some of the commands, like setting the title and icon
} = full_output;
Expand All @@ -195,9 +196,7 @@ impl AppRunner {

self.handle_platform_output(platform_output);
self.textures_delta.append(textures_delta);
let clipped_primitives = self
.egui_ctx
.tessellate(shapes, self.egui_ctx.pixels_per_point());
let clipped_primitives = self.egui_ctx.tessellate(shapes, pixels_per_point);

{
let app_output = self.frame.take_app_output();
Expand Down
3 changes: 1 addition & 2 deletions crates/egui/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,6 @@ impl ContextImpl {

viewport.frame_state.begin_frame(&viewport.input);

let pixels_per_point = viewport.input.pixels_per_point();

// Ensure we register the background area so panels and background ui can catch clicks:
let screen_rect = viewport.input.screen_rect();
self.memory.areas_mut().set_state(
Expand All @@ -287,6 +285,7 @@ impl ContextImpl {
use crate::frame_state::AccessKitFrameState;
let id = crate::accesskit_root_id();
let mut builder = accesskit::NodeBuilder::new(accesskit::Role::Window);
let pixels_per_point = viewport.input.pixels_per_point();
builder.set_transform(accesskit::Affine::scale(pixels_per_point.into()));
let mut node_builders = IdMap::default();
node_builders.insert(id, builder);
Expand Down

0 comments on commit 4790a64

Please sign in to comment.