Changeset View
Changeset View
Standalone View
Standalone View
effects/blur/blur.cpp
Show First 20 Lines • Show All 230 Lines • ▼ Show 20 Line(s) | 228 | { | |||
---|---|---|---|---|---|
231 | BlurConfig::self()->read(); | 231 | BlurConfig::self()->read(); | ||
232 | 232 | | |||
233 | int blurStrength = BlurConfig::blurStrength() - 1; | 233 | int blurStrength = BlurConfig::blurStrength() - 1; | ||
234 | m_downSampleIterations = blurStrengthValues[blurStrength].iteration; | 234 | m_downSampleIterations = blurStrengthValues[blurStrength].iteration; | ||
235 | m_offset = blurStrengthValues[blurStrength].offset; | 235 | m_offset = blurStrengthValues[blurStrength].offset; | ||
236 | m_expandSize = blurOffsets[m_downSampleIterations - 1].expandSize; | 236 | m_expandSize = blurOffsets[m_downSampleIterations - 1].expandSize; | ||
237 | m_noiseStrength = BlurConfig::noiseStrength(); | 237 | m_noiseStrength = BlurConfig::noiseStrength(); | ||
238 | 238 | | |||
239 | m_scalingFactor = QGuiApplication::primaryScreen()->logicalDotsPerInch() / 96.0; | 239 | m_scalingFactor = qMax(1.0, QGuiApplication::primaryScreen()->logicalDotsPerInch() / 96.0); | ||
240 | 240 | | |||
241 | updateTexture(); | 241 | updateTexture(); | ||
242 | 242 | | |||
243 | if (!m_shader || !m_shader->isValid()) { | 243 | if (!m_shader || !m_shader->isValid()) { | ||
244 | effects->removeSupportProperty(s_blurAtomName, this); | 244 | effects->removeSupportProperty(s_blurAtomName, this); | ||
245 | delete m_blurManager; | 245 | delete m_blurManager; | ||
246 | m_blurManager = nullptr; | 246 | m_blurManager = nullptr; | ||
247 | } | 247 | } | ||
▲ Show 20 Lines • Show All 526 Lines • Show Last 20 Lines |