blob: 20f236f995afede5480b33c603ab54e611225861 (
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
|
https://bugzilla.mozilla.org/show_bug.cgi?id=623797
work around new features that are not avaliable in system-cairo on linux
(romaxa's patch with modification for return failure with <gcc-4.5)
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;
@@ -432,26 +434,32 @@ gfxASurface::FormatFromContent(gfxASurfa
}
}
void
gfxASurface::SetSubpixelAntialiasingEnabled(PRBool aEnabled)
{
if (!mSurfaceValid)
return;
+#ifdef MOZ_TREE_CAIRO
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/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
|