Changeset View
Changeset View
Standalone View
Standalone View
effects/blur/blur.cpp
Show First 20 Lines • Show All 464 Lines • ▼ Show 20 Line(s) | |||||
465 | { | 465 | { | ||
466 | m_damagedArea = QRegion(); | 466 | m_damagedArea = QRegion(); | ||
467 | m_paintedArea = QRegion(); | 467 | m_paintedArea = QRegion(); | ||
468 | m_currentBlur = QRegion(); | 468 | m_currentBlur = QRegion(); | ||
469 | 469 | | |||
470 | effects->prePaintScreen(data, time); | 470 | effects->prePaintScreen(data, time); | ||
471 | } | 471 | } | ||
472 | 472 | | |||
473 | void BlurEffect::paintScreen(int mask, QRegion region, KWin::ScreenPaintData & data) | ||||
474 | { | ||||
475 | Effect::paintScreen(mask, region, data); | ||||
476 | m_screenRotation = data.screenRotation(); | ||||
477 | } | ||||
478 | | ||||
473 | void BlurEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) | 479 | void BlurEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) | ||
474 | { | 480 | { | ||
475 | // this effect relies on prePaintWindow being called in the bottom to top order | 481 | // this effect relies on prePaintWindow being called in the bottom to top order | ||
476 | 482 | | |||
477 | effects->prePaintWindow(w, data, time); | 483 | effects->prePaintWindow(w, data, time); | ||
478 | 484 | | |||
479 | if (!w->isPaintingEnabled()) { | 485 | if (!w->isPaintingEnabled()) { | ||
480 | return; | 486 | return; | ||
▲ Show 20 Lines • Show All 150 Lines • ▼ Show 20 Line(s) | 617 | { | |||
631 | 637 | | |||
632 | m_noiseTexture = GLTexture(noiseImage); | 638 | m_noiseTexture = GLTexture(noiseImage); | ||
633 | m_noiseTexture.setFilter(GL_NEAREST); | 639 | m_noiseTexture.setFilter(GL_NEAREST); | ||
634 | m_noiseTexture.setWrapMode(GL_REPEAT); | 640 | m_noiseTexture.setWrapMode(GL_REPEAT); | ||
635 | } | 641 | } | ||
636 | 642 | | |||
637 | void BlurEffect::doBlur(const QRegion& shape, const QRect& screen, const float opacity, const QMatrix4x4 &screenProjection, bool isDock, QRect windowRect) | 643 | void BlurEffect::doBlur(const QRegion& shape, const QRect& screen, const float opacity, const QMatrix4x4 &screenProjection, bool isDock, QRect windowRect) | ||
638 | { | 644 | { | ||
645 | if (m_screenRotation == 90 || m_screenRotation == 270) { | ||||
646 | return; | ||||
647 | } | ||||
639 | // Blur would not render correctly on a secondary monitor because of wrong coordinates | 648 | // Blur would not render correctly on a secondary monitor because of wrong coordinates | ||
640 | // BUG: 393723 | 649 | // BUG: 393723 | ||
641 | const int xTranslate = -screen.x(); | 650 | const int xTranslate = -screen.x(); | ||
642 | const int yTranslate = effects->virtualScreenSize().height() - screen.height() - screen.y(); | 651 | const int yTranslate = effects->virtualScreenSize().height() - screen.height() - screen.y(); | ||
643 | 652 | | |||
644 | const QRegion expandedBlurRegion = expand(shape) & expand(screen); | 653 | const QRegion expandedBlurRegion = expand(shape) & expand(screen); | ||
645 | 654 | | |||
646 | const bool isGLES = GLPlatform::instance()->isGLES(); | 655 | const bool isGLES = GLPlatform::instance()->isGLES(); | ||
▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines |