From 9ab365b80c9e1e641fba4bec135a4ad975b0b376 Mon Sep 17 00:00:00 2001 From: Eleni Maria Stea Date: Tue, 19 Jul 2016 11:55:04 +0300 Subject: paint output (bzr r4151.1.2) --- plugins/unityshell/src/unityshell.cpp | 20 ++++++++++---------- plugins/unityshell/src/unityshell.h | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins') 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(rect.x(), 0, screen->width()); - int y = nux::Clamp(screen->height() - rect.y2(), 0, screen->height()); - int width = std::min(screen->width() - rect.x(), rect.width()); - int height = std::min(screen->height() - y, rect.height()); + int x = nux::Clamp(rect.x(), 0, output->width()); + int y = nux::Clamp(output->height() - rect.y2(), 0, output->height()); + int width = std::min(output->width() - rect.x(), rect.width()); + int height = std::min(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(); -- cgit v1.2.3