Scale QPainter x11 windowed backend
ClosedPublic

Authored by davidedmundson on Nov 25 2016, 10:19 AM.

Diff Detail

Repository
R108 KWin
Lint
No Linters Available
Unit
No Unit Test Coverage
davidedmundson retitled this revision from to Scale QPainter x11 windowed backend.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: KWin. · View Herald TranscriptNov 25 2016, 10:19 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
graesslin accepted this revision.Nov 25 2016, 2:10 PM
graesslin added a reviewer: graesslin.
This revision is now accepted and ready to land.Nov 25 2016, 2:10 PM
davidedmundson edited edge metadata.

Add unit test

Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptDec 1 2016, 6:17 PM
graesslin requested changes to this revision.Dec 9 2016, 6:22 PM
graesslin edited edge metadata.
graesslin added inline comments.
autotests/integration/scene_qpainter_test.cpp
199

you don't need to do the Test::setupWaylandConnection in the test, that's part of the init()

202–203

the idea of the Test::createShellSurface variant returning a QObject is to have a test_data() with the two supported modes, so that we test both WlShell and XdgShellUnstableV5. You can compare with other tests.

If you want to only test WlShell there is a simplified setup method returning a ShellSurface instead of QObject.

230–231

why are you saving to the tmp directory?

This revision now requires changes to proceed.Dec 9 2016, 6:22 PM
autotests/integration/scene_qpainter_test.cpp
202–203

I don't really need a shell surface at all, I can just remove this.

davidedmundson edited edge metadata.
davidedmundson marked 3 inline comments as done.

MG's comments

Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptDec 20 2016, 12:02 AM
graesslin added inline comments.Dec 20 2016, 4:22 PM
autotests/integration/scene_qpainter_test.cpp
202–203

the test is called "testWindowScaled", but doesn't create a window. I'm slightly confused.

davidedmundson added inline comments.Dec 20 2016, 4:38 PM
autotests/integration/scene_qpainter_test.cpp
202–203

It creates a surface on line 200.

What's the difference between a top level mapped surface and a window?

graesslin added inline comments.Dec 20 2016, 5:40 PM
autotests/integration/scene_qpainter_test.cpp
202–203

A surface is something you can attach a buffer to. It's not a window but a wrapper for anything which might need a buffer. E.g. a cursor image. That's what you use in this test.

You can create a window from a surface by creating a wl_shell or xgd_shell surface (note it's also called a surface) from it. This will on KWin side then create a ShellClient which represents a window. And I think that's what you want to test as that's what needs to be scaled.

davidedmundson edited edge metadata.

Fix autotest

Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptDec 21 2016, 3:24 PM
davidedmundson added inline comments.Dec 21 2016, 3:25 PM
autotests/integration/scene_qpainter_test.cpp
202–203

yeah, sorry. I got confused. You were right.

graesslin accepted this revision.Dec 21 2016, 7:19 PM
graesslin edited edge metadata.
This revision is now accepted and ready to land.Dec 21 2016, 7:19 PM
This revision was automatically updated to reflect the committed changes.