Branch: refs/heads/master
  Home:   https://github.com/Warzone2100/warzone2100
  Commit: cb3675cf273d86e8953251a31bf682d893bc2a1a
      
https://github.com/Warzone2100/warzone2100/commit/cb3675cf273d86e8953251a31bf682d893bc2a1a
  Author: Thiago Barcala <thiago.barc...@gmail.com>
  Date:   2021-08-01 (Sun, 01 Aug 2021)

  Changed paths:
    M lib/widget/cliprect.cpp
    M lib/widget/cliprect.h
    M lib/widget/widgbase.h

  Log Message:
  -----------
  Prevent calling ClipRectWidget::runRecursive twice

`WIDGET::runRecursive` calls the child widgets' `runRecursive` and then
calls the child widgets' `run`.

With the previous implementation, `ClipRectWidget::runRecursive` was
being called once from `WIDGET::runRecursive` (with the untrasformed
context), and once from `ClipRectWidget::run` (with the transformed
context).

This was causing the `run` of the entire subtree of a `ClipRectWidget`
to be called twice for every frame. If a `WIDGET` had `n`
`ClipRectWidget`s as ancestor, its `run` method would be called 2ⁿ
times.




_______________________________________________
Warzone2100-commits mailing list
Warzone2100-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/warzone2100-commits

Reply via email to