Title: [151610] trunk
Revision
151610
Author
par...@webkit.org
Date
2013-06-14 15:49:14 -0700 (Fri, 14 Jun 2013)

Log Message

Introduce USE(WINGDI) for the Windows port
https://bugs.webkit.org/show_bug.cgi?id=116138

Reviewed by Ryosuke Niwa.

Using USE(WINGDI) instead of OS(WINCE) will allow us to
compile the GDI based Windows port on WinNT too.

.:

* Source/cmake/OptionsWinCE.cmake:

Source/WebCore:

* config.h:
* platform/graphics/BitmapImage.h:
* platform/graphics/FontPlatformData.h:
* platform/graphics/GlyphBuffer.h:
(WebCore):
(GlyphBuffer):
* platform/graphics/Gradient.h:
(Gradient):
* platform/graphics/GraphicsContext.cpp:
(WebCore):
* platform/graphics/GraphicsContext.h:
(WebCore):
(GraphicsContext):
* platform/graphics/ImageBufferData.h:
* platform/graphics/NativeImagePtr.h:
(WebCore):
* platform/graphics/Path.h:
* platform/graphics/Pattern.h:
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::paintWindowedPluginIntoContext):
(WebCore::PluginView::paint):
(WebCore::PluginView::snapshot):

Source/WTF:

* wtf/Platform.h:

Modified Paths

Diff

Modified: trunk/ChangeLog (151609 => 151610)


--- trunk/ChangeLog	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/ChangeLog	2013-06-14 22:49:14 UTC (rev 151610)
@@ -1,3 +1,15 @@
+2013-06-14  Patrick Gansterer  <par...@webkit.org>
+
+        Introduce USE(WINGDI) for the Windows port
+        https://bugs.webkit.org/show_bug.cgi?id=116138
+
+        Reviewed by Ryosuke Niwa.
+
+        Using USE(WINGDI) instead of OS(WINCE) will allow us to
+        compile the GDI based Windows port on WinNT too.
+
+        * Source/cmake/OptionsWinCE.cmake:
+
 2013-06-14  Manuel Rego Casasnovas  <r...@igalia.com>
 
         [GTK][WK1] Missing symbols

Modified: trunk/Source/WTF/ChangeLog (151609 => 151610)


--- trunk/Source/WTF/ChangeLog	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WTF/ChangeLog	2013-06-14 22:49:14 UTC (rev 151610)
@@ -1,3 +1,15 @@
+2013-06-14  Patrick Gansterer  <par...@webkit.org>
+
+        Introduce USE(WINGDI) for the Windows port
+        https://bugs.webkit.org/show_bug.cgi?id=116138
+
+        Reviewed by Ryosuke Niwa.
+
+        Using USE(WINGDI) instead of OS(WINCE) will allow us to
+        compile the GDI based Windows port on WinNT too.
+
+        * wtf/Platform.h:
+
 2013-06-13  Ryosuke Niwa  <rn...@webkit.org>
 
         Remove LiteralIdentifierTable

Modified: trunk/Source/WTF/wtf/Platform.h (151609 => 151610)


--- trunk/Source/WTF/wtf/Platform.h	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WTF/wtf/Platform.h	2013-06-14 22:49:14 UTC (rev 151610)
@@ -551,11 +551,11 @@
 #define WTF_USE_WEB_THREAD 1
 #endif /* PLATFORM(IOS) */
 
-#if PLATFORM(WIN) && !OS(WINCE)
+#if PLATFORM(WIN) && !USE(WINGDI)
 #define WTF_USE_CF 1
 #endif
 
-#if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)
+#if PLATFORM(WIN) && !USE(WINGDI) && !PLATFORM(WIN_CAIRO)
 #define WTF_USE_CFNETWORK 1
 #endif
 
@@ -861,7 +861,7 @@
 #endif
 
 /* Accelerated compositing */
-#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(QT) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO))
+#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(QT) || (PLATFORM(WIN) && !USE(WINGDI) && !PLATFORM(WIN_CAIRO))
 #define WTF_USE_ACCELERATED_COMPOSITING 1
 #endif
 
@@ -972,7 +972,7 @@
 #define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK 1
 #endif
 
