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

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2007-2016, 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             : #ifndef EQSERVER_CHANNELUPDATEVISITOR_H
      19             : #define EQSERVER_CHANNELUPDATEVISITOR_H
      20             : 
      21             : #include "compoundVisitor.h" // base class
      22             : #include "types.h"
      23             : 
      24             : #include <eq/fabric/eye.h> // member
      25             : 
      26             : namespace eq
      27             : {
      28             : namespace server
      29             : {
      30             : /** The compound visitor generating the draw tasks for a channel. */
      31             : class ChannelUpdateVisitor : public CompoundVisitor
      32             : {
      33             : public:
      34             :     ChannelUpdateVisitor(Channel* channel, const uint128_t frameID,
      35             :                          const uint32_t frameNumber);
      36          28 :     virtual ~ChannelUpdateVisitor() {}
      37          84 :     void setEye(const fabric::Eye eye) { _eye = eye; }
      38             :     /** Visit a non-leaf compound on the down traversal. */
      39             :     virtual VisitorResult visitPre(const Compound* compound);
      40             :     /** Visit a leaf compound. */
      41             :     virtual VisitorResult visitLeaf(const Compound* compound);
      42             :     /** Visit a non-leaf compound on the up traversal. */
      43             :     virtual VisitorResult visitPost(const Compound* compound);
      44             : 
      45          28 :     bool isUpdated() const { return _updated; }
      46             : private:
      47             :     Channel* _channel;
      48             :     fabric::Eye _eye;
      49             :     const uint128_t _frameID;
      50             :     const uint32_t _frameNumber;
      51             :     bool _updated;
      52             : 
      53             :     bool _skipCompound(const Compound* compound);
      54             :     void _sendClear(const RenderContext& context);
      55             : 
      56             :     void _updateDraw(const Compound* compound, const RenderContext& context);
      57             :     void _updateDrawTiles(const Compound* compound,
      58             :                           const RenderContext& context);
      59             :     void _updateDrawFinish(const Compound* compound) const;
      60             :     void _updateFrameRate(const Compound* compound) const;
      61             : 
      62             :     uint32_t _getDrawBuffer(const Compound* compound) const;
      63             :     fabric::ColorMask _getDrawBufferMask(const Compound* compound) const;
      64             : 
      65             :     RenderContext _setupRenderContext(const Compound* compound);
      66             : 
      67             :     void _updatePostDraw(const Compound* compound,
      68             :                          const fabric::RenderContext& context);
      69             :     void _updateAssemble(const Compound* compound,
      70             :                          const fabric::RenderContext& context);
      71             :     void _updateReadback(const Compound* compound,
      72             :                          const fabric::RenderContext& context);
      73             :     void _updateViewStart(const Compound* compound,
      74             :                           const fabric::RenderContext& context);
      75             :     void _updateViewFinish(const Compound* compound,
      76             :                            const fabric::RenderContext& context);
      77             : };
      78             : }
      79             : }
      80             : #endif // EQSERVER_CONSTCOMPOUNDVISITOR_H

Generated by: LCOV version 1.11