LCOV - code coverage report
Current view: top level - eq/server - compoundUpdateDataVisitor.cpp (source / functions) Hit Total Coverage
Test: Equalizer Lines: 14 14 100.0 %
Date: 2017-12-16 05:07:20 Functions: 5 5 100.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2007-2013, Stefan Eilemann <eile@equalizergraphics.com>
       3             :  *
       4             :  * This library is free software; you can redistribute it and/or modify it under
       5             :  * the terms of the GNU Lesser General Public License version 2.1 as published
       6             :  * by the Free Software Foundation.
       7             :  *
       8             :  * This library is distributed in the hope that it will be useful, but WITHOUT
       9             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      10             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      11             :  * details.
      12             :  *
      13             :  * You should have received a copy of the GNU Lesser General Public License
      14             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      15             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      16             :  */
      17             : 
      18             : #include "compoundUpdateDataVisitor.h"
      19             : 
      20             : #include "compound.h"
      21             : 
      22             : namespace eq
      23             : {
      24             : namespace server
      25             : {
      26             : using fabric::TASK_DRAW;
      27             : 
      28          28 : CompoundUpdateDataVisitor::CompoundUpdateDataVisitor(const uint32_t frameNumber)
      29          28 :     : _frameNumber(frameNumber)
      30             : {
      31          28 : }
      32             : 
      33         264 : VisitorResult CompoundUpdateDataVisitor::visit(Compound* compound)
      34             : {
      35         264 :     compound->fireUpdatePre(_frameNumber);
      36         264 :     compound->updateInheritData(_frameNumber);
      37             : 
      38         264 :     _updateDrawFinish(compound);
      39         264 :     return TRAVERSE_CONTINUE;
      40             : }
      41             : 
      42         264 : void CompoundUpdateDataVisitor::_updateDrawFinish(Compound* compound)
      43             : {
      44         264 :     if (compound->testInheritTask(TASK_DRAW) && compound->isActive())
      45             :     {
      46           8 :         Channel* channel = compound->getChannel();
      47           8 :         channel->setLastDrawCompound(compound);
      48             :     }
      49         264 : }
      50             : }
      51          60 : }

Generated by: LCOV version 1.11