From aa4229cbb9f2b264ca96c3beedc66b1c79ccc1f5 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Thu, 5 Mar 2009 23:13:55 -0700 Subject: Made some optimizations based on some profiling done by Octalot, as well as some other optimizations that I could see that cut down on some unneeded redraws, which in turn improved frame rates slightly. Signed-off-by: Ira Rice --- src/gui/scrollarea.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/scrollarea.cpp') diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp index d655ad52..43b27f23 100644 --- a/src/gui/scrollarea.cpp +++ b/src/gui/scrollarea.cpp @@ -149,6 +149,9 @@ void ScrollArea::init() void ScrollArea::logic() { + if (!isVisible()) + return; + gcn::ScrollArea::logic(); gcn::Widget *content = getContent(); @@ -171,6 +174,9 @@ void ScrollArea::logic() void ScrollArea::draw(gcn::Graphics *graphics) { + if (!isVisible()) + return; + if (mVBarVisible) { drawUpButton(graphics); -- cgit v1.2.3-70-g09d2