Skip to content

Commit

Permalink
Added node tree dump of canvases shown in ImageNodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsch-amdx committed Jul 24, 2017
1 parent 977b169 commit fbd5e5b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/player/ImageNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,16 @@ GPUImage::Source ImageNode::getSource() const
return m_pGPUImage->getSource();
}

string ImageNode::dump(int indent)
{
string dumpStr = AreaNode::dump(indent);
if (m_pGPUImage->getSource() == GPUImage::SCENE) {
OffscreenCanvasPtr pCanvas = m_pGPUImage->getCanvas();
dumpStr += pCanvas->getRootNode()->dump(indent+2);
}
return dumpStr;
}

void ImageNode::checkReload()
{
if (isCanvasURL(m_href)) {
Expand Down
2 changes: 2 additions & 0 deletions src/player/ImageNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class AVG_API ImageNode : public RasterNode
virtual IntPoint getMediaSize();
GPUImage::Source getSource() const;

virtual std::string dump(int indent = 0);

private:
bool isCanvasURL(const std::string& sURL);
void checkCanvasValid(const CanvasPtr& pCanvas);
Expand Down

0 comments on commit fbd5e5b

Please sign in to comment.