Changeset View
Changeset View
Standalone View
Standalone View
effects/blur/blur.cpp
Show First 20 Lines • Show All 487 Lines • ▼ Show 20 Line(s) | |||||
488 | { | 488 | { | ||
489 | m_damagedArea = QRegion(); | 489 | m_damagedArea = QRegion(); | ||
490 | m_paintedArea = QRegion(); | 490 | m_paintedArea = QRegion(); | ||
491 | m_currentBlur = QRegion(); | 491 | m_currentBlur = QRegion(); | ||
492 | 492 | | |||
493 | effects->prePaintScreen(data, time); | 493 | effects->prePaintScreen(data, time); | ||
494 | } | 494 | } | ||
495 | 495 | | |||
496 | void BlurEffect::paintScreen(int mask, QRegion region, KWin::ScreenPaintData & data) | ||||
497 | { | ||||
498 | Effect::paintScreen(mask, region, data); | ||||
499 | m_screenRotation = data.screenRotation(); | ||||
500 | } | ||||
501 | | ||||
496 | void BlurEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) | 502 | void BlurEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) | ||
497 | { | 503 | { | ||
498 | // this effect relies on prePaintWindow being called in the bottom to top order | 504 | // this effect relies on prePaintWindow being called in the bottom to top order | ||
499 | 505 | | |||
500 | effects->prePaintWindow(w, data, time); | 506 | effects->prePaintWindow(w, data, time); | ||
501 | 507 | | |||
502 | if (!w->isPaintingEnabled()) { | 508 | if (!w->isPaintingEnabled()) { | ||
503 | return; | 509 | return; | ||
▲ Show 20 Lines • Show All 149 Lines • ▼ Show 20 Line(s) | 639 | { | |||
653 | 659 | | |||
654 | m_noiseTexture = GLTexture(noiseImage); | 660 | m_noiseTexture = GLTexture(noiseImage); | ||
655 | m_noiseTexture.setFilter(GL_NEAREST); | 661 | m_noiseTexture.setFilter(GL_NEAREST); | ||
656 | m_noiseTexture.setWrapMode(GL_REPEAT); | 662 | m_noiseTexture.setWrapMode(GL_REPEAT); | ||
657 | } | 663 | } | ||
658 | 664 | | |||
659 | void BlurEffect::doBlur(const QRegion& shape, const QRect& screen, const float opacity, const QMatrix4x4 &screenProjection, bool isDock, QRect windowRect) | 665 | void BlurEffect::doBlur(const QRegion& shape, const QRect& screen, const float opacity, const QMatrix4x4 &screenProjection, bool isDock, QRect windowRect) | ||
660 | { | 666 | { | ||
667 | if (m_screenRotation == 90 || m_screenRotation == 270) { | ||||
668 | return; | ||||
669 | } | ||||
661 | // Blur would not render correctly on a secondary monitor because of wrong coordinates | 670 | // Blur would not render correctly on a secondary monitor because of wrong coordinates | ||
662 | // BUG: 393723 | 671 | // BUG: 393723 | ||
663 | const int xTranslate = -screen.x(); | 672 | const int xTranslate = -screen.x(); | ||
664 | const int yTranslate = effects->virtualScreenSize().height() - screen.height() - screen.y(); | 673 | const int yTranslate = effects->virtualScreenSize().height() - screen.height() - screen.y(); | ||
665 | 674 | | |||
666 | const QRegion expandedBlurRegion = expand(shape) & expand(screen); | 675 | const QRegion expandedBlurRegion = expand(shape) & expand(screen); | ||
667 | 676 | | |||
668 | const bool useSRGB = m_renderTextures.first().internalFormat() == GL_SRGB8_ALPHA8; | 677 | const bool useSRGB = m_renderTextures.first().internalFormat() == GL_SRGB8_ALPHA8; | ||
▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines |