removed some dead code from geometry_batcher and geometry_renderer

This commit is contained in:
rachytski 2011-12-31 11:24:44 +04:00 committed by Alex Zolotarev
parent 328fd56bdb
commit 89a346633b
8 changed files with 14 additions and 28 deletions

View file

@ -174,7 +174,7 @@ void TileRenderer::DrawTile(core::CommandsQueue::Environment const & env,
yg::gl::PacketsQueue * glQueue = threadData.m_drawerParams.m_renderQueue;
if (glQueue)
glQueue->joinFence(glQueue->insertFence());
glQueue->completeCommands();
double duration = timer.ElapsedSeconds();

View file

@ -363,15 +363,6 @@ namespace yg
m_skin->getPage(pipelineID)->freeTexture();*/
}
void GeometryBatcher::uploadData(shared_ptr<SkinPage> const & skinPage)
{
if (skinPage->hasData())
{
base_t::uploadData(skinPage->uploadQueue(), skinPage->texture());
skinPage->clearUploadQueue();
}
}
void GeometryBatcher::UnlockStorage::perform()
{
if (isDebugging())
@ -418,7 +409,7 @@ namespace yg
GeometryPipeline & pipeline = m_pipelines[pipelineID];
if (pipeline.m_currentIndex)
{
uploadData(skinPage);
skinPage->uploadData(renderQueue());
unlockPipeline(pipelineID);

View file

@ -138,8 +138,6 @@ namespace yg
void beginFrame();
void endFrame();
void uploadData(shared_ptr<SkinPage> const & skinPage);
void flushPipeline(shared_ptr<SkinPage> const & skinPage, int pipelineID);
void unlockPipeline(int pipelineID);
void discardPipeline(int pipelineID);

View file

@ -83,16 +83,6 @@ namespace yg
static_cast<gl::ManagedTexture*>(m_texture.get())->unlock();
}
void GeometryRenderer::uploadData(vector<shared_ptr<ResourceStyle> > const & v,
shared_ptr<BaseTexture> const & texture)
{
shared_ptr<UploadData> uploadData(new UploadData());
uploadData->m_styles = v;
uploadData->m_texture = texture;
processCommand(uploadData);
}
void GeometryRenderer::applyStates(bool isAntiAliased)
{
if (renderQueue())

View file

@ -41,9 +41,6 @@ namespace yg
GeometryRenderer(base_t::Params const & params);
void uploadData(vector<shared_ptr<ResourceStyle> > const & v,
shared_ptr<BaseTexture> const & texture);
void applyStates(bool isAntiAliased);
void drawGeometry(shared_ptr<BaseTexture> const & texture,

View file

@ -87,5 +87,10 @@ namespace yg
{
m_fenceManager.joinFence(id);
}
void PacketsQueue::completeCommands()
{
joinFence(insertFence());
}
}
}

View file

@ -68,6 +68,10 @@ namespace yg
void markFrameBoundary();
int insertFence();
void joinFence(int id);
/// Convenience functions
void completeCommands();
};
}
}

View file

@ -54,11 +54,12 @@ namespace yg
{
m_cachePage->uploadData(m_glQueue);
m_glQueue->PushBack(yg::gl::Packet(make_shared_ptr(new yg::gl::Renderer::FinishCommand()), false));
if (m_glQueue)
m_glQueue->PushBack(yg::gl::Packet(make_shared_ptr(new yg::gl::Renderer::FinishCommand()), false));
/// waiting for upload to complete
if (m_glQueue)
m_glQueue->joinFence(m_glQueue->insertFence());
m_glQueue->completeCommands();
else
OGLCHECK(glFinish());
}