aboutsummaryrefslogtreecommitdiff
blob: 02cdf316bbc388d439ee403e5dec1a09913d97ee (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
diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp
--- a/gfx/thebes/gfxASurface.cpp
+++ b/gfx/thebes/gfxASurface.cpp
@@ -222,7 +222,9 @@ gfxASurface::Init(cairo_surface_t* surfa
     } 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
     }
 }
@@ -438,6 +440,8 @@ gfxASurface::SetSubpixelAntialiasingEnab
     if (!mSurfaceValid)
         return;
+#ifdef MOZ_TREE_CAIRO
     cairo_surface_set_subpixel_antialiasing(mSurface,
         aEnabled ? CAIRO_SUBPIXEL_ANTIALIASING_ENABLED : CAIRO_SUBPIXEL_ANTIALIASING_DISABLED);
+#endif
 }
 
@@ -447,5 +451,9 @@ gfxASurface::GetSubpixelAntialiasingEnab
     if (!mSurfaceValid)
       return PR_FALSE;
+#ifdef MOZ_TREE_CAIRO
     return cairo_surface_get_subpixel_antialiasing(mSurface) == CAIRO_SUBPIXEL_ANTIALIASING_ENABLED;
+#else
+    return PR_FALSE;
+#endif
 }
 
diff --git a/gfx/thebes/gfxTeeSurface.cpp b/gfx/thebes/gfxTeeSurface.cpp
--- a/gfx/thebes/gfxTeeSurface.cpp
+++ b/gfx/thebes/gfxTeeSurface.cpp
@@ -47,4 +47,5 @@ gfxTeeSurface::gfxTeeSurface(cairo_surfa
 gfxTeeSurface::gfxTeeSurface(gfxASurface **aSurfaces, PRInt32 aSurfaceCount)
 {
+#ifdef MOZ_TREE_CAIRO
     NS_ASSERTION(aSurfaceCount > 0, "Must have a least one surface");
     cairo_surface_t *csurf = cairo_tee_surface_create(aSurfaces[0]->CairoSurface());
@@ -54,4 +55,5 @@ gfxTeeSurface::gfxTeeSurface(gfxASurface
         cairo_tee_surface_add(csurf, aSurfaces[i]->CairoSurface());
     }
+#endif
 }
 
@@ -59,6 +61,8 @@ const gfxIntSize
 gfxTeeSurface::GetSize() const
 {
+#ifdef MOZ_TREE_CAIRO
     nsRefPtr<gfxASurface> master = Wrap(cairo_tee_surface_index(mSurface, 0));
     return master->GetSize();
+#endif
 }
 
@@ -66,4 +70,5 @@ void
 gfxTeeSurface::GetSurfaces(nsTArray<nsRefPtr<gfxASurface> >* aSurfaces)
 {
+#ifdef MOZ_TREE_CAIRO
     for (PRInt32 i = 0; ; ++i) {
         cairo_surface_t *csurf = cairo_tee_surface_index(mSurface, i);
@@ -75,3 +80,4 @@ gfxTeeSurface::GetSurfaces(nsTArray<nsRe
         *elem = Wrap(csurf);
     }
+#endif
 }