Loading common/drawpanel_gal.cpp +11 −1 Original line number Diff line number Diff line Loading @@ -88,6 +88,8 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); m_timeStamp = 0; } Loading @@ -107,7 +109,7 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL() } void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent ) void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) { Refresh(); } Loading @@ -121,6 +123,14 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) { const unsigned int FPS_LIMIT = 50; // Framerate limiter wxLongLong currentTimeStamp = wxGetLocalTimeMillis(); if( currentTimeStamp - m_timeStamp < ( 1 / FPS_LIMIT ) ) return; m_timeStamp = currentTimeStamp; #ifdef __WXDEBUG__ prof_counter time; Loading include/class_drawpanel_gal.h +2 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ public: virtual void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); protected: void onPaint( wxPaintEvent& aEvent ); void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onSize( wxSizeEvent& aEvent ); KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface Loading @@ -90,6 +90,7 @@ protected: KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) GalType m_currentGal; ///< Currently used GAL bool m_useShaders; ///< Are shaders used? (only for OpenGL GAL) wxLongLong m_timeStamp; std::string m_galShaderPath; ///< Path to shader files, used in OpenGL mode }; Loading Loading
common/drawpanel_gal.cpp +11 −1 Original line number Diff line number Diff line Loading @@ -88,6 +88,8 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); m_timeStamp = 0; } Loading @@ -107,7 +109,7 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL() } void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent ) void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) { Refresh(); } Loading @@ -121,6 +123,14 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) { const unsigned int FPS_LIMIT = 50; // Framerate limiter wxLongLong currentTimeStamp = wxGetLocalTimeMillis(); if( currentTimeStamp - m_timeStamp < ( 1 / FPS_LIMIT ) ) return; m_timeStamp = currentTimeStamp; #ifdef __WXDEBUG__ prof_counter time; Loading
include/class_drawpanel_gal.h +2 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ public: virtual void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); protected: void onPaint( wxPaintEvent& aEvent ); void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onSize( wxSizeEvent& aEvent ); KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface Loading @@ -90,6 +90,7 @@ protected: KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) GalType m_currentGal; ///< Currently used GAL bool m_useShaders; ///< Are shaders used? (only for OpenGL GAL) wxLongLong m_timeStamp; std::string m_galShaderPath; ///< Path to shader files, used in OpenGL mode }; Loading