[meego-commits] 5497: Changes to Trunk/gtk2

Anas Nashif nashif at linux.intel.com
Fri Jul 9 05:02:11 UTC 2010


Hi,
I have made the following changes to gtk2 in project Trunk. Please review and accept ASAP.

Thank You,
Anas Nashif

[This message was auto-generated]

---

Request #5497:

  submit:   Trunk:Testing/gtk2(r16) -> Trunk/gtk2


Message:
    * Tue Jun 29 2010 Li Peng <peng.li at intel.com> - 2.20.0
- Add gdk_xshmgetimage.patch to improve flash workload, fix BMC #2783

State:   new          2010-07-08T16:57:38 nashif
Comment: None



changes files:
--------------
--- gtk2.changes
+++ gtk2.changes
@@ -0,0 +1,3 @@
+* Tue Jun 29 2010 Li Peng <peng.li at intel.com> - 2.20.0
+- Add gdk_xshmgetimage.patch to improve flash workload, fix BMC #2783
+

new:
----
  gdk_xshmgetimage.patch

spec files:
-----------
--- gtk2.spec
+++ gtk2.spec
@@ -41,6 +41,7 @@
 Patch103: gtk+-2.16.1-file-chooser-filter-combo-ellipsizing.patch
 # https://bugzilla.gnome.org/show_bug.cgi?id=613597
 Patch104: gtk+-2.19.7-fix-introspection-parallel-build.patch
+Patch105: gdk_xshmgetimage.patch
 
 BuildRequires: pango-devel >= %{pango_version}
 BuildRequires: glib2-devel >= %{glib2_version}
@@ -164,6 +165,7 @@
 %patch102 -p1 -b .default-icon-theme
 %patch103 -p1 -b .ellipsizing
 %patch104 -p1 -b .fix-introspection-parallel-build
+%patch105 -p1 -b .gdk_xshmgetimage
 
 %build
 %configure --with-xinput=xfree 		\

other changes:
--------------

++++++ gdk_xshmgetimage.patch (new)
--- gdk_xshmgetimage.patch
+++ gdk_xshmgetimage.patch
+diff --git a/gdk/x11/gdkimage-x11.c b/gdk/x11/gdkimage-x11.c
+index 1c217a0..b489a87 100644
+--- a/gdk/x11/gdkimage-x11.c
++++ b/gdk/x11/gdkimage-x11.c
+@@ -549,7 +549,7 @@ _gdk_x11_copy_to_image (GdkDrawable    *drawable,
+       
+       if (!image)
+ 	{
+-	  image = _gdk_image_new_for_depth (impl->screen, GDK_IMAGE_NORMAL, 
++	  image = _gdk_image_new_for_depth (impl->screen, GDK_IMAGE_FASTEST, 
+ 					    visual, width, height,
+ 					    gdk_drawable_get_depth (drawable));
+ 	  created_image = TRUE;
+@@ -557,20 +557,31 @@ _gdk_x11_copy_to_image (GdkDrawable    *drawable,
+ 
+       private = PRIVATE_DATA (image);
+ 
+-      /* In the ShmImage but no ShmPixmap case, we could use XShmGetImage when
++#ifdef USE_SHM
++      /* In the ShmImage but no ShmPixmap case, we use XShmGetImage when
+        * we are getting the entire image.
+        */
++      if (image->type == GDK_IMAGE_SHARED &&
++          image->width == req.width && image->height == req.height)
++        {
++          if (!XShmGetImage (xdisplay, impl->xid, private->ximage, req.x, req.y, AllPlanes))
++            success = FALSE;
++        }
++      else
++#endif /* USE_SHM */
+       if (XGetSubImage (xdisplay, impl->xid,
+ 			req.x, req.y, req.width, req.height,
+ 			AllPlanes, ZPixmap,
+ 			private->ximage,
+ 			dest_x + req.x - src_x, dest_y + req.y - src_y) == None)
+-	{
+-	  if (created_image)
+-	    g_object_unref (image);
+-	  image = NULL;
+ 	  success = FALSE;
+-	}
++
++      if (!success)
++      {
++        if (created_image)
++          g_object_unref (image);
++        image = NULL;
++      }
+     }
+ 
+   gdk_error_trap_pop ();



More information about the MeeGo-commits mailing list