Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix #137: 1-window.DFR broken (by #124)

  • Loading branch information...
commit 1e119d695cbd691095b419cb4483fca8878ec720 1 parent e76726b
@eile eile authored
View
6 libs/eq/client/channel.cpp
@@ -2108,8 +2108,8 @@ bool Channel::_cmdFrameAssemble( co::Command& command )
{
ChannelFrameAssemblePacket* packet =
command.getModifiable< ChannelFrameAssemblePacket >();
- LBLOG( LOG_TASKS | LOG_ASSEMBLY ) << "TASK assemble " << getName() << " "
- << packet << std::endl;
+ LBLOG( LOG_TASKS | LOG_ASSEMBLY )
+ << "TASK assemble " << getName() << " " << packet << std::endl;
_setRenderContext( packet->context );
ChannelStatistics event( Statistic::CHANNEL_ASSEMBLE, this );
@@ -2118,6 +2118,8 @@ bool Channel::_cmdFrameAssemble( co::Command& command )
Pipe* pipe = getPipe();
Frame* frame = pipe->getFrame( packet->frames[i], getEye(), false );
_impl->inputFrames.push_back( frame );
+ LBLOG( LOG_ASSEMBLY ) << *frame << " " << *frame->getFrameData()
+ << std::endl;
}
frameAssemble( packet->context.frameID );
View
10 libs/eq/client/frameData.cpp
@@ -466,12 +466,12 @@ bool FrameData::addImage( const NodeFrameDataTransmitPacket* packet )
return true;
}
-std::ostream& operator << ( std::ostream& os, const FrameData* data )
+std::ostream& operator << ( std::ostream& os, const FrameData& data )
{
- os << "frame data id " << data->getID() << "." << data->getInstanceID()
- << " v" << data->getVersion() << ' ' << data->getImages().size()
- << " images, ready " << ( data->isReady() ? 'y' :'n' );
- return os;
+ return os << "frame data id " << data.getID() << "." << data.getInstanceID()
+ << " v" << data.getVersion() << ' ' << data.getImages().size()
+ << " images, ready " << ( data.isReady() ? 'y' :'n' ) << " "
+ << data.getZoom();
}
}
View
4 libs/eq/client/frameData.h
@@ -374,8 +374,8 @@ namespace server { class FrameData; }
LB_TS_VAR( _commandThread );
};
- /** Print the frame data to the given output stream. @version 1.0 */
- std::ostream& operator << ( std::ostream& os, const FrameData* data );
+ /** Print the frame data to the given output stream. @version 1.4 */
+ EQ_API std::ostream& operator << ( std::ostream&, const FrameData& );
}
#endif // EQ_FRAMEDATA_H
View
13 libs/eq/fabric/frame.cpp
@@ -143,6 +143,19 @@ std::vector< uint128_t >& Frame::_getInputNetNodes( const unsigned i )
return _impl->toNodes[ i ].inputNetNodes;
}
+std::ostream& operator << ( std::ostream& os, const Frame& frame )
+{
+ os << lunchbox::disableFlush << "frame" << std::endl
+ << "{" << std::endl << lunchbox::indent
+ << "name \"" << frame.getName() << "\"" << std::endl;
+
+ const Zoom& zoom = frame.getZoom();
+ if( zoom.isValid() && zoom != Zoom::NONE )
+ os << zoom << std::endl;
+
+ return os << lunchbox::exdent << "}" << std::endl << lunchbox::enableFlush;
+}
+
std::ostream& operator << ( std::ostream& os, const Frame::Type type )
{
os << "type ";
View
2  libs/eq/fabric/frame.h
@@ -125,6 +125,8 @@ namespace detail { class Frame; }
detail::Frame* const _impl;
};
+ /** Print the frame to the given output stream. @version 1.4 */
+ EQFABRIC_API std::ostream& operator << ( std::ostream&, const Frame& );
/** Print the frame type to the given output stream. @version 1.0 */
EQFABRIC_API std::ostream& operator << ( std::ostream&, const Frame::Type );
/** Print the frame buffer value to the given output stream. @version 1.0 */
View
4 libs/eq/fabric/renderContext.cpp
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006-2011, Stefan Eilemann <eile@equalizergraphics.com>
+/* Copyright (c) 2006-2012, Stefan Eilemann <eile@equalizergraphics.com>
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License version 2.1 as published
@@ -41,7 +41,7 @@ RenderContext::RenderContext()
std::ostream& operator << ( std::ostream& os, const RenderContext& ctx )
{
os << "ID " << ctx.frameID << " pvp " << ctx.pvp << " vp " << ctx.vp << " "
- << ctx.range << " " << ctx.eye;
+ << ctx.range << " " << ctx.eye << " " << ctx.zoom;
return os;
}
View
22 libs/eq/server/channelUpdateVisitor.cpp
@@ -1,5 +1,5 @@
-/* Copyright (c) 2007-2011, Stefan Eilemann <eile@equalizergraphics.com>
+/* Copyright (c) 2007-2012, Stefan Eilemann <eile@equalizergraphics.com>
* 2010, Cedric Stalder <cedric.stalder@gmail.com>
*
* This library is free software; you can redistribute it and/or modify it under
@@ -422,7 +422,7 @@ void ChannelUpdateVisitor::_updateAssemble( const Compound* compound,
const Frames& inputFrames = compound->getInputFrames();
LBASSERT( !inputFrames.empty( ));
- std::vector< co::ObjectVersion > frameIDs;
+ co::ObjectVersions frames;
for( Frames::const_iterator iter = inputFrames.begin();
iter != inputFrames.end(); ++iter )
{
@@ -431,21 +431,22 @@ void ChannelUpdateVisitor::_updateAssemble( const Compound* compound,
if( !frame->hasData( _eye )) // TODO: filter: buffers, vp, eye
continue;
- frameIDs.push_back( co::ObjectVersion( frame ));
+ LBLOG( LOG_ASSEMBLY ) << *frame << std::endl;
+ frames.push_back( co::ObjectVersion( frame ));
}
- if( frameIDs.empty( ))
+ if( frames.empty( ))
return;
// assemble task
ChannelFrameAssemblePacket packet;
packet.context = context;
- packet.nFrames = uint32_t( frameIDs.size( ));
+ packet.nFrames = uint32_t( frames.size( ));
LBLOG( LOG_ASSEMBLY | LOG_TASKS )
<< "TASK assemble " << _channel->getName() << " " << &packet
<< std::endl;
- _channel->send< co::ObjectVersion >( packet, frameIDs );
+ _channel->send< co::ObjectVersion >( packet, frames );
_updated = true;
}
@@ -461,8 +462,7 @@ void ChannelUpdateVisitor::_updateReadback( const Compound* compound,
const std::vector< Frame* >& outputFrames = compound->getOutputFrames();
LBASSERT( !outputFrames.empty( ));
- Frames frames;
- std::vector< co::ObjectVersion > frameIDs;
+ co::ObjectVersions frames;
for( FramesCIter i = outputFrames.begin(); i != outputFrames.end(); ++i )
{
Frame* frame = *i;
@@ -470,8 +470,8 @@ void ChannelUpdateVisitor::_updateReadback( const Compound* compound,
if( !frame->hasData( _eye )) // TODO: filter: buffers, vp, eye
continue;
- frames.push_back( frame );
- frameIDs.push_back( co::ObjectVersion( frame ));
+ frames.push_back( co::ObjectVersion( frame ));
+ LBLOG( LOG_ASSEMBLY ) << *frame << std::endl;
}
if( frames.empty() )
@@ -482,7 +482,7 @@ void ChannelUpdateVisitor::_updateReadback( const Compound* compound,
packet.context = context;
packet.nFrames = uint32_t( frames.size( ));
- _channel->send<co::ObjectVersion>( packet, frameIDs );
+ _channel->send<co::ObjectVersion>( packet, frames );
_updated = true;
LBLOG( LOG_ASSEMBLY | LOG_TASKS )
<< "TASK readback " << _channel->getName() << " " << &packet
View
7 libs/eq/server/compound.cpp
@@ -1703,14 +1703,13 @@ std::ostream& operator << (std::ostream& os, const Compound& compound)
const Frames& inputFrames = compound.getInputFrames();
for( FramesCIter i = inputFrames.begin(); i != inputFrames.end(); ++i )
- os << "input" << *i;
+ os << "input" << **i << std::endl;
const Frames& outputFrames = compound.getOutputFrames();
for( FramesCIter i = outputFrames.begin(); i != outputFrames.end(); ++i )
- os << "output" << *i;
+ os << "output" << **i << std::endl;
- os << lunchbox::exdent << "}" << std::endl << lunchbox::enableFlush;
- return os;
+ return os << lunchbox::exdent << "}" << std::endl << lunchbox::enableFlush;
}
}
View
37 libs/eq/server/frame.cpp
@@ -36,7 +36,7 @@ Frame::Frame()
, _type( TYPE_MEMORY )
, _masterFrameData( 0 )
{
- setZoom( Zoom( 0.f, 0.f )); //set invalid zoom to detect 'set' state
+ setNativeZoom( Zoom( 0.f, 0.f )); //set invalid zoom to detect 'set' state
for( unsigned i = 0; i < NUM_EYES; ++i )
_frameData[i] = 0;
}
@@ -175,39 +175,34 @@ void Frame::addInputFrame( Frame* frame, const Compound* compound )
}
}
-std::ostream& operator << ( std::ostream& os, const Frame* frame )
+std::ostream& operator << ( std::ostream& os, const Frame& frame )
{
- if( !frame )
- return os;
-
- os << lunchbox::disableFlush << "frame" << std::endl;
- os << "{" << std::endl << lunchbox::indent;
-
- const std::string& name = frame->getName();
- os << "name \"" << name << "\"" << std::endl;
-
- const uint32_t buffers = frame->getBuffers();
- if( buffers != eq::Frame::BUFFER_UNDEFINED )
+ os << lunchbox::disableFlush << "frame" << std::endl
+ << "{" << std::endl << lunchbox::indent
+ << "name \"" << frame.getName() << "\"" << std::endl;
+
+ const uint32_t buffers = frame.getBuffers();
+ if( buffers != Frame::BUFFER_UNDEFINED )
{
os << "buffers [";
- if( buffers & eq::Frame::BUFFER_COLOR ) os << " COLOR";
- if( buffers & eq::Frame::BUFFER_DEPTH ) os << " DEPTH";
+ if( buffers & Frame::BUFFER_COLOR ) os << " COLOR";
+ if( buffers & Frame::BUFFER_DEPTH ) os << " DEPTH";
os << " ]" << std::endl;
}
- const Frame::Type frameType = frame->getType();
+ const Frame::Type frameType = frame.getType();
if( frameType != Frame::TYPE_MEMORY )
os << frameType;
- const Viewport& vp = frame->getViewport();
- if( vp != eq::Viewport::FULL )
+ const Viewport& vp = frame.getViewport();
+ if( vp != Viewport::FULL )
os << "viewport " << vp << std::endl;
- const Zoom& zoom = frame->getZoom();
- if( zoom.isValid() && zoom != eq::Zoom::NONE )
+ const Zoom& zoom = frame.getZoom();
+ if( zoom.isValid() && zoom != Zoom::NONE )
os << zoom << std::endl;
- return os << lunchbox::exdent << "}" << std::endl << lunchbox::enableFlush;
+ return os << lunchbox::exdent << "}" << lunchbox::enableFlush;
}
}
View
6 libs/eq/server/frame.h
@@ -153,8 +153,8 @@ namespace server
Compound* _compound;
/** Frame-specific data. */
- eq::Viewport _vp;
- uint32_t _buffers;
+ eq::Viewport _vp;
+ uint32_t _buffers;
Type _type;
/** The configured frame data (base class contains inherit values). */
@@ -171,7 +171,7 @@ namespace server
Frames _inputFrames[ fabric::NUM_EYES ];
};
- std::ostream& operator << ( std::ostream& os, const Frame* frame );
+ EQFABRIC_API std::ostream& operator << ( std::ostream&, const Frame& );
}
}
#endif // EQSERVER_FRAME_H
Please sign in to comment.
Something went wrong with that request. Please try again.