void MonitorEqualizer::_updateViewports()
{
    if( !_outputFrames.empty( ))
        return;

    Compound* compound = getCompound();
    if( !compound )
        return;

    const Frames& inputFrames = compound->getInputFrames();
    for( Frames::const_iterator i = inputFrames.begin();
         i != inputFrames.end(); ++i )
    {
        const Frame* frame = *i;
        const Compound* root = compound->getRoot();

        // find the output frame
        OutputFrameFinder frameFinder( frame->getName() );
        root->accept( frameFinder );
        Frame* outputFrame = frameFinder.getResult();

        _outputFrames.push_back( outputFrame );
        _viewports.push_back( eq::Viewport::FULL );

        if( outputFrame )
        {
            const Channel* channel = outputFrame->getChannel();
            const Segment* segment = channel->getSegment();
            const View* view =  channel->getView();

            if( view )
            {
                Viewport viewport( segment->getViewport( ));
                viewport.intersect( view->getViewport( ));

                _viewports.back() = viewport;
            }
        }
    }
}