Title: [173152] trunk/Source/WebCore
Revision
173152
Author
[email protected]
Date
2014-08-31 18:53:47 -0700 (Sun, 31 Aug 2014)

Log Message

Remove GraphicsContext constructor that takes shouldUseContextColors
https://bugs.webkit.org/show_bug.cgi?id=136421

Reviewed by Dan Bernstein.

* WebCore.exp.in:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::GraphicsContext):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContextState::GraphicsContextState):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):
(WebCore::GraphicsContext::drawLinesForText):
As far as I can tell, the last user of this constructor died with WebNSStringDrawing.
Adjust all code to assume shouldUseContextColors=true.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173151 => 173152)


--- trunk/Source/WebCore/ChangeLog	2014-09-01 01:11:20 UTC (rev 173151)
+++ trunk/Source/WebCore/ChangeLog	2014-09-01 01:53:47 UTC (rev 173152)
@@ -1,5 +1,23 @@
 2014-08-31  Tim Horton  <[email protected]>
 
+        Remove GraphicsContext constructor that takes shouldUseContextColors
+        https://bugs.webkit.org/show_bug.cgi?id=136421
+
+        Reviewed by Dan Bernstein.
+
+        * WebCore.exp.in:
+        * platform/graphics/GraphicsContext.cpp:
+        (WebCore::GraphicsContext::GraphicsContext):
+        * platform/graphics/GraphicsContext.h:
+        (WebCore::GraphicsContextState::GraphicsContextState):
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::platformInit):
+        (WebCore::GraphicsContext::drawLinesForText):
+        As far as I can tell, the last user of this constructor died with WebNSStringDrawing.
+        Adjust all code to assume shouldUseContextColors=true.
+
+2014-08-31  Tim Horton  <[email protected]>
+
         Remove unused ARMv6-specific #if branches in WebCore::canHyphenate
         https://bugs.webkit.org/show_bug.cgi?id=136420
 

Modified: trunk/Source/WebCore/WebCore.exp.in (173151 => 173152)


--- trunk/Source/WebCore/WebCore.exp.in	2014-09-01 01:11:20 UTC (rev 173151)
+++ trunk/Source/WebCore/WebCore.exp.in	2014-09-01 01:53:47 UTC (rev 173152)
@@ -546,6 +546,7 @@
 __ZN7WebCore15GraphicsContext9drawImageEPNS_5ImageENS_10ColorSpaceERKNS_10FloatPointERKNS_20ImagePaintingOptionsE
 __ZN7WebCore15GraphicsContext9setShadowERKNS_9FloatSizeEfRKNS_5ColorENS_10ColorSpaceE
 __ZN7WebCore15GraphicsContext9translateEff
+__ZN7WebCore15GraphicsContextC1EP9CGContext
 __ZN7WebCore15GraphicsContextD1Ev
 __ZN7WebCore15GraphicsLayerCA10initializeEv
 __ZN7WebCore15GraphicsLayerCA10setFiltersERKNS_16FilterOperationsE
@@ -2246,7 +2247,6 @@
 __ZN7WebCore13getRawCookiesERKNS_21NetworkStorageSessionERKNS_3URLES5_RN3WTF6VectorINS_6CookieELm0ENS6_15CrashOnOverflowEEE
 __ZN7WebCore13toDeviceSpaceERKNS_9FloatRectEP8NSWindow
 __ZN7WebCore14cookiesEnabledERKNS_21NetworkStorageSessionERKNS_3URLES5_
-__ZN7WebCore15GraphicsContextC1EP9CGContext
 __ZN7WebCore15ResourceRequest41updateFromDelegatePreservingOldPropertiesERKS0_
 __ZN7WebCore16FontPlatformDataC1EP6NSFontfbbbNS_15FontOrientationENS_16FontWidthVariantE
 __ZN7WebCore16FontPlatformDataC2EP6NSFontfbbbNS_15FontOrientationENS_16FontWidthVariantE
@@ -2597,7 +2597,6 @@
 __ZN7WebCore15GraphicsContext15drawLineForTextERKNS_10FloatPointEfbb
 __ZN7WebCore15GraphicsContext22setEmojiDrawingEnabledEb
 __ZN7WebCore15GraphicsContext23setIsAcceleratedContextEb
-__ZN7WebCore15GraphicsContextC1EP9CGContextb
 __ZN7WebCore15LegacyTileCache14drainLayerPoolEv
 __ZN7WebCore15LegacyTileCache20setLayerPoolCapacityEj
 __ZN7WebCore15ResourceRequest41updateFromDelegatePreservingOldPropertiesERKS0_

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (173151 => 173152)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2014-09-01 01:11:20 UTC (rev 173151)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2014-09-01 01:53:47 UTC (rev 173152)
@@ -100,21 +100,12 @@
     bool m_interpolationQualityChanged;
 };
 
