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

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2007-2015, Stefan Eilemann <eile@equalizergraphics.com>
       3             :  *                          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 "compound.h"        // nested type
      23             : #include "compoundVisitor.h" // base class
      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             :     explicit CompoundUpdateOutputVisitor(const uint32_t frameNumber);
      37          28 :     virtual ~CompoundUpdateOutputVisitor() {}
      38             :     /** Visit all compounds. */
      39             :     virtual VisitorResult visit(Compound* compound);
      40             : 
      41          28 :     const Compound::BarrierMap& getSwapBarriers() const
      42             :     {
      43          28 :         return _swapBarriers;
      44             :     }
      45          28 :     const Compound::FrameMap& getOutputFrames() const { return _outputFrames; }
      46          28 :     const Compound::TileQueueMap& getOutputQueues() const
      47             :     {
      48          28 :         return _outputTileQueues;
      49             :     }
      50             : 
      51             : private:
      52             :     const uint32_t _frameNumber;
      53             : 
      54             :     Compound::BarrierMap _swapBarriers;
      55             :     Compound::FrameMap _outputFrames;
      56             :     Compound::TileQueueMap _outputTileQueues;
      57             : 
      58             :     void _updateQueues(Compound* compound);
      59             :     void _updateFrames(Compound* compound);
      60             :     void _updateSwapBarriers(Compound* compound);
      61             :     void _updateZoom(const Compound* compound, Frame* frame);
      62             : 
      63             :     void _generateTiles(TileQueue* queue, Compound* compound);
      64             :     void _addTilesToQueue(TileQueue* queue, Compound* compound,
      65             :                           const std::vector<Vector2i>& tiles);
      66             : };
      67             : }
      68             : }
      69             : #endif // EQSERVER_CONSTCOMPOUNDVISITOR_H

Generated by: LCOV version 1.11