<table><tr><td style="">davidedmundson requested changes to this revision.<br />davidedmundson added a comment.<br />This revision now requires changes to proceed.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D26311">View Revision</a></tr></table><br /><div><div><p>Good start, the general approach is ok, but it needs a little tweak.</p>

<hr class="remarkup-hr" />

<p>I don't like OutputDeviceInterface::setLogicalSize.</p>

<p>Currently we have a pixel size and a scale, which gives us the logical size.<br />
By adding an explicitly setLogicalSize we have this 3 way binding loop that is very confusing.</p>

<p>Having an explicitly set logical size with a scale right now would break that glViewport, and it's semantically confusing as to what the compositor view size is.</p>

<hr class="remarkup-hr" />

<p>I think all of this can be remedied if we change the output device method to be<br />
OutputDevice::setVirtualMode(QSize)</p>

<p>Which acts as a clip rect for where we render the plane as you have here, then have geometry() can use that instead of pixelSize.</p>

<p>Then scale/positioning etc. will all just work intuitively without extra semantics, egl_gbm_backend.cpp wouldn't need changing.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D26311">https://phabricator.kde.org/D26311</a></div></div><br /><div><strong>To: </strong>romangg, KWin, davidedmundson<br /><strong>Cc: </strong>davidedmundson, kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, zachus, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>