1
0
Fork 0
forked from wry/wry

gfx: attach color descriptions

This commit is contained in:
Julian Orth 2025-03-01 14:06:42 +01:00
parent 82085a3858
commit a174881138
24 changed files with 291 additions and 62 deletions

View file

@ -1,6 +1,7 @@
use {
crate::{
client::{Client, ClientError},
cmm::cmm_description::ColorDescription,
gfx_api::{
AcquireSync, AsyncShmGfxTextureCallback, BufferResv, GfxError, GfxFramebuffer,
GfxTexture, ReleaseSync, STAGING_DOWNLOAD, SyncFile,
@ -199,6 +200,7 @@ impl ExtImageCopyCaptureFrameV1 {
self: &Rc<Self>,
on: &OutputNode,
texture: &Rc<dyn GfxTexture>,
cd: &Rc<ColorDescription>,
resv: Option<&Rc<dyn BufferResv>>,
acquire_sync: &AcquireSync,
release_sync: ReleaseSync,
@ -215,10 +217,12 @@ impl ExtImageCopyCaptureFrameV1 {
resv,
acquire_sync,
release_sync,
cd,
&fb,
aq,
re,
jay_config::video::Transform::None,
self.client.state.color_manager.srgb_srgb(),
on.global.pos.get(),
render_hardware_cursors,
x_off,
@ -236,6 +240,7 @@ impl ExtImageCopyCaptureFrameV1 {
fb.render_node(
aq,
re,
self.client.state.color_manager.srgb_srgb(),
node,
&self.client.state,
Some(node.node_absolute_position()),
@ -246,6 +251,7 @@ impl ExtImageCopyCaptureFrameV1 {
false,
jay_config::video::Transform::None,
None,
self.client.state.color_manager.srgb_linear(),
)
});
}

View file

@ -1,6 +1,7 @@
use {
crate::{
client::{Client, ClientError},
cmm::cmm_description::ColorDescription,
format::{FORMATS, Format},
gfx_api::{
AcquireSync, BufferResv, GfxInternalFramebuffer, GfxStagingBuffer, GfxTexture,
@ -213,6 +214,7 @@ impl ExtImageCopyCaptureSessionV1 {
self: &Rc<Self>,
on: &OutputNode,
texture: &Rc<dyn GfxTexture>,
cd: &Rc<ColorDescription>,
resv: Option<&Rc<dyn BufferResv>>,
acquire_sync: &AcquireSync,
release_sync: ReleaseSync,
@ -226,6 +228,7 @@ impl ExtImageCopyCaptureSessionV1 {
frame.copy_texture(
on,
texture,
cd,
resv,
acquire_sync,
release_sync,

View file

@ -2,6 +2,7 @@ use {
crate::{
allocator::{AllocatorError, BO_USE_LINEAR, BO_USE_RENDERING, BufferObject},
client::{Client, ClientError},
cmm::cmm_description::ColorDescription,
format::XRGB8888,
gfx_api::{
AcquireSync, BufferResv, GfxContext, GfxError, GfxFramebuffer, GfxTexture, ReleaseSync,
@ -193,6 +194,7 @@ impl JayScreencast {
let res = buffer.fb.render_node(
AcquireSync::Implicit,
ReleaseSync::Implicit,
self.client.state.color_manager.srgb_srgb(),
tl.tl_as_node(),
&self.client.state,
Some(tl.node_absolute_position()),
@ -203,6 +205,7 @@ impl JayScreencast {
false,
Transform::None,
None,
self.client.state.color_manager.srgb_linear(),
);
match res {
Ok(_) => {
@ -304,6 +307,7 @@ impl JayScreencast {
&self,
on: &OutputNode,
texture: &Rc<dyn GfxTexture>,
cd: &Rc<ColorDescription>,
resv: Option<&Rc<dyn BufferResv>>,
acquire_sync: &AcquireSync,
release_sync: ReleaseSync,
@ -332,10 +336,12 @@ impl JayScreencast {
resv,
acquire_sync,
release_sync,
cd,
&buffer.fb,
AcquireSync::Implicit,
ReleaseSync::Implicit,
Transform::None,
self.client.state.color_manager.srgb_srgb(),
on.global.pos.get(),
render_hardware_cursors,
x_off,