summaryrefslogtreecommitdiff
path: root/plugins
diff options
authorEleni Maria Stea <elenimaria.stea@canonical.com>2016-07-19 11:55:04 +0300
committerEleni Maria Stea <elenimaria.stea@canonical.com>2016-07-19 11:55:04 +0300
commit9ab365b80c9e1e641fba4bec135a4ad975b0b376 (patch)
tree8bb545f9bdfaf25e1c93b4e890a837f0213c75ef /plugins
parent91d351944ca4ed778b76e1b4a3720bc756175e45 (diff)
paint output
(bzr r4151.1.2)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/unityshell/src/unityshell.cpp20
-rw-r--r--plugins/unityshell/src/unityshell.h2
2 files changed, 11 insertions, 11 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index eae3e412a..fb35b4886 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -863,7 +863,7 @@ void UnityScreen::DamageBlurUpdateRegion(nux::Geometry const& blur_update)
cScreen->damageRegion(CompRegionFromNuxGeo(blur_update));
}
-void UnityScreen::paintDisplay()
+void UnityScreen::paintOutput()
{
CompOutput *output = last_output_;
@@ -884,7 +884,7 @@ void UnityScreen::paintDisplay()
current_draw_binding = old_read_binding;
#endif
- BackgroundEffectHelper::monitor_rect_.Set(0, 0, screen->width(), screen->height());
+ BackgroundEffectHelper::monitor_rect_.Set(0, 0, output->width(), output->height());
// If we have dirty helpers re-copy the backbuffer into a texture
if (dirty_helpers_on_this_frame_)
@@ -909,10 +909,10 @@ void UnityScreen::paintDisplay()
for (CompRect const& rect : blur_region.rects())
{
- int x = nux::Clamp<int>(rect.x(), 0, screen->width());
- int y = nux::Clamp<int>(screen->height() - rect.y2(), 0, screen->height());
- int width = std::min<int>(screen->width() - rect.x(), rect.width());
- int height = std::min<int>(screen->height() - y, rect.height());
+ int x = nux::Clamp<int>(rect.x(), 0, output->width());
+ int y = nux::Clamp<int>(output->height() - rect.y2(), 0, output->height());
+ int width = std::min<int>(output->width() - rect.x(), rect.width());
+ int height = std::min<int>(output->height() - y, rect.height());
CHECKGL(glCopyTexSubImage2D(surface_target, 0, x, y, x, y, width, height));
}
@@ -1504,7 +1504,7 @@ bool UnityScreen::glPaintOutput(const GLScreenPaintAttrib& attrib,
doShellRepaint = false;
if (doShellRepaint)
- paintDisplay();
+ paintOutput();
return ret;
}
@@ -3094,18 +3094,18 @@ bool UnityWindow::glDraw(const GLMatrix& matrix,
if (uScreen->doShellRepaint && window == uScreen->onboard_)
{
- uScreen->paintDisplay();
+ uScreen->paintOutput();
}
else if (uScreen->doShellRepaint &&
window == uScreen->firstWindowAboveShell &&
!uScreen->forcePaintOnTop() &&
!uScreen->fullscreenRegion.contains(window->geometry()))
{
- uScreen->paintDisplay();
+ uScreen->paintOutput();
}
else if (locked && CanBypassLockScreen())
{
- uScreen->paintDisplay();
+ uScreen->paintOutput();
}
enum class DrawPanelShadow
diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h
index b1dfda5b0..789e18aaf 100644
--- a/plugins/unityshell/src/unityshell.h
+++ b/plugins/unityshell/src/unityshell.h
@@ -179,7 +179,7 @@ private:
void nuxEpilogue();
/* nux draw wrapper */
- void paintDisplay();
+ void paintOutput();
void paintPanelShadow(CompRegion const& clip);
void setPanelShadowMatrix(const GLMatrix& matrix);
void updateBlurDamage();