-#if PLATFORM(MAC) || PLATFORM(GTK) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO))
+#if PLATFORM(MAC) || PLATFORM(GTK) || (PLATFORM(WIN) && !USE(WINGDI) && !PLATFORM(WIN_CAIRO))
 #define WTF_USE_REQUEST_ANIMATION_FRAME_TIMER 1
 #endif
 

Modified: trunk/Source/WebCore/ChangeLog (151609 => 151610)


--- trunk/Source/WebCore/ChangeLog	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/ChangeLog	2013-06-14 22:49:14 UTC (rev 151610)
@@ -1,3 +1,36 @@
+2013-06-14  Patrick Gansterer  <par...@webkit.org>
+
+        Introduce USE(WINGDI) for the Windows port
+        https://bugs.webkit.org/show_bug.cgi?id=116138
+
+        Reviewed by Ryosuke Niwa.
+
+        Using USE(WINGDI) instead of OS(WINCE) will allow us to
+        compile the GDI based Windows port on WinNT too.
+
+        * config.h:
+        * platform/graphics/BitmapImage.h:
+        * platform/graphics/FontPlatformData.h:
+        * platform/graphics/GlyphBuffer.h:
+        (WebCore):
+        (GlyphBuffer):
+        * platform/graphics/Gradient.h:
+        (Gradient):
+        * platform/graphics/GraphicsContext.cpp:
+        (WebCore):
+        * platform/graphics/GraphicsContext.h:
+        (WebCore):
+        (GraphicsContext):
+        * platform/graphics/ImageBufferData.h:
+        * platform/graphics/NativeImagePtr.h:
+        (WebCore):
+        * platform/graphics/Path.h:
+        * platform/graphics/Pattern.h:
+        * plugins/win/PluginViewWin.cpp:
+        (WebCore::PluginView::paintWindowedPluginIntoContext):
+        (WebCore::PluginView::paint):
+        (WebCore::PluginView::snapshot):
+
 2013-06-13  Jer Noble  <jer.no...@apple.com>
 
         Report the memory cost of HTMLMediaElements to GC.

Modified: trunk/Source/WebCore/config.h (151609 => 151610)


--- trunk/Source/WebCore/config.h	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/config.h	2013-06-14 22:49:14 UTC (rev 151610)
@@ -33,7 +33,7 @@
 #define WTF_USE_FILE_LOCK 1
 #endif
 
-#if PLATFORM(WIN) && !OS(WINCE)
+#if PLATFORM(WIN) && !USE(WINGDI)
 #include <WebCore/WebCoreHeaderDetection.h>
 #endif
 
@@ -102,7 +102,7 @@
 #ifndef _WINSOCKAPI_
 #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
 #endif
-#elif !OS(WINCE)
+#elif !USE(WINGDI)
 #define WTF_USE_CG 1
 #undef WTF_USE_CAIRO
 #undef WTF_USE_CURL

Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.h (151609 => 151610)


--- trunk/Source/WebCore/platform/graphics/BitmapImage.h	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.h	2013-06-14 22:49:14 UTC (rev 151610)
@@ -194,7 +194,7 @@
     virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, RespectImageOrientationEnum) OVERRIDE;
 #endif
 
-#if (OS(WINCE) && !PLATFORM(QT))
+#if USE(WINGDI)
     virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform,
                              const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect);
 #endif

Modified: trunk/Source/WebCore/platform/graphics/FontPlatformData.h (151609 => 151610)


--- trunk/Source/WebCore/platform/graphics/FontPlatformData.h	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/platform/graphics/FontPlatformData.h	2013-06-14 22:49:14 UTC (rev 151610)
@@ -27,7 +27,7 @@
 #include "harfbuzz/FontPlatformDataHarfBuzz.h"
 #elif PLATFORM(QT)
 #include "qt/FontPlatformData.h"
-#elif PLATFORM(WIN) && OS(WINCE)
+#elif USE(WINGDI)
 #include "wince/FontPlatformData.h"
 #elif PLATFORM(EFL) || PLATFORM(GTK)
 #include "freetype/FontPlatformData.h"

Modified: trunk/Source/WebCore/platform/graphics/GlyphBuffer.h (151609 => 151610)


--- trunk/Source/WebCore/platform/graphics/GlyphBuffer.h	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/platform/graphics/GlyphBuffer.h	2013-06-14 22:49:14 UTC (rev 151610)
@@ -49,7 +49,7 @@
 #if USE(CAIRO)
 // FIXME: Why does Cairo use such a huge struct instead of just an offset into an array?
 typedef cairo_glyph_t GlyphBufferGlyph;
