Remove redundant window filter calls
If the window filter rejects a window, that window won't be in the stacking_order and henceforth won't be painted, so finalDrawWindow() does extra work of checking again if the window is accepted.
This commit is contained in:
parent
05877a8321
commit
16af4bf437
4 changed files with 1 additions and 13 deletions
|
@ -616,9 +616,6 @@ void Scene::finalPaintWindow(EffectWindowImpl *w, int mask, const QRegion ®io
|
||||||
// will be eventually called from drawWindow()
|
// will be eventually called from drawWindow()
|
||||||
void Scene::finalDrawWindow(EffectWindowImpl *w, int mask, const QRegion ®ion, WindowPaintData &data)
|
void Scene::finalDrawWindow(EffectWindowImpl *w, int mask, const QRegion ®ion, WindowPaintData &data)
|
||||||
{
|
{
|
||||||
if (!m_filter.filterAcceptsWindow(w->window())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
w->sceneWindow()->performPaint(mask, region, data);
|
w->sceneWindow()->performPaint(mask, region, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -237,7 +237,7 @@ protected:
|
||||||
// shared implementation, starts painting the window
|
// shared implementation, starts painting the window
|
||||||
virtual void paintWindow(SceneWindow *w, int mask, const QRegion ®ion);
|
virtual void paintWindow(SceneWindow *w, int mask, const QRegion ®ion);
|
||||||
// called after all effects had their drawWindow() called
|
// called after all effects had their drawWindow() called
|
||||||
virtual void finalDrawWindow(EffectWindowImpl *w, int mask, const QRegion ®ion, WindowPaintData &data);
|
void finalDrawWindow(EffectWindowImpl *w, int mask, const QRegion ®ion, WindowPaintData &data);
|
||||||
|
|
||||||
virtual void paintOffscreenQuickView(OffscreenQuickView *w) = 0;
|
virtual void paintOffscreenQuickView(OffscreenQuickView *w) = 0;
|
||||||
|
|
||||||
|
|
|
@ -311,14 +311,6 @@ SceneWindow *SceneOpenGL::createWindow(Window *t)
|
||||||
return new OpenGLWindow(t, this);
|
return new OpenGLWindow(t, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SceneOpenGL::finalDrawWindow(EffectWindowImpl *w, int mask, const QRegion ®ion, WindowPaintData &data)
|
|
||||||
{
|
|
||||||
if (!m_filter.filterAcceptsWindow(w->window())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
performPaintWindow(w, mask, region, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SceneOpenGL::performPaintWindow(EffectWindowImpl *w, int mask, const QRegion ®ion, WindowPaintData &data)
|
void SceneOpenGL::performPaintWindow(EffectWindowImpl *w, int mask, const QRegion ®ion, WindowPaintData &data)
|
||||||
{
|
{
|
||||||
if (mask & PAINT_WINDOW_LANCZOS) {
|
if (mask & PAINT_WINDOW_LANCZOS) {
|
||||||
|
|
|
@ -70,7 +70,6 @@ protected:
|
||||||
void paintSimpleScreen(int mask, const QRegion ®ion) override;
|
void paintSimpleScreen(int mask, const QRegion ®ion) override;
|
||||||
void paintGenericScreen(int mask, const ScreenPaintData &data) override;
|
void paintGenericScreen(int mask, const ScreenPaintData &data) override;
|
||||||
SceneWindow *createWindow(Window *t) override;
|
SceneWindow *createWindow(Window *t) override;
|
||||||
void finalDrawWindow(EffectWindowImpl *w, int mask, const QRegion ®ion, WindowPaintData &data) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void doPaintBackground(const QVector<float> &vertices);
|
void doPaintBackground(const QVector<float> &vertices);
|
||||||
|
|
Loading…
Reference in a new issue