/[packages]/cauldron/xulrunner/current/SOURCES/xulrunner-2.0-system-cairo.patch
ViewVC logotype

Contents of /cauldron/xulrunner/current/SOURCES/xulrunner-2.0-system-cairo.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 43415 - (show annotations) (download)
Sat Jan 29 12:57:08 2011 UTC (13 years, 2 months ago) by dmorgan
File size: 3356 byte(s)
Merge mdv commit 633159
1 https://bugzilla.mozilla.org/show_bug.cgi?id=623797
2
3 work around new features that are not avaliable in system-cairo on linux
4 (romaxa's original patch with modifications to use cairo-tee)
5
6 diff --git a/config/system-headers b/config/system-headers
7 --- a/config/system-headers
8 +++ b/config/system-headers
9 @@ -81,16 +81,17 @@ pixman.h
10 cairo.h
11 cairo-atsui.h
12 cairo-beos.h
13 cairo-ft.h
14 cairo-glitz.h
15 cairo-os2.h
16 cairo-pdf.h
17 cairo-ps.h
18 +cairo-tee.h
19 cairo-quartz.h
20 cairo-win32.h
21 cairo-xlib.h
22 cairo-xlib-xrender.h
23 cairo-directfb.h
24 cairo-qpainter.h
25 #endif
26 dfiff.h
27 diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp
28 --- a/gfx/thebes/gfxASurface.cpp
29 +++ b/gfx/thebes/gfxASurface.cpp
30 @@ -216,19 +216,21 @@ gfxASurface::Init(cairo_surface_t* surfa
31
32 mSurface = surface;
33 mSurfaceValid = PR_TRUE;
34
35 if (existingSurface) {
36 mFloatingRefs = 0;
37 } else {
38 mFloatingRefs = 1;
39 +#ifdef MOZ_TREE_CAIRO
40 if (cairo_surface_get_content(surface) != CAIRO_CONTENT_COLOR) {
41 cairo_surface_set_subpixel_antialiasing(surface, CAIRO_SUBPIXEL_ANTIALIASING_DISABLED);
42 }
43 +#endif
44 }
45 }
46
47 gfxASurface::gfxSurfaceType
48 gfxASurface::GetType() const
49 {
50 if (!mSurfaceValid)
51 return (gfxSurfaceType)-1;
52 @@ -430,28 +432,34 @@ gfxASurface::FormatFromContent(gfxASurfa
53 default:
54 return ImageFormatRGB24;
55 }
56 }
57
58 void
59 gfxASurface::SetSubpixelAntialiasingEnabled(PRBool aEnabled)
60 {
61 +#ifdef MOZ_TREE_CAIRO
62 if (!mSurfaceValid)
63 return;
64 cairo_surface_set_subpixel_antialiasing(mSurface,
65 aEnabled ? CAIRO_SUBPIXEL_ANTIALIASING_ENABLED : CAIRO_SUBPIXEL_ANTIALIASING_DISABLED);
66 +#endif
67 }
68
69 PRBool
70 gfxASurface::GetSubpixelAntialiasingEnabled()
71 {
72 if (!mSurfaceValid)
73 return PR_FALSE;
74 +#ifdef MOZ_TREE_CAIRO
75 return cairo_surface_get_subpixel_antialiasing(mSurface) == CAIRO_SUBPIXEL_ANTIALIASING_ENABLED;
76 +#else
77 + return PR_TRUE;
78 +#endif
79 }
80
81 PRInt32
82 gfxASurface::BytePerPixelFromFormat(gfxImageFormat format)
83 {
84 switch (format) {
85 case ImageFormatARGB32:
86 case ImageFormatRGB24:
87 diff --git a/gfx/thebes/gfxTeeSurface.cpp b/gfx/thebes/gfxTeeSurface.cpp
88 --- a/gfx/thebes/gfxTeeSurface.cpp
89 +++ b/gfx/thebes/gfxTeeSurface.cpp
90 @@ -32,17 +32,24 @@
91 * and other provisions required by the GPL or the LGPL. If you do not delete
92 * the provisions above, a recipient may use your version of this file under
93 * the terms of any one of the MPL, the GPL or the LGPL.
94 *
95 * ***** END LICENSE BLOCK ***** */
96
97 #include "gfxTeeSurface.h"
98
99 +/* Once cairo in tree is update ensure we remove the ifdef
100 + and just include cairo-tee.h
101 +*/
102 +#ifdef MOZ_TREE_CAIRO
103 #include "cairo.h"
104 +#else
105 +#include "cairo-tee.h"
106 +#endif
107
108 gfxTeeSurface::gfxTeeSurface(cairo_surface_t *csurf)
109 {
110 Init(csurf, PR_TRUE);
111 }
112
113 gfxTeeSurface::gfxTeeSurface(gfxASurface **aSurfaces, PRInt32 aSurfaceCount)
114 {
115 diff --git a/js/src/config/system-headers b/js/src/config/system-headers
116 --- a/js/src/config/system-headers
117 +++ b/js/src/config/system-headers
118 @@ -82,16 +82,17 @@ cairo.h
119 cairo-atsui.h
120 cairo-beos.h
121 cairo-ft.h
122 cairo-glitz.h
123 cairo-os2.h
124 cairo-pdf.h
125 cairo-ps.h
126 cairo-quartz.h
127 +cairo-tee.h
128 cairo-win32.h
129 cairo-xlib.h
130 cairo-xlib-xrender.h
131 cairo-directfb.h
132 cairo-qpainter.h
133 #endif
134 dfiff.h
135 exception
136
137
138

  ViewVC Help
Powered by ViewVC 1.1.30