1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Replace Arc<Context> with struct CtxRef

This commit is contained in:
Emil Ernerfeldt
2020-12-19 14:48:04 +01:00
parent ce0ea74c9f
commit 01c65b0dcb
24 changed files with 286 additions and 300 deletions

View File

@@ -8,7 +8,7 @@ pub use egui::{
// ----------------------------------------------------------------------------
pub struct WebBackend {
ctx: Arc<egui::Context>,
ctx: egui::CtxRef,
painter: webgl::Painter,
previous_frame_time: Option<f32>,
frame_start: Option<f64>,
@@ -17,7 +17,7 @@ pub struct WebBackend {
impl WebBackend {
pub fn new(canvas_id: &str) -> Result<Self, JsValue> {
let ctx = egui::Context::new();
let ctx = egui::CtxRef::default();
load_memory(&ctx);
Ok(Self {
ctx,