-#if !PLATFORM(IOS)
 GraphicsContext::GraphicsContext(PlatformGraphicsContext* platformGraphicsContext)
     : m_updatingControlTints(false)
     , m_transparencyCount(0)
 {
     platformInit(platformGraphicsContext);
 }
-#else
-GraphicsContext::GraphicsContext(PlatformGraphicsContext* platformGraphicsContext, bool shouldUseContextColors)
-    : m_updatingControlTints(false)
-    , m_transparencyCount(0)
-{
-    platformInit(platformGraphicsContext, shouldUseContextColors);
-}
-#endif
 
 GraphicsContext::~GraphicsContext()
 {

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (173151 => 173152)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2014-09-01 01:11:20 UTC (rev 173151)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2014-09-01 01:53:47 UTC (rev 173152)
@@ -131,7 +131,6 @@
             , blendMode(BlendModeNormal)
 #if PLATFORM(IOS)
             , emojiDrawingEnabled(true)
-            , shouldUseContextColors(true)
 #endif
             , shouldAntialias(true)
             , shouldSmoothFonts(true)
@@ -176,7 +175,6 @@
 
 #if PLATFORM(IOS)
         bool emojiDrawingEnabled : 1;
-        bool shouldUseContextColors : 1;
 #endif
         bool shouldAntialias : 1;
         bool shouldSmoothFonts : 1;
@@ -223,11 +221,7 @@
     class GraphicsContext {
         WTF_MAKE_NONCOPYABLE(GraphicsContext); WTF_MAKE_FAST_ALLOCATED;
     public:
-#if !PLATFORM(IOS)
         WEBCORE_EXPORT GraphicsContext(PlatformGraphicsContext*);
-#else
-        WEBCORE_EXPORT GraphicsContext(PlatformGraphicsContext*, bool shouldUseContextColors = true);
-#endif
         WEBCORE_EXPORT ~GraphicsContext();
 
         WEBCORE_EXPORT PlatformGraphicsContext* platformContext() const;
@@ -550,7 +544,7 @@
         static void adjustLineToPixelBoundaries(FloatPoint& p1, FloatPoint& p2, float strokeWidth, StrokeStyle);
 
     private:
-        void platformInit(PlatformGraphicsContext*, bool shouldUseContextColors = false);
+        void platformInit(PlatformGraphicsContext*);
         void platformDestroy();
 
 #if PLATFORM(WIN) && !USE(WINGDI)

Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (173151 => 173152)


--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2014-09-01 01:11:20 UTC (rev 173151)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2014-09-01 01:53:47 UTC (rev 173152)
@@ -112,24 +112,15 @@
 }
 #endif
 
-void GraphicsContext::platformInit(CGContextRef cgContext, bool shouldUseContextColors)
+void GraphicsContext::platformInit(CGContextRef cgContext)
 {
     m_data = new GraphicsContextPlatformPrivate(cgContext);
     setPaintingDisabled(!cgContext);
     if (cgContext) {
-#if PLATFORM(IOS)
-        m_state.shouldUseContextColors = shouldUseContextColors;
-        if (shouldUseContextColors) {
-#else
-        UNUSED_PARAM(shouldUseContextColors);
-#endif
         // Make sure the context starts in sync with our state.
         setPlatformFillColor(fillColor(), fillColorSpace());
         setPlatformStrokeColor(strokeColor(), strokeColorSpace());
         setPlatformStrokeThickness(strokeThickness());
-#if PLATFORM(IOS)
-        }
-#endif
     }
 }
 
@@ -1362,19 +1353,13 @@
             dashBounds.append(CGRectMake(bounds.x() + widths[i], bounds.y() + 2 * bounds.height(), widths[i+1] - widths[i], bounds.height()));
     }
 
-#if PLATFORM(IOS)
-    if (m_state.shouldUseContextColors)
-#endif
-        if (fillColorIsNotEqualToStrokeColor)
-            setCGFillColor(platformContext(), localStrokeColor, strokeColorSpace());
+    if (fillColorIsNotEqualToStrokeColor)
+        setCGFillColor(platformContext(), localStrokeColor, strokeColorSpace());
 
     CGContextFillRects(platformContext(), dashBounds.data(), dashBounds.size());
 
-#if PLATFORM(IOS)
-    if (m_state.shouldUseContextColors)
-#endif
-        if (fillColorIsNotEqualToStrokeColor)
-            setCGFillColor(platformContext(), fillColor(), fillColorSpace());
+    if (fillColorIsNotEqualToStrokeColor)
+        setCGFillColor(platformContext(), fillColor(), fillColorSpace());
 }
 
 void GraphicsContext::setURLForRect(const URL& link, const IntRect& destRect)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to