Don't silently error if damage is sent before buffer
ClosedPublic

Authored by davidedmundson on Oct 2 2018, 11:41 PM.

Details

Summary

Firefox sends

wl_surface@37.damage(0, 0, 808, 622)
wl_surface@37.attach(wl_buffer@34, 0, 0)

Which we silently treat as an error.

There's nothing in the spec to forbid this. The only thing that matters
is the state on commit. This moves a check there.

CCBUG: 397834

Test Plan

Had a debug in there which was being activated
Gets firefox slightly further (but not complete)

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Oct 2 2018, 11:41 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptOct 2 2018, 11:41 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Oct 2 2018, 11:41 PM
romangg requested changes to this revision.Oct 2 2018, 11:55 PM
romangg added a subscriber: romangg.
romangg added inline comments.
src/server/surface_interface.cpp
460

Unrelated change. Or split the whole case distinction directly up into:

if (target->buffer) {
    if (!target->damage.isEmpty()) {
        ...
    }
} else {
    subSurfaceIsMapped = false;
    emit q->unmapped();
}

Maybe separate patch.

This revision now requires changes to proceed.Oct 2 2018, 11:55 PM

Leave useless code in

romangg accepted this revision.Oct 3 2018, 10:38 PM

For 5.52.

This revision is now accepted and ready to land.Oct 3 2018, 10:38 PM
This revision was automatically updated to reflect the committed changes.