Пример #1
0
void Window::attach( const uint128_t& id, const uint32_t instanceID )
{
    Super::attach( id, instanceID );

    co::CommandQueue* queue = getPipeThreadQueue();

    registerCommand( fabric::CMD_WINDOW_CREATE_CHANNEL,
                     WindowFunc( this, &Window::_cmdCreateChannel ), queue );
    registerCommand( fabric::CMD_WINDOW_DESTROY_CHANNEL,
                     WindowFunc( this, &Window::_cmdDestroyChannel ), queue );
    registerCommand( fabric::CMD_WINDOW_CONFIG_INIT,
                     WindowFunc( this, &Window::_cmdConfigInit ), queue );
    registerCommand( fabric::CMD_WINDOW_CONFIG_EXIT,
                     WindowFunc( this, &Window::_cmdConfigExit ), queue );
    registerCommand( fabric::CMD_WINDOW_FRAME_START,
                     WindowFunc( this, &Window::_cmdFrameStart ), queue );
    registerCommand( fabric::CMD_WINDOW_FRAME_FINISH,
                     WindowFunc( this, &Window::_cmdFrameFinish ), queue );
    registerCommand( fabric::CMD_WINDOW_FLUSH,
                     WindowFunc( this, &Window::_cmdFlush), queue );
    registerCommand( fabric::CMD_WINDOW_FINISH,
                     WindowFunc( this, &Window::_cmdFinish), queue );
    registerCommand( fabric::CMD_WINDOW_THROTTLE_FRAMERATE,
                     WindowFunc( this, &Window::_cmdThrottleFramerate ),
                     queue );
    registerCommand( fabric::CMD_WINDOW_BARRIER,
                     WindowFunc( this, &Window::_cmdBarrier ), queue );
    registerCommand( fabric::CMD_WINDOW_NV_BARRIER,
                     WindowFunc( this, &Window::_cmdNVBarrier ), queue );
    registerCommand( fabric::CMD_WINDOW_SWAP,
                     WindowFunc( this, &Window::_cmdSwap), queue );
    registerCommand( fabric::CMD_WINDOW_FRAME_DRAW_FINISH,
                     WindowFunc( this, &Window::_cmdFrameDrawFinish ), queue );
}
Пример #2
0
void Pipe::attach( const UUID& id, const uint32_t instanceID )
{
    Super::attach( id, instanceID );

    co::CommandQueue* queue = getPipeThreadQueue();
    co::CommandQueue* transferQ = getTransferThreadQueue();

    registerCommand( fabric::CMD_PIPE_CONFIG_INIT,
                     PipeFunc( this, &Pipe::_cmdConfigInit ), queue );
    registerCommand( fabric::CMD_PIPE_CONFIG_EXIT,
                     PipeFunc( this, &Pipe::_cmdConfigExit ), queue );
    registerCommand( fabric::CMD_PIPE_CREATE_WINDOW,
                     PipeFunc( this, &Pipe::_cmdCreateWindow ), queue );
    registerCommand( fabric::CMD_PIPE_DESTROY_WINDOW,
                     PipeFunc( this, &Pipe::_cmdDestroyWindow ), queue );
    registerCommand( fabric::CMD_PIPE_FRAME_START,
                     PipeFunc( this, &Pipe::_cmdFrameStart ), queue );
    registerCommand( fabric::CMD_PIPE_FRAME_FINISH,
                     PipeFunc( this, &Pipe::_cmdFrameFinish ), queue );
    registerCommand( fabric::CMD_PIPE_FRAME_DRAW_FINISH,
                     PipeFunc( this, &Pipe::_cmdFrameDrawFinish ), queue );
    registerCommand( fabric::CMD_PIPE_FRAME_START_CLOCK,
                     PipeFunc( this, &Pipe::_cmdFrameStartClock ), 0 );
    registerCommand( fabric::CMD_PIPE_EXIT_THREAD,
                     PipeFunc( this, &Pipe::_cmdExitThread ), queue );
    registerCommand( fabric::CMD_PIPE_DETACH_VIEW,
                     PipeFunc( this, &Pipe::_cmdDetachView ), queue );
    registerCommand( fabric::CMD_PIPE_EXIT_TRANSFER_THREAD,
                     PipeFunc( this, &Pipe::_cmdExitTransferThread ),
                     transferQ );
}