Re: GDK-DirectFB Patches



hi !

i am very interested in these patches which speed up gtk+ with directfb. 
thanks Denis Oliver Kropp.

i have now cross builded gtk-trunk for an embeddeded system. here i have some 
changes which i found on building:

IMHO there is a endif missing, or do i understand here something completly 
wrong ?

Index: gtk+-2.TRUNK/gdk/directfb/gdkdirectfb.h
===================================================================
--- gtk+-2.TRUNK.orig/gdk/directfb/gdkdirectfb.h
+++ gtk+-2.TRUNK/gdk/directfb/gdkdirectfb.h
@@ -37,6 +37,7 @@
  */
 #ifndef GDK_DIRECTFB_NO_EXPERIMENTS
 #define GDK_DIRECTFB_NO_EXPERIMENTS
+#endif

 #include <cairo.h>
 #include <directfb.h>

attached patch is needed for building here, on my system... any comments ?

i still found not out which patches from denis were applied, so i have to 
look, also i have only builded for now, not tested on the embedded 
hardware... so i will tell you my things what i found out.

thx denis for doing work on that...
regards manfred

Am Wednesday 05 December 2007 schrieb Denis Oliver Kropp:
> Hi,
>
> here are a bunch of patches which improve the overall speed of GDK-DirectFB
> a lot and also contain a few fixes. In our special test case the load was
> reduced by 70%, speeding up tab switching 3.3 times!
>
> The patches should be applied in the following order (probably skipping the
> two HACKs):
>
> window_flip_group.patch
> no_background_pixmap_fix.patch
> blit_after_cairo_fix.patch
> rect_clip_fix.patch
> rgb16_default.patch
> HACK_no_clear.patch
> fast_blend.patch
> opt_clip_region_and_fill_rects.patch
> no_state_resets.patch
> opt_temp_region_etc.patch
> opt_temp_region2.patch
> HACK_no_clear_area.patch
>
>
> Another patch is for Cairo:
>
> cairo_show_glyphs.patch
>
>
> Each patch header has a description, here's an overview:
>
> - window_flip_group.patch
> GDK-DIRECTFB: During update processing, don't flip immediately, but
> accumulate a flipping region using the DirectFB update manager and flush
> all Flip()s at the end of all painting. This results in a UI update In One
> Go [tm]!
>
>
> - no_background_pixmap_fix.patch
> GDK-DIRECTFB: Fix setting of NULL pixmaps resulting in a GDK_NO_BG setting.
> Probably GDK had an API change at some point in time.
>
>
> - blit_after_cairo_fix.patch
> GDK-DIRECTFB: Fix wrong blitting flags being used by GDK after Cairo
> changed the state.
>
>
> - rect_clip_fix.patch
> GDK-DIRECTFB: Fix clipping rectangle for filling rectangles after Cairo has
> modified it.
>
>
> - rgb16_default.patch
> GDK-DIRECTFB: Use RGB16 format by default.
>
>
> - HACK_no_clear.patch
> GDK-DIRECTFB: Experimentally comment out the clear in
> gdk_window_impl_directfb_begin_paint_region().
>
> This speeds up the test app without visual impact, but it might harm other
> (traditional?) apps.
>
>
> - fast_blend.patch
> GDK-DIRECTFB: Start with our own implementation of
> gdk_drawable_draw_pixbuf() based on the original.
>
> First modifications are:
> - No scratch image used, saving two copies.
> - Replaced composite_565() implementation by an optimized version doing 32
> bit wise I/O.
>
> Clipping might need to be fixed.
>
>
> - opt_clip_region_and_fill_rects.patch
> GDK-DIRECTFB: Another small improvement by using FillRectangles() instead
> of FillRectangle().
>
> Avoid a temporary memory allocation in gdk_directfb_clip_region().
>
>
> - no_state_resets.patch
> GDK-DIRECTFB: Don't set back states after drawing/blitting, just make sure
> they're correct before being used.
>
>
> - opt_temp_region_etc.patch
> GDK-DIRECTFB: Introduce temp_region functions and avoid temporary memory
> allocation in a lot of places.
>
>
> - opt_temp_region2.patch
> GDK-DIRECTFB: Changed remaining places where temp_region can be used. Added
> caching of the clip region during painting.
>
>
> - HACK_no_clear_area.patch
> GDK-DIRECTFB: Experimentally comment out the clear in
> _gdk_windowing_window_clear_area[_e] and don't invalidate in
> show_window_internal().
>
> This speeds up the test app without visual impact, but it might harm other
> (traditional?) apps.
>
>
> - cairo_show_glyphs.patch
> CAIRO-DIRECTFB: Use DirectFB for show_glyphs() even if it is unaccelerated.
>
> The software fallback in DirectFB is well optimized.

-- 
mfg
	Manfred Gruber
	m gruber tirol com
	http://www.myspace.com/fredl_grma  
Index: gtk+-2.TRUNK/gdk/directfb/gdktestutils-directfb.c
===================================================================
--- /dev/null
+++ gtk+-2.TRUNK/gdk/directfb/gdktestutils-directfb.c
@@ -0,0 +1,54 @@
+/* Gtk+ testing utilities
+ * Copyright (C) 2007
+ * Authors:
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include <gdk/gdktestutils.h>
+#include <gdk/gdkkeysyms.h>
+#include <gdk/gdkinternals.h>
+
+void
+gdk_test_render_sync (GdkWindow *window)
+{
+}
+
+gboolean
+gdk_test_simulate_key (GdkWindow      *window,
+                       gint            x,
+                       gint            y,
+                       guint           keyval,
+                       GdkModifierType modifiers,
+                       GdkEventType    key_pressrelease)
+{
+  g_return_val_if_fail (key_pressrelease == GDK_KEY_PRESS || key_pressrelease == GDK_KEY_RELEASE, FALSE);
+  g_return_val_if_fail (window != NULL, FALSE);
+  return FALSE;
+}
+
+gboolean
+gdk_test_simulate_button (GdkWindow      *window,
+                          gint            x,
+                          gint            y,
+                          guint           button, /*1..3*/
+                          GdkModifierType modifiers,
+                          GdkEventType    button_pressrelease)
+{
+  g_return_val_if_fail (button_pressrelease == GDK_BUTTON_PRESS || button_pressrelease == GDK_BUTTON_RELEASE, FALSE);
+  g_return_val_if_fail (window != NULL, FALSE);
+
+  return FALSE;
+}
Index: gtk+-2.TRUNK/gdk/directfb/Makefile.am
===================================================================
--- gtk+-2.TRUNK.orig/gdk/directfb/Makefile.am
+++ gtk+-2.TRUNK/gdk/directfb/Makefile.am
@@ -42,6 +42,7 @@ libgdk_directfb_la_SOURCES =	\
 	gdkscreen-directfb.c	\
 	gdkselection-directfb.c	\
 	gdkspawn-directfb.c     \
+	gdktestutils-directfb.c \
 	gdkvisual-directfb.c	\
 	gdkdirectfb.h		\
 	gdkwindow-directfb.c	\


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]