-#elif OS(WINCE)
+#elif USE(WINGDI)
 typedef wchar_t GlyphBufferGlyph;
 #elif PLATFORM(QT)
 typedef quint32 GlyphBufferGlyph;
@@ -170,7 +170,7 @@
 #endif
     }
     
-#if !OS(WINCE)
+#if !USE(WINGDI)
     void add(Glyph glyph, const SimpleFontData* font, GlyphBufferAdvance advance)
     {
         m_fontData.append(font);

Modified: trunk/Source/WebCore/platform/graphics/Gradient.h (151609 => 151610)


--- trunk/Source/WebCore/platform/graphics/Gradient.h	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/platform/graphics/Gradient.h	2013-06-14 22:49:14 UTC (rev 151610)
@@ -138,7 +138,7 @@
 
         float aspectRatio() const { return m_aspectRatio; }
 
-#if OS(WINCE) && !PLATFORM(QT)
+#if USE(WINGDI)
         const Vector<ColorStop, 2>& getStops() const;
 #else
         PlatformGradient platformGradient();

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (151609 => 151610)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2013-06-14 22:49:14 UTC (rev 151610)
@@ -408,7 +408,7 @@
     return m_state.paintingDisabled;
 }
 
-#if !OS(WINCE) || PLATFORM(QT)
+#if !USE(WINGDI)
 void GraphicsContext::drawText(const Font& font, const TextRun& run, const FloatPoint& point, int from, int to)
 {
     if (paintingDisabled())

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (151609 => 151610)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2013-06-14 22:49:14 UTC (rev 151610)
@@ -49,7 +49,7 @@
 #elif PLATFORM(QT)
 #include <QPainter>
 typedef QPainter PlatformGraphicsContext;
-#elif OS(WINCE)
+#elif USE(WINGDI)
 typedef struct HDC__ PlatformGraphicsContext;
 #elif PLATFORM(BLACKBERRY)
 namespace BlackBerry {
@@ -79,7 +79,7 @@
 
 namespace WebCore {
 
-#if OS(WINCE) && !PLATFORM(QT)
+#if USE(WINGDI)
     class SharedBitmap;
     class SimpleFontData;
     class GlyphBuffer;
@@ -196,9 +196,7 @@
         GraphicsContext(PlatformGraphicsContext*);
         ~GraphicsContext();
 
-#if !OS(WINCE) || PLATFORM(QT)
         PlatformGraphicsContext* platformContext() const;
-#endif
 
         float strokeThickness() const;
         void setStrokeThickness(float);
@@ -425,7 +423,7 @@
         HDC getWindowsContext(const IntRect&, bool supportAlphaBlend, bool mayCreateBitmap); // The passed in rect is used to create a bitmap for compositing inside transparency layers.
         void releaseWindowsContext(HDC, const IntRect&, bool supportAlphaBlend, bool mayCreateBitmap); // The passed in HDC should be the one handed back by getWindowsContext.
 #if PLATFORM(WIN)
-#if OS(WINCE)
+#if USE(WINGDI)
         void setBitmap(PassRefPtr<SharedBitmap>);
         const AffineTransform& affineTransform() const;
         AffineTransform& affineTransform();
@@ -503,7 +501,7 @@
         void platformInit(PlatformGraphicsContext*);
         void platformDestroy();
 
-#if PLATFORM(WIN) && !OS(WINCE)
+#if PLATFORM(WIN) && !USE(WINGDI)
         void platformInit(HDC, bool hasAlpha = false);
 #endif
 

Modified: trunk/Source/WebCore/platform/graphics/ImageBufferData.h (151609 => 151610)


--- trunk/Source/WebCore/platform/graphics/ImageBufferData.h	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/platform/graphics/ImageBufferData.h	2013-06-14 22:49:14 UTC (rev 151610)
@@ -29,7 +29,7 @@
 #include "ImageBufferDataCairo.h"
 #elif PLATFORM(QT)
 #include "ImageBufferDataQt.h"
-#elif OS(WINCE)
+#elif USE(WINGDI)
 #include "ImageBufferDataWince.h"
 #elif PLATFORM(BLACKBERRY)
 #include "ImageBufferDataBlackBerry.h"

Modified: trunk/Source/WebCore/platform/graphics/NativeImagePtr.h (151609 => 151610)


--- trunk/Source/WebCore/platform/graphics/NativeImagePtr.h	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/platform/graphics/NativeImagePtr.h	2013-06-14 22:49:14 UTC (rev 151610)
@@ -38,7 +38,7 @@
 QT_END_NAMESPACE
 #elif USE(CAIRO)
 #include "RefPtrCairo.h"
-#elif OS(WINCE)
+#elif USE(WINGDI)
 #include "SharedBitmap.h"
 #elif PLATFORM(BLACKBERRY)
 namespace BlackBerry {
@@ -61,7 +61,7 @@
 #elif USE(CAIRO)
 typedef RefPtr<cairo_surface_t> NativeImagePtr;
 typedef PassRefPtr<cairo_surface_t> PassNativeImagePtr;
-#elif OS(WINCE)
+#elif USE(WINGDI)
 typedef RefPtr<SharedBitmap> NativeImagePtr;
 #elif PLATFORM(BLACKBERRY)
 typedef BlackBerry::Platform::Graphics::TiledImage* NativeImagePtr;

Modified: trunk/Source/WebCore/platform/graphics/Path.h (151609 => 151610)


--- trunk/Source/WebCore/platform/graphics/Path.h	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/platform/graphics/Path.h	2013-06-14 22:49:14 UTC (rev 151610)
@@ -42,7 +42,7 @@
 class CairoPath;
 }
 typedef WebCore::CairoPath PlatformPath;
-#elif OS(WINCE)
+#elif USE(WINGDI)
 namespace WebCore {
     class PlatformPath;
 }

Modified: trunk/Source/WebCore/platform/graphics/Pattern.h (151609 => 151610)


--- trunk/Source/WebCore/platform/graphics/Pattern.h	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/platform/graphics/Pattern.h	2013-06-14 22:49:14 UTC (rev 151610)
@@ -43,7 +43,7 @@
 #elif PLATFORM(QT)
 #include <QBrush>
 typedef QBrush PlatformPatternPtr;
-#elif OS(WINCE)
+#elif USE(WINGDI)
 typedef void* PlatformPatternPtr;
 #endif
 

Modified: trunk/Source/WebCore/plugins/win/PluginViewWin.cpp (151609 => 151610)


--- trunk/Source/WebCore/plugins/win/PluginViewWin.cpp	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/WebCore/plugins/win/PluginViewWin.cpp	2013-06-14 22:49:14 UTC (rev 151610)
@@ -592,7 +592,7 @@
 
 void PluginView::paintWindowedPluginIntoContext(GraphicsContext* context, const IntRect& rect)
 {
-#if !OS(WINCE)
+#if !USE(WINGDI)
     ASSERT(m_isWindowed);
     ASSERT(context->shouldIncludeChildWindows());
 
@@ -642,7 +642,7 @@
         setNPWindowRect(frameRect());
 
     if (m_isWindowed) {
-#if !OS(WINCE)
+#if !USE(WINGDI)
         if (context->shouldIncludeChildWindows())
             paintWindowedPluginIntoContext(context, rect);
 #endif
@@ -1067,7 +1067,7 @@
 
 PassRefPtr<Image> PluginView::snapshot()
 {
-#if !PLATFORM(GTK) && !OS(WINCE)
+#if !PLATFORM(GTK) && !USE(WINGDI)
     OwnPtr<HDC> hdc = adoptPtr(CreateCompatibleDC(0));
 
     if (!m_isWindowed) {

Modified: trunk/Source/cmake/OptionsWinCE.cmake (151609 => 151610)


--- trunk/Source/cmake/OptionsWinCE.cmake	2013-06-14 22:40:10 UTC (rev 151609)
+++ trunk/Source/cmake/OptionsWinCE.cmake	2013-06-14 22:49:14 UTC (rev 151610)
@@ -4,6 +4,7 @@
 
 add_definitions(-D_CE_CRT_ALLOW_WIN_MINMAX)
 add_definitions(-DWTF_USE_WCHAR_UNICODE=1)
+add_definitions(-DWTF_USE_WINGDI=1)
 add_definitions(-DWTF_USE_WININET=1)
 add_definitions(-DWINCEBASIC)
 add_definitions(-DJS_NO_EXPORT)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to