sync
This commit is contained in:
parent
ae324eef15
commit
2e7e7f0a9f
@ -144,7 +144,7 @@ impl MapTile {
|
||||
(origin.lon() as f64..rb.lon() as f64).into(),
|
||||
(origin.lat() as f64..rb.lat() as f64).into(),
|
||||
);
|
||||
let result = Target::new(TargetType::Mem(result), 256.0, 256.0, bounds, None, None);
|
||||
let result = Target::new(TargetType::Mem(result), 256.0, 256.0, bounds, None,None);
|
||||
let cache = cache.lock().unwrap();
|
||||
cache.insert(tile, Arc::new(std::sync::Mutex::new(result)));
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ where
|
||||
((d1_start, d1_end).into(), (d2_start, d2_end).into()),
|
||||
// Some(thumbnail_tex),
|
||||
None,
|
||||
None
|
||||
None,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,10 +95,11 @@ impl ObjectSubclass for Render {
|
||||
}
|
||||
|
||||
impl ObjectImpl for Render {
|
||||
|
||||
fn constructed(&self) {
|
||||
self.parent_constructed();
|
||||
let area = self.obj();
|
||||
// area.set_has_stencil_buffer(true);
|
||||
area.set_has_stencil_buffer(true);
|
||||
}
|
||||
|
||||
fn properties() -> &'static [glib::ParamSpec] {
|
||||
@ -114,7 +115,16 @@ impl ObjectImpl for Render {
|
||||
}
|
||||
}
|
||||
|
||||
impl WidgetImpl for Render {}
|
||||
impl WidgetImpl for Render {
|
||||
fn realize(&self) {
|
||||
self.parent_realize();
|
||||
}
|
||||
fn unrealize(&self) {
|
||||
self.obj().make_current();
|
||||
self.canvas.replace(None);
|
||||
self.parent_unrealize();
|
||||
}
|
||||
}
|
||||
|
||||
impl GLAreaImpl for Render {
|
||||
fn resize(&self, width: i32, height: i32) {
|
||||
|
||||
@ -251,7 +251,7 @@ impl Render {
|
||||
height,
|
||||
bounds,
|
||||
None,
|
||||
None,
|
||||
None
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user