render: compute image width/height in single function call
This commit is contained in:
parent
db9c382002
commit
4ba8550da8
7 changed files with 18 additions and 18 deletions
|
|
@ -396,17 +396,18 @@ impl MetalConnector {
|
|||
buffer.dev_fb.copy_texture(&self.state, tex, 0, 0, true);
|
||||
}
|
||||
}
|
||||
let (width, height) = buffer.dev_fb.size();
|
||||
changes.change_object(plane.id, |c| {
|
||||
c.change(plane.fb_id, buffer.drm.id().0 as _);
|
||||
c.change(plane.crtc_id.id, crtc.id.0 as _);
|
||||
c.change(plane.crtc_x.id, self.cursor_x.get() as _);
|
||||
c.change(plane.crtc_y.id, self.cursor_y.get() as _);
|
||||
c.change(plane.crtc_w.id, buffer.render_tex.width() as _);
|
||||
c.change(plane.crtc_h.id, buffer.render_tex.height() as _);
|
||||
c.change(plane.crtc_w.id, width as _);
|
||||
c.change(plane.crtc_h.id, height as _);
|
||||
c.change(plane.src_x.id, 0);
|
||||
c.change(plane.src_y.id, 0);
|
||||
c.change(plane.src_w.id, (buffer.render_tex.width() as u64) << 16);
|
||||
c.change(plane.src_h.id, (buffer.render_tex.height() as u64) << 16);
|
||||
c.change(plane.src_w.id, (width as u64) << 16);
|
||||
c.change(plane.src_h.id, (height as u64) << 16);
|
||||
});
|
||||
} else {
|
||||
changes.change_object(plane.id, |c| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue