1
0
Fork 0

Retrieve property node once instead of using fgGetXXX

This commit is contained in:
Thomas Geymayer 2012-09-26 12:18:47 +02:00
parent 2f630e502d
commit 703bb9bbf3

View file

@ -52,10 +52,13 @@ class Canvas::DrawCallback:
const long frame = renderInfo.getView()->getFrameStamp()
->getFrameNumber();
static SGPropertyNode_ptr node_frame =
globals->get_props()->getNode(canvas::VG_INIT_SIGNAL, true);
// If OpenVG has been initialized we need to redraw the frame, because
// initializing has happened instead of rendering.
// Otherwise we just reset the _render_dirty flag.
_canvas->_render_dirty = (frame == fgGetLong(canvas::VG_INIT_SIGNAL));
_canvas->_render_dirty = (frame == node_frame->getLongValue());
}
protected: