forked from organicmaps/organicmaps
added DumpCommand for the purpose of command stream logging.
This commit is contained in:
parent
96cf54d23e
commit
f8f7344b32
4 changed files with 34 additions and 0 deletions
|
@ -126,6 +126,11 @@ namespace yg
|
|||
// OGLCHECK(glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ));
|
||||
}
|
||||
|
||||
void GeometryRenderer::DrawGeometry::dump()
|
||||
{
|
||||
LOG(LINFO, ("DrawGeometry, texture=", m_texture->id(), ", indicesCount=", m_indicesCount));
|
||||
}
|
||||
|
||||
void GeometryRenderer::drawGeometry(shared_ptr<BaseTexture> const & texture,
|
||||
Storage const & storage,
|
||||
size_t indicesCount,
|
||||
|
@ -189,6 +194,11 @@ namespace yg
|
|||
m_texturePool->Free(m_texture);
|
||||
}
|
||||
|
||||
void GeometryRenderer::FreeTexture::dump()
|
||||
{
|
||||
LOG(LINFO, ("FreeTexture, texture=", m_texture->id(), ", pool=", m_texturePool->ResName()));
|
||||
}
|
||||
|
||||
void GeometryRenderer::FreeTexture::cancel()
|
||||
{
|
||||
perform();
|
||||
|
|
|
@ -52,6 +52,7 @@ namespace yg
|
|||
unsigned m_primitiveType;
|
||||
|
||||
void perform();
|
||||
void dump();
|
||||
};
|
||||
|
||||
struct FreeStorage : public Command
|
||||
|
@ -70,6 +71,7 @@ namespace yg
|
|||
|
||||
void perform();
|
||||
void cancel();
|
||||
void dump();
|
||||
};
|
||||
|
||||
struct UnlockStorage : public Command
|
||||
|
|
|
@ -28,6 +28,18 @@ namespace yg
|
|||
void Command::perform()
|
||||
{}
|
||||
|
||||
void Command::dump()
|
||||
{}
|
||||
|
||||
DumpCommand::DumpCommand(shared_ptr<Command> const & cmd)
|
||||
: m_cmd(cmd)
|
||||
{}
|
||||
|
||||
void DumpCommand::perform()
|
||||
{
|
||||
m_cmd->dump();
|
||||
}
|
||||
|
||||
Packet::Packet()
|
||||
{}
|
||||
|
||||
|
|
|
@ -29,10 +29,20 @@ namespace yg
|
|||
virtual ~Command();
|
||||
virtual void perform();
|
||||
virtual void cancel();
|
||||
virtual void dump();
|
||||
|
||||
friend class Renderer;
|
||||
};
|
||||
|
||||
struct DumpCommand : Command
|
||||
{
|
||||
shared_ptr<Command> m_cmd;
|
||||
|
||||
DumpCommand(shared_ptr<Command> const & cmd);
|
||||
|
||||
void perform();
|
||||
};
|
||||
|
||||
template <typename Fn>
|
||||
struct FunctorCommand : Command
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue