text: use udmabuf for text upload
This commit is contained in:
parent
5758e16658
commit
c008b7ea35
12 changed files with 301 additions and 80 deletions
|
|
@ -725,8 +725,7 @@ impl ContainerNode {
|
|||
let title = child.title.borrow_mut();
|
||||
let tt = &mut *child.title_tex.borrow_mut();
|
||||
for (scale, _) in scales.iter() {
|
||||
let tex = tt
|
||||
.get_or_insert_with(*scale, || TextTexture::new(&self.state.cpu_worker, &ctx));
|
||||
let tex = tt.get_or_insert_with(*scale, || TextTexture::new(&self.state, &ctx));
|
||||
let mut th = th;
|
||||
let mut scalef = None;
|
||||
let mut width = rect.width();
|
||||
|
|
|
|||
|
|
@ -215,8 +215,7 @@ impl FloatNode {
|
|||
let tr = self.title_rect.get();
|
||||
let tt = &mut *self.title_textures.borrow_mut();
|
||||
for (scale, _) in scales.iter() {
|
||||
let tex =
|
||||
tt.get_or_insert_with(*scale, || TextTexture::new(&self.state.cpu_worker, &ctx));
|
||||
let tex = tt.get_or_insert_with(*scale, || TextTexture::new(&self.state, &ctx));
|
||||
let mut th = tr.height();
|
||||
let mut scalef = None;
|
||||
let mut width = tr.width();
|
||||
|
|
|
|||
|
|
@ -530,7 +530,7 @@ impl OutputNode {
|
|||
let active_id = self.workspace.get().map(|w| w.id);
|
||||
for ws in self.workspaces.iter() {
|
||||
let tex = &mut *ws.title_texture.borrow_mut();
|
||||
let tex = tex.get_or_insert_with(|| TextTexture::new(&self.state.cpu_worker, &ctx));
|
||||
let tex = tex.get_or_insert_with(|| TextTexture::new(&self.state, &ctx));
|
||||
let tc = match active_id == Some(ws.id) {
|
||||
true => theme.colors.focused_title_text.get(),
|
||||
false => theme.colors.unfocused_title_text.get(),
|
||||
|
|
@ -548,7 +548,7 @@ impl OutputNode {
|
|||
let mut rd = self.render_data.borrow_mut();
|
||||
let tex = rd.status.get_or_insert_with(|| OutputStatus {
|
||||
tex_x: 0,
|
||||
tex: TextTexture::new(&self.state.cpu_worker, &ctx),
|
||||
tex: TextTexture::new(&self.state, &ctx),
|
||||
});
|
||||
let status = self.status.get();
|
||||
let tc = self.state.theme.colors.bar_text.get();
|
||||
|
|
|
|||
|
|
@ -111,8 +111,7 @@ impl PlaceholderNode {
|
|||
let rect = self.toplevel.pos.get();
|
||||
let mut textures = self.textures.borrow_mut();
|
||||
for (scale, _) in scales.iter() {
|
||||
let tex = textures
|
||||
.get_or_insert_with(*scale, || TextTexture::new(&self.state.cpu_worker, &ctx));
|
||||
let tex = textures.get_or_insert_with(*scale, || TextTexture::new(&self.state, &ctx));
|
||||
let mut width = rect.width();
|
||||
let mut height = rect.height();
|
||||
if *scale != 1 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue