render: remove supports_external_only
This commit is contained in:
parent
1500b10de3
commit
283774ae4c
10 changed files with 108 additions and 58 deletions
|
|
@ -110,7 +110,7 @@ impl ZwpLinuxBufferParamsV1 {
|
|||
Some(m) => m,
|
||||
_ => return Err(ZwpLinuxBufferParamsV1Error::NoPlanes),
|
||||
};
|
||||
if !format.modifiers.contains_key(&modifier) {
|
||||
if !format.modifiers.contains(&modifier) {
|
||||
return Err(ZwpLinuxBufferParamsV1Error::InvalidModifier(modifier));
|
||||
}
|
||||
let mut dmabuf = DmaBuf {
|
||||
|
|
|
|||
|
|
@ -42,16 +42,10 @@ impl ZwpLinuxDmabufV1Global {
|
|||
if let Some(ctx) = client.state.render_ctx.get() {
|
||||
let formats = ctx.formats();
|
||||
for format in formats.values() {
|
||||
if format.implicit_external_only && !ctx.supports_external_texture() {
|
||||
continue;
|
||||
}
|
||||
obj.send_format(format.format.drm);
|
||||
if version >= MODIFIERS_SINCE_VERSION {
|
||||
for modifier in format.modifiers.values() {
|
||||
if modifier.external_only && !ctx.supports_external_texture() {
|
||||
continue;
|
||||
}
|
||||
obj.send_modifier(format.format.drm, modifier.modifier);
|
||||
for &modifier in &format.modifiers {
|
||||
obj.send_modifier(format.format.drm, modifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue