[server] Introduce mapped() signal
ClosedPublic

Authored by zzag on Apr 28 2020, 1:21 PM.

Details

Reviewers
davidedmundson
apol
Group Reviewers
KWin
Summary

In KWin, we need to know when a sub-surface becomes mapped or unmapped
so we can generate or filter out window quads for the sub-surface.

Diff Detail

Repository
R127 KWayland
Branch
introduce-mapped-signal
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 26046
Build 26064: arc lint + arc unit
zzag created this revision.Apr 28 2020, 1:21 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 28 2020, 1:21 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
zzag requested review of this revision.Apr 28 2020, 1:21 PM
davidedmundson accepted this revision.Apr 28 2020, 1:57 PM
This revision is now accepted and ready to land.Apr 28 2020, 1:57 PM
apol added a subscriber: apol.Apr 28 2020, 5:59 PM

+1

src/server/surface_interface.cpp
333

Using != would probably be more readable and accurate (we're don't need it to be bitwise, we're assuming bool changes it to 00001 or 00000).

zzag updated this revision to Diff 81453.Apr 28 2020, 6:13 PM

Check whether the attached buffer flip-flopped between non-null and null only when bufferChanged is true.

zzag added inline comments.Apr 28 2020, 6:23 PM
src/server/surface_interface.cpp
333

We can't use != because mapped() will be emitted each time a new buffer is attached to the surface.

apol added inline comments.Apr 28 2020, 6:29 PM
src/server/surface_interface.cpp
333

I don't understand, ^ and != are logically equivalent, ^ is the bitwise counterpart.

Am I missing something?

zzag updated this revision to Diff 81456.Apr 28 2020, 6:38 PM
zzag marked 2 inline comments as done.

Use !=

zzag added inline comments.Apr 28 2020, 6:38 PM
src/server/surface_interface.cpp
333

Oh, I thought you suggested to do source->buffer != target->buffer.

zzag marked an inline comment as done.Apr 28 2020, 6:38 PM
apol accepted this revision.Apr 29 2020, 2:51 PM
zzag closed this revision.May 4 2020, 12:09 PM