diff options
| author | Daniel van Vugt <daniel.van.vugt@canonical.com> | 2012-09-27 04:37:12 -0400 |
|---|---|---|
| committer | Tarmac <> | 2012-09-27 04:37:12 -0400 |
| commit | 69e1aad4bbcf6a3ed6ed351acd1d86d0429c57a0 (patch) | |
| tree | 5dffde1dd1e595d03bc66d39d2d9c48b45b0027a /plugins | |
| parent | 9c08512c6a167aec101eb24154626c269122978d (diff) | |
| parent | b59ba8dad431b4be90cf9f5d2fea10be153f2a96 (diff) | |
Don't keep re-blurring parts of the shell we've already painted, because
that will creep in and look like a shadow on the edge of the blur region. (LP: #1043260) This happens when the same texture (the FBO texture) is both the source and the destination for the three blur operations (launcher, panel, then dash). My quick fix is to take a copy of the FBO texture at the start of the frame (before any shell is painted), rather than reading from the same texture (FBO) that we're writing to. This also fixes LP: #1039999, because we are no longer assuming the backbuffer is an FBO. Instead we let Nux decide and take the right steps to read the real backbuffer, whatever that is.. Fixes: https://bugs.launchpad.net/bugs/1039999, https://bugs.launchpad.net/bugs/1043260. Approved by Andrea Azzarone. (bzr r2760)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 8e49edb0f..61b948de2 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -682,11 +682,15 @@ void UnityScreen::paintDisplay() auto gpu_device = nux::GetGraphicsDisplay()->GetGpuDevice(); - nux::ObjectPtr<nux::IOpenGLTexture2D> device_texture = - gpu_device->CreateTexture2DFromID(gScreen->fbo ()->tex ()->name (), - screen->width(), screen->height(), 1, nux::BITFMT_R8G8B8A8); - - gpu_device->backup_texture0_ = device_texture; + if (BackgroundEffectHelper::HasDirtyHelpers()) + { + auto graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine(); + nux::ObjectPtr<nux::IOpenGLTexture2D> bg_texture = + graphics_engine->CreateTextureFromBackBuffer(0, 0, + screen->width(), + screen->height()); + gpu_device->backup_texture0_ = bg_texture; + } nux::Geometry geo(0, 0, screen->width (), screen->height ()); nux::Geometry outputGeo(output->x (), output->y (), output->width (), output->height ()); |
