renderer: add missing sync ops
This commit is contained in:
parent
db7520bffa
commit
1189827b8b
3 changed files with 12 additions and 7 deletions
|
|
@ -3,7 +3,6 @@ use {
|
|||
async_engine::AsyncEngine,
|
||||
cmm::cmm_manager::ColorManager,
|
||||
fixed::Fixed,
|
||||
gfx_api::GfxApiOpt,
|
||||
ifs::wl_output::WlOutputGlobal,
|
||||
rect::{Rect, Region},
|
||||
renderer::renderer_base::RendererBase,
|
||||
|
|
@ -164,7 +163,7 @@ impl DamageVisualizer {
|
|||
let dx = -cursor_rect.x1();
|
||||
let dy = -cursor_rect.y1();
|
||||
let decay_millis = decay.as_millis() as u64 as f32;
|
||||
renderer.ops.push(GfxApiOpt::Sync);
|
||||
renderer.sync();
|
||||
let srgb = &self.color_manager.srgb_gamma22().linear;
|
||||
for entry in entries.iter().rev() {
|
||||
let region = Region::new(entry.rect);
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ impl Renderer<'_> {
|
|||
let c = theme.colors.bar_background.get();
|
||||
self.base
|
||||
.fill_boxes3(slice::from_ref(&bar_bg), &c, None, srgb, x, y, true);
|
||||
self.base.sync();
|
||||
let rd = output.render_data.borrow_mut();
|
||||
if let Some(aw) = &rd.active_workspace {
|
||||
let c = match aw.captured {
|
||||
|
|
@ -117,6 +118,7 @@ impl Renderer<'_> {
|
|||
let c = theme.colors.captured_unfocused_title_background.get();
|
||||
self.base
|
||||
.fill_boxes2(&rd.captured_inactive_workspaces, &c, srgb, x, y);
|
||||
self.base.sync();
|
||||
let c = theme.colors.attention_requested_background.get();
|
||||
self.base
|
||||
.fill_boxes2(&rd.attention_requested_workspaces, &c, srgb, x, y);
|
||||
|
|
@ -180,7 +182,7 @@ impl Renderer<'_> {
|
|||
($stack:expr) => {
|
||||
for stacked in $stack.iter() {
|
||||
if stacked.node_visible() {
|
||||
self.base.ops.push(GfxApiOpt::Sync);
|
||||
self.base.sync();
|
||||
let pos = stacked.node_absolute_position();
|
||||
if pos.intersects(&opos) {
|
||||
let (x, y) = opos.translate(pos.x1(), pos.y1());
|
||||
|
|
@ -201,7 +203,7 @@ impl Renderer<'_> {
|
|||
{
|
||||
let color = self.state.theme.colors.highlight.get();
|
||||
let bounds = output.workspace_rect_rel.get().move_(x, y);
|
||||
self.base.ops.push(GfxApiOpt::Sync);
|
||||
self.base.sync();
|
||||
self.base.fill_boxes(&[bounds], &color, srgb);
|
||||
}
|
||||
}
|
||||
|
|
@ -366,7 +368,7 @@ impl Renderer<'_> {
|
|||
return;
|
||||
};
|
||||
let color = self.state.theme.colors.highlight.get();
|
||||
self.base.ops.push(GfxApiOpt::Sync);
|
||||
self.base.sync();
|
||||
self.base.fill_scaled_boxes(
|
||||
slice::from_ref(bounds),
|
||||
&color,
|
||||
|
|
@ -377,7 +379,7 @@ impl Renderer<'_> {
|
|||
|
||||
pub fn render_highlight(&mut self, rect: &Rect) {
|
||||
let color = self.state.theme.colors.highlight.get();
|
||||
self.base.ops.push(GfxApiOpt::Sync);
|
||||
self.base.sync();
|
||||
self.base.fill_boxes(
|
||||
slice::from_ref(rect),
|
||||
&color,
|
||||
|
|
@ -488,7 +490,7 @@ impl Renderer<'_> {
|
|||
let color = Color::from_u32_premultiplied(
|
||||
cd.eotf, color[0], color[1], color[2], color[3],
|
||||
);
|
||||
self.base.ops.push(GfxApiOpt::Sync);
|
||||
self.base.sync();
|
||||
self.base
|
||||
.fill_scaled_boxes(&[rect], &color, alpha, &cd.linear);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -227,6 +227,10 @@ impl RendererBase<'_> {
|
|||
cd: cd.clone(),
|
||||
}));
|
||||
}
|
||||
|
||||
pub fn sync(&mut self) {
|
||||
self.ops.push(GfxApiOpt::Sync);
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue