[xulrunner] Avoid failing to build because of the lack kof cairo tee surface support

Christopher Aillon caillon at fedoraproject.org
Fri Jan 14 21:25:26 UTC 2011


commit 1d5a2055c040c8ea4ea06434e5080f65f798964e
Author: Christopher Aillon <caillon at redhat.com>
Date:   Fri Jan 14 13:25:04 2011 -0800

    Avoid failing to build because of the lack kof cairo tee surface support
    
    Patch from Mike Hommey at https://bugzilla.mozilla.org/show_bug.cgi?id=624684

 xulrunner-2.0-system-cairo-tee.patch |   68 ++++++++++++++++++++++++++++++++++
 xulrunner.spec                       |    2 +
 2 files changed, 70 insertions(+), 0 deletions(-)
---
diff --git a/xulrunner-2.0-system-cairo-tee.patch b/xulrunner-2.0-system-cairo-tee.patch
new file mode 100644
index 0000000..1207036
--- /dev/null
+++ b/xulrunner-2.0-system-cairo-tee.patch
@@ -0,0 +1,68 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=624684
+
+commit c9e4f80ccf3de8f17c95c701edd14265d23db4e3
+Author: Mike Hommey <mh at glandium.org>
+Date:   Tue Jan 11 12:09:12 2011 +0100
+
+    Avoid failing to build because of the lack of cairo tee surface support
+
+diff --git a/gfx/thebes/gfxContext.cpp b/gfx/thebes/gfxContext.cpp
+index f271ea2..f4606ee 100644
+--- a/gfx/thebes/gfxContext.cpp
++++ b/gfx/thebes/gfxContext.cpp
+@@ -777,6 +777,7 @@ gfxContext::PushGroupAndCopyBackground(gfxASurface::gfxContentType content)
+             cairo_push_group_with_content(mCairo, CAIRO_CONTENT_COLOR);
+             nsRefPtr<gfxASurface> d = CurrentSurface();
+ 
++#if CAIRO_HAS_TEE_SURFACE
+             if (d->GetType() == gfxASurface::SurfaceTypeTee) {
+                 NS_ASSERTION(s->GetType() == gfxASurface::SurfaceTypeTee, "Mismatched types");
+                 nsAutoTArray<nsRefPtr<gfxASurface>,2> ss;
+@@ -787,7 +788,9 @@ gfxContext::PushGroupAndCopyBackground(gfxASurface::gfxContentType content)
+                 for (PRUint32 i = 0; i < ss.Length(); ++i) {
+                     CopySurface(ss[i], ds[i]);
+                 }
+-            } else {
++            } else
++#endif
++            {
+                 CopySurface(s, d);
+             }
+             d->SetOpaqueRect(s->GetOpaqueRect());
+diff --git a/gfx/thebes/gfxTeeSurface.cpp b/gfx/thebes/gfxTeeSurface.cpp
+index ecb2d36..dd22c81 100644
+--- a/gfx/thebes/gfxTeeSurface.cpp
++++ b/gfx/thebes/gfxTeeSurface.cpp
+@@ -39,6 +39,7 @@
+ #include "cairo-tee.h"
+ #endif
+ 
++#if CAIRO_HAS_TEE_SURFACE
+ gfxTeeSurface::gfxTeeSurface(cairo_surface_t *csurf)
+ {
+     Init(csurf, PR_TRUE);
+@@ -75,3 +76,4 @@ gfxTeeSurface::GetSurfaces(nsTArray<nsRefPtr<gfxASurface> >* aSurfaces)
+         *elem = Wrap(csurf);
+     }
+ }
++#endif
+diff --git a/gfx/thebes/gfxTeeSurface.h b/gfx/thebes/gfxTeeSurface.h
+index cb3981f..93c3610 100644
+--- a/gfx/thebes/gfxTeeSurface.h
++++ b/gfx/thebes/gfxTeeSurface.h
+@@ -41,6 +41,7 @@
+ #include "gfxASurface.h"
+ #include "nsTArray.h"
+ 
++#if CAIRO_HAS_TEE_SURFACE
+ /**
+  * Wraps a cairo_tee_surface. The first surface in the surface list is the
+  * primary surface, which answers all surface queries (including size).
+@@ -55,5 +56,6 @@ public:
+ 
+     void GetSurfaces(nsTArray<nsRefPtr<gfxASurface> > *aSurfaces);
+ };
++#endif
+ 
+ #endif /* GFX_TEESURFACE_H */
+
diff --git a/xulrunner.spec b/xulrunner.spec
index 4645f40..d8b86a4 100644
--- a/xulrunner.spec
+++ b/xulrunner.spec
@@ -52,6 +52,7 @@ Patch12:        xulrunner-2.0-64bit-big-endian.patch
 Patch13:        xulrunner-2.0-secondary-jit.patch
 Patch14:        xulrunner-2.0-chromium-types.patch
 Patch15:        xulrunner-2.0-system-cairo.patch
+Patch16:        xulrunner-2.0-system-cairo-tee.patch
 
 # Fedora specific patches
 Patch20:        mozilla-193-pkgconfig.patch
@@ -157,6 +158,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \
 %patch13 -p2 -b .secondary-jit
 %patch14 -p2 -b .chromium-types
 %patch15 -p1 -b .system-cairo
+%patch16 -p1 -b .system-cairo-tee
 
 %patch20 -p2 -b .pk
 %patch21 -p2 -b .jpeg-turbo


More information about the scm-commits mailing list