mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add clone operation for gfx
This commit is contained in:
parent
e55630fd57
commit
da7efec6a6
1 changed files with 8 additions and 0 deletions
|
|
@ -11,6 +11,14 @@ use crate::service::api::*;
|
|||
pub struct Gfx {
|
||||
conn: xous::CID,
|
||||
}
|
||||
|
||||
impl Clone for Gfx {
|
||||
fn clone(&self) -> Self {
|
||||
REFCOUNT.fetch_add(1, Ordering::Relaxed);
|
||||
Gfx { conn: self.conn }
|
||||
}
|
||||
}
|
||||
|
||||
impl Gfx {
|
||||
pub fn new(xns: &xous_names::XousNames) -> Result<Self, xous::Error> {
|
||||
REFCOUNT.fetch_add(1, Ordering::Relaxed);
|
||||
|
|
|
|||
Loading…
Reference in a new issue