[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog gui/gtk.cpp
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] gnash ChangeLog gui/gtk.cpp |
Date: |
Thu, 08 Mar 2007 17:58:34 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Bastiaan Jacques <bjacques> 07/03/08 17:58:33
Modified files:
. : ChangeLog
gui : gtk.cpp
Log message:
Fix GTK/AGG redrawing upon expose events by switching
to the new invalidation interface. In this incarnation, only
the area
which is newly exposed is redrawn.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2581&r2=1.2582
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.76&r2=1.77
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2581
retrieving revision 1.2582
diff -u -b -r1.2581 -r1.2582
--- ChangeLog 8 Mar 2007 17:47:53 -0000 1.2581
+++ ChangeLog 8 Mar 2007 17:58:33 -0000 1.2582
@@ -1,3 +1,9 @@
+2007-03-07 Bastiaan Jacques <address@hidden>
+
+ * gui/gtk.cpp: Fix GTK/AGG redrawing upon expose events by switching
+ to the new invalidation interface. In this incarnation, only the area
+ which is newly exposed is redrawn.
+
2007-03-07 Udo Giacomozzi <address@hidden>
* extensions/fileio/fileio.cpp: Fixed fread()
Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -b -r1.76 -r1.77
--- gui/gtk.cpp 8 Mar 2007 00:11:13 -0000 1.76
+++ gui/gtk.cpp 8 Mar 2007 17:58:33 -0000 1.77
@@ -14,7 +14,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-/* $Id: gtk.cpp,v 1.76 2007/03/08 00:11:13 strk Exp $ */
+/* $Id: gtk.cpp,v 1.77 2007/03/08 17:58:33 bjacques Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1004,20 +1004,23 @@
gboolean
GtkGui::expose_event(GtkWidget *const /*widget*/,
- GdkEventExpose *const /*event*/,
+ GdkEventExpose *const event,
const gpointer data)
{
// GNASH_REPORT_FUNCTION;
GtkGui* gui = static_cast<GtkGui*>(data);
- // Set an invalidate region that contains the entire screen for sure
- // TODO: be more conservative in setting draw_bounds
- // (look at the GdkEventExpose)
- rect draw_bounds; draw_bounds.set_world();
+ InvalidatedRanges ranges;
- gui->setInvalidatedRegion(draw_bounds);
+ int xmin = event->area.x, xmax = event->area.x + event->area.width,
+ ymin = event->area.y, ymax = event->area.y + event->area.height;
+ geometry::Range2d<float> exposed(PIXELS_TO_TWIPS(xmin),
+ PIXELS_TO_TWIPS(ymin), PIXELS_TO_TWIPS(xmax), PIXELS_TO_TWIPS(ymax));
+
+ ranges.add(exposed);
+ gui->setInvalidatedRegions(ranges);
gui->renderBuffer();
return TRUE;