LCOV - code coverage report
Current view: top level - eq/server - compoundUpdateOutputVisitor.h (source / functions) Hit Total Coverage
Test: lcov2.info Lines: 7 7 100.0 %
Date: 2014-06-18 Functions: 4 5 80.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2007-2011, Stefan Eilemann <eile@equalizergraphics.com>
       3             :  *                    2011, Daniel Nachbaur <danielnachbaur@gmail.com>
       4             :  *
       5             :  * This library is free software; you can redistribute it and/or modify it under
       6             :  * the terms of the GNU Lesser General Public License version 2.1 as published
       7             :  * by the Free Software Foundation.
       8             :  *  
       9             :  * This library is distributed in the hope that it will be useful, but WITHOUT
      10             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      11             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      12             :  * details.
      13             :  * 
      14             :  * You should have received a copy of the GNU Lesser General Public License
      15             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      16             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      17             :  */
      18             : 
      19             : #ifndef EQSERVER_COMPOUNDUPDATEOUTPUTVISITOR_H
      20             : #define EQSERVER_COMPOUNDUPDATEOUTPUTVISITOR_H
      21             : 
      22             : #include "compoundVisitor.h" // base class
      23             : #include "compound.h"        // nested type
      24             : 
      25             : namespace eq
      26             : {
      27             : namespace server
      28             : {
      29             :     /**
      30             :      * The compound visitor updating the output data (frames, tiles,
      31             :      * swapbarriers) of a compound tree.
      32             :      */
      33             :     class CompoundUpdateOutputVisitor : public CompoundVisitor
      34             :     {
      35             :     public:
      36             :         CompoundUpdateOutputVisitor( const uint32_t frameNumber );
      37          72 :         virtual ~CompoundUpdateOutputVisitor() {}
      38             : 
      39             :         /** Visit all compounds. */
      40             :         virtual VisitorResult visit( Compound* compound );
      41             : 
      42          72 :         const Compound::BarrierMap& getSwapBarriers() const
      43          72 :             { return _swapBarriers; }
      44          72 :         const Compound::FrameMap& getOutputFrames() const
      45          72 :             { return _outputFrames; }
      46          72 :         const Compound::TileQueueMap& getOutputQueues() const
      47          72 :             { return _outputTileQueues; }
      48             : 
      49             :     private:
      50             :         const uint32_t _frameNumber;
      51             :  
      52             :         Compound::BarrierMap   _swapBarriers;
      53             :         Compound::FrameMap     _outputFrames;
      54             :         Compound::TileQueueMap _outputTileQueues;
      55             : 
      56             :         void _updateQueues( Compound* compound );
      57             :         void _updateFrames( Compound* compound );
      58             :         void _updateSwapBarriers( Compound* compound );
      59             :         void _updateZoom( const Compound* compound, Frame* frame );
      60             : 
      61             :         void _generateTiles( TileQueue* queue, Compound* compound );
      62             :         void _addTilesToQueue( TileQueue* queue, Compound* compound, 
      63             :                                const std::vector< Vector2i >& tiles );
      64             :     };
      65             : }
      66             : }
      67             : #endif // EQSERVER_CONSTCOMPOUNDVISITOR_H

Generated by: LCOV version 1.10