Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
2a8fb619
Commit
2a8fb619
authored
Jul 14, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB/X11: keep SysV segment pointer only
...rather than the whole picture resource structure.
parent
77193c7b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
20 deletions
+23
-20
modules/video_output/xcb/x11.c
modules/video_output/xcb/x11.c
+23
-20
No files found.
modules/video_output/xcb/x11.c
View file @
2a8fb619
...
@@ -74,7 +74,7 @@ struct vout_display_sys_t
...
@@ -74,7 +74,7 @@ struct vout_display_sys_t
uint8_t
depth
;
/* useful bits per pixel */
uint8_t
depth
;
/* useful bits per pixel */
picture_pool_t
*
pool
;
/* picture pool */
picture_pool_t
*
pool
;
/* picture pool */
picture_resource_t
resource
[
MAX_PICTURES
];
void
*
segments
[
MAX_PICTURES
];
};
};
static
picture_pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
static
picture_pool_t
*
Pool
(
vout_display_t
*
,
unsigned
);
...
@@ -379,29 +379,36 @@ static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count)
...
@@ -379,29 +379,36 @@ static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count)
return
NULL
;
return
NULL
;
assert
(
pic
->
i_planes
==
1
);
assert
(
pic
->
i_planes
==
1
);
memset
(
sys
->
resource
,
0
,
sizeof
(
sys
->
resource
));
unsigned
count
;
unsigned
count
;
picture_t
*
pic_array
[
MAX_PICTURES
];
picture_t
*
pic_array
[
MAX_PICTURES
];
for
(
count
=
0
;
count
<
MAX_PICTURES
;
count
++
)
sys
->
segments
[
count
]
=
NULL
;
for
(
count
=
0
;
count
<
MAX_PICTURES
;
count
++
)
for
(
count
=
0
;
count
<
MAX_PICTURES
;
count
++
)
{
{
picture_resource_t
*
res
=
&
sys
->
resource
[
count
];
picture_resource_t
res
=
{
.
p
=
{
[
0
]
=
{
.
i_lines
=
pic
->
p
->
i_lines
,
.
i_pitch
=
pic
->
p
->
i_pitch
,
},
},
};
xcb_shm_seg_t
seg
=
(
sys
->
seg_base
!=
0
)
?
(
sys
->
seg_base
+
count
)
:
0
;
res
->
p
->
i_lines
=
pic
->
p
->
i_lines
;
if
(
XCB_pictures_Alloc
(
vd
,
&
res
,
res
.
p
->
i_pitch
*
res
.
p
->
i_lines
,
res
->
p
->
i_pitch
=
pic
->
p
->
i_pitch
;
sys
->
conn
,
seg
))
if
(
XCB_pictures_Alloc
(
vd
,
res
,
res
->
p
->
i_pitch
*
res
->
p
->
i_lines
,
sys
->
conn
,
sys
->
seg_base
?
(
sys
->
seg_base
+
count
)
:
0
))
break
;
break
;
pic_array
[
count
]
=
picture_NewFromResource
(
&
vd
->
fmt
,
res
);
pic_array
[
count
]
=
picture_NewFromResource
(
&
vd
->
fmt
,
&
res
);
if
(
!
pic_array
[
count
])
if
(
!
pic_array
[
count
])
{
{
XCB_pictures_Free
(
res
->
p
->
p_pixels
);
XCB_pictures_Free
(
res
.
p
[
0
].
p_pixels
);
if
(
res
->
p_sys
->
segment
)
if
(
seg
!=
0
)
xcb_shm_detach
(
sys
->
conn
,
res
->
p_sys
->
segment
);
xcb_shm_detach
(
sys
->
conn
,
seg
);
memset
(
res
,
0
,
sizeof
(
*
res
));
break
;
break
;
}
}
sys
->
segments
[
count
]
=
res
.
p
[
0
].
p_pixels
;
}
}
picture_Release
(
pic
);
picture_Release
(
pic
);
...
@@ -574,13 +581,9 @@ static void ResetPictures (vout_display_t *vd)
...
@@ -574,13 +581,9 @@ static void ResetPictures (vout_display_t *vd)
for
(
unsigned
i
=
0
;
i
<
MAX_PICTURES
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
MAX_PICTURES
;
i
++
)
{
{
picture_resource_t
*
res
=
&
sys
->
resource
[
i
];
XCB_pictures_Free
(
sys
->
segments
[
i
]);
if
(
sys
->
seg_base
!=
0
)
if
(
!
res
->
p
->
p_pixels
)
xcb_shm_detach
(
sys
->
conn
,
sys
->
seg_base
+
i
);
break
;
XCB_pictures_Free
(
res
->
p
->
p_pixels
);
if
(
res
->
p_sys
->
segment
)
xcb_shm_detach
(
sys
->
conn
,
res
->
p_sys
->
segment
);
}
}
picture_pool_Delete
(
sys
->
pool
);
picture_pool_Delete
(
sys
->
pool
);
sys
->
pool
=
NULL
;
sys
->
pool
=
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment