From: Thomas Geymayer Date: Wed, 26 Sep 2012 10:18:47 +0000 (+0200) Subject: Retrieve property node once instead of using fgGetXXX X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=703bb9bbf375125a18d4609f40842a43bd330db8;p=flightgear.git Retrieve property node once instead of using fgGetXXX --- diff --git a/src/Canvas/canvas.cxx b/src/Canvas/canvas.cxx index 2efe42638..595370ab5 100644 --- a/src/Canvas/canvas.cxx +++ b/src/Canvas/canvas.cxx @@ -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: