mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-09 07:08:07 +02:00
compositor: Remove is_direct from paint node
It's the same as buffer->direct_display essentially 100% of the time, except maybe if someone set weston_direct on a single-pixel-buffer, but that's madness. Just drop it entirely, and let the only existing reader of the variable get it from the buffer directly. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
4ebb06a94f
commit
59e2a111fa
3 changed files with 1 additions and 7 deletions
|
|
@ -213,7 +213,6 @@ maybe_replace_paint_node(struct weston_paint_node *pnode)
|
|||
WESTON_SURFACE_PROTECTION_MODE_ENFORCED &&
|
||||
(recording_censor || unprotected_censor)) {
|
||||
pnode->draw_solid = true;
|
||||
pnode->is_direct = buffer->direct_display;
|
||||
pnode->is_fully_opaque = true;
|
||||
pnode->is_fully_blended = false;
|
||||
pnode->solid = placeholder_color;
|
||||
|
|
@ -226,7 +225,6 @@ maybe_replace_paint_node(struct weston_paint_node *pnode)
|
|||
*/
|
||||
if (pnode->need_hole) {
|
||||
pnode->draw_solid = true;
|
||||
pnode->is_direct = buffer->direct_display;
|
||||
pnode->is_fully_opaque = true;
|
||||
pnode->is_fully_blended = false;
|
||||
pnode->solid = (struct weston_solid_buffer_values) {
|
||||
|
|
@ -237,7 +235,6 @@ maybe_replace_paint_node(struct weston_paint_node *pnode)
|
|||
|
||||
if (buffer->direct_display) {
|
||||
pnode->draw_solid = true;
|
||||
pnode->is_direct = true;
|
||||
pnode->is_fully_opaque = true;
|
||||
pnode->is_fully_blended = false;
|
||||
pnode->solid = placeholder_color;
|
||||
|
|
@ -246,7 +243,6 @@ maybe_replace_paint_node(struct weston_paint_node *pnode)
|
|||
|
||||
if (buffer->type == WESTON_BUFFER_SOLID) {
|
||||
pnode->draw_solid = true;
|
||||
pnode->is_direct = false;
|
||||
pnode->is_fully_opaque = (buffer->solid.a == 1.0f);
|
||||
pnode->is_fully_blended = !pnode->is_fully_opaque;
|
||||
pnode->solid = buffer->solid;
|
||||
|
|
@ -254,7 +250,6 @@ maybe_replace_paint_node(struct weston_paint_node *pnode)
|
|||
}
|
||||
|
||||
pnode->draw_solid = false;
|
||||
pnode->is_direct = false;
|
||||
}
|
||||
|
||||
/* Paint nodes contain filter and transform information that needs to be
|
||||
|
|
|
|||
|
|
@ -723,7 +723,6 @@ struct weston_paint_node {
|
|||
uint32_t try_view_on_plane_failure_reasons;
|
||||
bool is_fully_opaque;
|
||||
bool is_fully_blended;
|
||||
bool is_direct;
|
||||
bool draw_solid;
|
||||
struct weston_solid_buffer_values solid;
|
||||
bool need_hole;
|
||||
|
|
|
|||
|
|
@ -3125,7 +3125,7 @@ vulkan_renderer_attach(struct weston_paint_node *pnode)
|
|||
if (!buffer)
|
||||
goto out;
|
||||
|
||||
if (pnode->is_direct) {
|
||||
if (buffer->direct_display) {
|
||||
attach_direct_display_placeholder(pnode);
|
||||
goto success;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue