[Cairo] Remove unnecessary cairo.h includes
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Sep 2017 06:18:21 +0000 (06:18 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Sep 2017 06:18:21 +0000 (06:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177540

Reviewed by Carlos Garcia Campos.

Drop unnecessary includes of the cairo.h header from the Font.h,
FontPlatformData.h and Pattern.h headers. For the former two the
header isn't required, while in the last one we can use a forward
declaration for the cairo_pattern_t type instead of including
the whole Cairo headers to have that available.

* platform/graphics/Font.h:
* platform/graphics/FontPlatformData.h:
* platform/graphics/Pattern.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222604 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/Font.h
Source/WebCore/platform/graphics/FontPlatformData.h
Source/WebCore/platform/graphics/Pattern.h

index 92e05d7..670a882 100644 (file)
@@ -1,5 +1,22 @@
 2017-09-27  Zan Dobersek  <zdobersek@igalia.com>
 
+        [Cairo] Remove unnecessary cairo.h includes
+        https://bugs.webkit.org/show_bug.cgi?id=177540
+
+        Reviewed by Carlos Garcia Campos.
+
+        Drop unnecessary includes of the cairo.h header from the Font.h,
+        FontPlatformData.h and Pattern.h headers. For the former two the
+        header isn't required, while in the last one we can use a forward
+        declaration for the cairo_pattern_t type instead of including
+        the whole Cairo headers to have that available.
+
+        * platform/graphics/Font.h:
+        * platform/graphics/FontPlatformData.h:
+        * platform/graphics/Pattern.h:
+
+2017-09-27  Zan Dobersek  <zdobersek@igalia.com>
+
         [Cairo] Drop cairo_matrix_t conversion operators for AffineTransform, TransformationMatrix
         https://bugs.webkit.org/show_bug.cgi?id=177539
 
index a8492ca..ad117bb 100644 (file)
 #include <usp10.h>
 #endif
 
-#if USE(CAIRO)
-#include <cairo.h>
-#endif
-
 #if USE(CG)
 #include <pal/spi/cg/CoreGraphicsSPI.h>
 #endif
index a718e54..9f95fdf 100644 (file)
@@ -36,7 +36,6 @@
 
 #if USE(CAIRO)
 #include "RefPtrCairo.h"
-#include <cairo.h>
 #endif
 
 #if USE(FREETYPE)
index 050fb4e..e7b316a 100644 (file)
@@ -40,7 +40,7 @@ typedef CGPatternRef PlatformPatternPtr;
 interface ID2D1BitmapBrush;
 typedef ID2D1BitmapBrush* PlatformPatternPtr;
 #elif USE(CAIRO)
-#include <cairo.h>
+typedef struct _cairo_pattern cairo_pattern_t;
 typedef cairo_pattern_t* PlatformPatternPtr;
 #elif USE(WINGDI)
 typedef void* PlatformPatternPtr;