render: hide graphics API behind traits
This commit is contained in:
parent
d650b3375d
commit
24e410a5b5
40 changed files with 601 additions and 246 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use {
|
||||
crate::{
|
||||
client::{Client, ClientError},
|
||||
gfx_apis::gl::RenderContext,
|
||||
gfx_api::GfxContext,
|
||||
leaks::Tracker,
|
||||
object::Object,
|
||||
utils::{
|
||||
|
|
@ -21,10 +21,10 @@ pub struct JayRenderCtx {
|
|||
}
|
||||
|
||||
impl JayRenderCtx {
|
||||
pub fn send_render_ctx(&self, ctx: Option<&Rc<RenderContext>>) {
|
||||
pub fn send_render_ctx(&self, ctx: Option<Rc<dyn GfxContext>>) {
|
||||
let mut fd = None;
|
||||
if let Some(ctx) = ctx {
|
||||
match ctx.gbm.drm.dup_render() {
|
||||
match ctx.gbm().drm.dup_render() {
|
||||
Ok(d) => fd = Some(d.fd().clone()),
|
||||
Err(e) => {
|
||||
log::error!("Could not dup drm fd: {}", ErrorFmt(e));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue