summaryrefslogtreecommitdiffstats
path: root/xulrunner-2.0-system-cairo.patch
blob: 5300f38b1b326980935b34af7768a34f0fbd3cd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
https://bugzilla.mozilla.org/show_bug.cgi?id=623797

work around new features that are not avaliable in system-cairo on linux
(romaxa's original patch with modifications to use cairo-tee)

diff --git a/config/system-headers b/config/system-headers
--- a/config/system-headers
+++ b/config/system-headers
@@ -81,16 +81,17 @@ pixman.h
 cairo.h
 cairo-atsui.h
 cairo-beos.h
 cairo-ft.h
 cairo-glitz.h
 cairo-os2.h
 cairo-pdf.h
 cairo-ps.h
+cairo-tee.h
 cairo-quartz.h
 cairo-win32.h
 cairo-xlib.h
 cairo-xlib-xrender.h
 cairo-directfb.h
 cairo-qpainter.h
 #endif
 dfiff.h
diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp
--- a/gfx/thebes/gfxASurface.cpp
+++ b/gfx/thebes/gfxASurface.cpp
@@ -216,19 +216,21 @@ gfxASurface::Init(cairo_surface_t* surfa
 
     mSurface = surface;
     mSurfaceValid = PR_TRUE;
 
     if (existingSurface) {
         mFloatingRefs = 0;
     } else {
         mFloatingRefs = 1;
+#ifdef MOZ_TREE_CAIRO
         if (cairo_surface_get_content(surface) != CAIRO_CONTENT_COLOR) {
             cairo_surface_set_subpixel_antialiasing(surface, CAIRO_SUBPIXEL_ANTIALIASING_DISABLED);
         }
+#endif
     }
 }
 
 gfxASurface::gfxSurfaceType
 gfxASurface::GetType() const
 {
     if (!mSurfaceValid)
         return (gfxSurfaceType)-1;
@@ -430,28 +432,34 @@ gfxASurface::FormatFromContent(gfxASurfa
         default:
             return ImageFormatRGB24;
     }
 }
 
 void
 gfxASurface::SetSubpixelAntialiasingEnabled(PRBool aEnabled)
 {
+#ifdef MOZ_TREE_CAIRO
     if (!mSurfaceValid)
         return;
     cairo_surface_set_subpixel_antialiasing(mSurface,
         aEnabled ? CAIRO_SUBPIXEL_ANTIALIASING_ENABLED : CAIRO_SUBPIXEL_ANTIALIASING_DISABLED);
+#endif
 }
 
 PRBool
 gfxASurface::GetSubpixelAntialiasingEnabled()
 {
     if (!mSurfaceValid)
       return PR_FALSE;
+#ifdef MOZ_TREE_CAIRO
     return cairo_surface_get_subpixel_antialiasing(mSurface) == CAIRO_SUBPIXEL_ANTIALIASING_ENABLED;
+#else
+    return PR_TRUE;
+#endif
 }
 
 PRInt32
 gfxASurface::BytePerPixelFromFormat(gfxImageFormat format)
 {
     switch (format) {
         case ImageFormatARGB32:
         case ImageFormatRGB24:
diff --git a/gfx/thebes/gfxTeeSurface.cpp b/gfx/thebes/gfxTeeSurface.cpp
--- a/gfx/thebes/gfxTeeSurface.cpp
+++ b/gfx/thebes/gfxTeeSurface.cpp
@@ -32,17 +32,24 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "gfxTeeSurface.h"
 
+/* Once cairo in tree is update ensure we remove the ifdef
+    and just include cairo-tee.h
+*/
+#ifdef MOZ_TREE_CAIRO
 #include "cairo.h"
+#else
+#include "cairo-tee.h"
+#endif
 
 gfxTeeSurface::gfxTeeSurface(cairo_surface_t *csurf)
 {
     Init(csurf, PR_TRUE);
 }
 
 gfxTeeSurface::gfxTeeSurface(gfxASurface **aSurfaces, PRInt32 aSurfaceCount)
 {
diff --git a/js/src/config/system-headers b/js/src/config/system-headers
--- a/js/src/config/system-headers
+++ b/js/src/config/system-headers
@@ -82,16 +82,17 @@ cairo.h
 cairo-atsui.h
 cairo-beos.h
 cairo-ft.h
 cairo-glitz.h
 cairo-os2.h
 cairo-pdf.h
 cairo-ps.h
 cairo-quartz.h
+cairo-tee.h
 cairo-win32.h
 cairo-xlib.h
 cairo-xlib-xrender.h
 cairo-directfb.h
 cairo-qpainter.h
 #endif
 dfiff.h
 exception