diff options
| author | Eleni Maria Stea <elenimaria.stea@canonical.com> | 2016-12-12 10:27:16 +0200 |
|---|---|---|
| committer | Eleni Maria Stea <elenimaria.stea@canonical.com> | 2016-12-12 10:27:16 +0200 |
| commit | a47108fb79f69c7d0d9eb5e94a0a2138f1667968 (patch) | |
| tree | 0b49fcece98df506a23486076ae7790888ce05e1 /unity-shared | |
| parent | b0d3be831fb6b79c0cd4c2a24c4d62cbe06508ae (diff) | |
check if we actually have blur before updating blur geometries
(bzr r4151.1.4)
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/BackgroundEffectHelper.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/unity-shared/BackgroundEffectHelper.cpp b/unity-shared/BackgroundEffectHelper.cpp index f4ce83147..b998f7b77 100644 --- a/unity-shared/BackgroundEffectHelper.cpp +++ b/unity-shared/BackgroundEffectHelper.cpp @@ -147,6 +147,9 @@ bool BackgroundEffectHelper::UpdateOwnerGeometry() void BackgroundEffectHelper::UpdateBlurGeometries() { + if (blur_type == BLUR_NONE) + return; + int radius = GetBlurRadius(); blur_geometries_.clear(); blur_geometries_.reserve(registered_list_.size()); @@ -157,7 +160,7 @@ void BackgroundEffectHelper::UpdateBlurGeometries() * monitor geometry, but that is done at paint time */ auto const& blur_geo = bg_effect_helper->requested_blur_geometry_; - if (!blur_geo.IsNull() && blur_type != BLUR_NONE) + if (!blur_geo.IsNull()) blur_geometries_.push_back(blur_geo.GetExpand(radius, radius)); } } |
