Title: [126302] trunk/Source/WebCore
Revision
126302
Author
[email protected]
Date
2012-08-22 07:51:56 -0700 (Wed, 22 Aug 2012)

Log Message

Remove unused TextDrawingMode flags from GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=21898

Reviewed by Benjamin Poulain.

Remove TextModeClip and TextModeInvisible. These are not used by any port, and
according to https://bugs.webkit.org/show_bug.cgi?id=42110#c2 these were added
just to map CG existing flags, but are not used.

* platform/graphics/GraphicsContext.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setPlatformTextDrawingMode):
* platform/graphics/openvg/PainterOpenVG.cpp:
(WebCore::PainterOpenVG::drawText):
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::setTextDrawingMode):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (126301 => 126302)


--- trunk/Source/WebCore/ChangeLog	2012-08-22 14:13:19 UTC (rev 126301)
+++ trunk/Source/WebCore/ChangeLog	2012-08-22 14:51:56 UTC (rev 126302)
@@ -1,3 +1,22 @@
+2012-08-21  Caio Marcelo de Oliveira Filho  <[email protected]>
+
+        Remove unused TextDrawingMode flags from GraphicsContext
+        https://bugs.webkit.org/show_bug.cgi?id=21898
+
+        Reviewed by Benjamin Poulain.
+
+        Remove TextModeClip and TextModeInvisible. These are not used by any port, and
+        according to https://bugs.webkit.org/show_bug.cgi?id=42110#c2 these were added
+        just to map CG existing flags, but are not used.
+
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::setPlatformTextDrawingMode):
+        * platform/graphics/openvg/PainterOpenVG.cpp:
+        (WebCore::PainterOpenVG::drawText):
+        * platform/graphics/skia/PlatformContextSkia.cpp:
+        (WebCore::PlatformContextSkia::setTextDrawingMode):
+
 2012-08-22  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r126287.

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (126301 => 126302)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2012-08-22 14:13:19 UTC (rev 126301)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2012-08-22 14:51:56 UTC (rev 126302)
@@ -128,10 +128,8 @@
     class TransformationMatrix;
 
     enum TextDrawingMode {
-        TextModeInvisible = 0,
         TextModeFill      = 1 << 0,
         TextModeStroke    = 1 << 1,
-        TextModeClip      = 1 << 2
     };
     typedef unsigned TextDrawingModeFlags;
 

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


--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2012-08-22 14:13:19 UTC (rev 126301)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2012-08-22 14:51:56 UTC (rev 126302)
@@ -1646,12 +1646,8 @@
     if (paintingDisabled())
         return;
 
-    // Wow, wish CG had used bits here.
     CGContextRef context = platformContext();
     switch (mode) {
-    case TextModeInvisible:
-        CGContextSetTextDrawingMode(context, kCGTextInvisible);
-        break;
     case TextModeFill:
         CGContextSetTextDrawingMode(context, kCGTextFill);
         break;
@@ -1661,18 +1657,6 @@
     case TextModeFill | TextModeStroke:
         CGContextSetTextDrawingMode(context, kCGTextFillStroke);
         break;
-    case TextModeClip:
-        CGContextSetTextDrawingMode(context, kCGTextClip);
-        break;
-    case TextModeFill | TextModeClip:
-        CGContextSetTextDrawingMode(context, kCGTextFillClip);
-        break;
-    case TextModeStroke | TextModeClip:
-        CGContextSetTextDrawingMode(context, kCGTextStrokeClip);
-        break;
-    case TextModeFill | TextModeStroke | TextModeClip:
-        CGContextSetTextDrawingMode(context, kCGTextFillStrokeClip);
-        break;
     default:
         break;
     }

Modified: trunk/Source/WebCore/platform/graphics/openvg/PainterOpenVG.cpp (126301 => 126302)


--- trunk/Source/WebCore/platform/graphics/openvg/PainterOpenVG.cpp	2012-08-22 14:13:19 UTC (rev 126301)
+++ trunk/Source/WebCore/platform/graphics/openvg/PainterOpenVG.cpp	2012-08-22 14:51:56 UTC (rev 126302)
@@ -1114,8 +1114,6 @@
 
     VGbitfield paintModes = 0;
 
-    if (m_state->textDrawingMode & TextModeClip)
-        return; // unsupported for every port except CG at the time of writing
     if (m_state->textDrawingMode & TextModeFill && !m_state->fillDisabled())
         paintModes |= VG_FILL_PATH;
     if (m_state->textDrawingMode & TextModeStroke && !m_state->strokeDisabled())

Modified: trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp (126301 => 126302)


--- trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp	2012-08-22 14:13:19 UTC (rev 126301)
+++ trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp	2012-08-22 14:51:56 UTC (rev 126302)
@@ -529,9 +529,6 @@
 
 void PlatformContextSkia::setTextDrawingMode(TextDrawingModeFlags mode)
 {
-    // TextModeClip is never used, so we assert that it isn't set:
-    // https://bugs.webkit.org/show_bug.cgi?id=21898
-    ASSERT(!(mode & TextModeClip));
     m_state->m_textDrawingMode = mode;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to