1
0
Fork 0
forked from wry/wry

it: use single-pixel buffer instead of shm

This commit is contained in:
Julian Orth 2024-04-02 10:23:55 +02:00
parent aaed003ec8
commit f562f887f0
17 changed files with 280 additions and 76 deletions

View file

@ -30,6 +30,7 @@ impl TestShm {
&self.formats
}
#[allow(dead_code)]
pub fn create_pool(&self, size: usize) -> Result<Rc<TestShmPool>, TestError> {
let mem = TestMem::new(size)?;
let pool = Rc::new(TestShmPool {
@ -48,6 +49,7 @@ impl TestShm {
Ok(pool)
}
#[allow(dead_code)]
pub fn create_buffer(&self, width: i32, height: i32) -> TestResult<Rc<TestShmBuffer>> {
let pool = self.create_pool((width * height * 4) as _)?;
pool.create_buffer(0, width, height, width * 4, ARGB8888)