<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[195170] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/195170">195170</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2016-01-16 10:12:41 -0800 (Sat, 16 Jan 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove GraphicsContext::drawConvexPolygon() and GraphicsContext::clipConvexPolygon()
https://bugs.webkit.org/show_bug.cgi?id=153174
Reviewed by Zalan Bujtas.
GraphicsContext::drawConvexPolygon() and GraphicsContext::clipConvexPolygon() were
poorly named (non-convex polygons are allowed), and just syntactic sugar over
clipPath() and drawPath().
Remove them, but add a convenience function to create a Path from a Vector of
points. For CG, we can use the more efficient CGPathAddLines().
Source/WebCore:
Add TextStream dumping for Path.
* platform/graphics/GraphicsContext.h:
* platform/graphics/Path.cpp:
(WebCore::Path::polygonPathFromPoints):
(WebCore::Path::dump):
(WebCore::operator<<):
* platform/graphics/Path.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformShouldAntialias):
(WebCore::addConvexPolygonToContext): Deleted.
(WebCore::GraphicsContext::drawConvexPolygon): Deleted.
(WebCore::GraphicsContext::clipConvexPolygon): Deleted.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::addConvexPolygonToPath): Deleted.
(WebCore::GraphicsContext::drawConvexPolygon): Deleted.
(WebCore::GraphicsContext::clipConvexPolygon): Deleted.
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::polygonPathFromPoints):
(WebCore::Path::moveTo):
(WebCore::Path::addLineTo):
(WebCore::Path::addQuadCurveTo):
(WebCore::Path::addBezierCurveTo):
(WebCore::Path::addArcTo):
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::Item::sizeInBytes): Deleted.
(WebCore::DisplayList::ClipConvexPolygon::ClipConvexPolygon): Deleted.
(WebCore::DisplayList::ClipConvexPolygon::apply): Deleted.
(WebCore::DisplayList::operator<<): Deleted.
(WebCore::DisplayList::addConvexPolygonToPath): Deleted.
(WebCore::DisplayList::DrawConvexPolygon::DrawConvexPolygon): Deleted.
(WebCore::DisplayList::DrawConvexPolygon::localBounds): Deleted.
(WebCore::DisplayList::DrawConvexPolygon::apply): Deleted.
* platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::ClipConvexPolygon::create): Deleted.
(WebCore::DisplayList::ClipConvexPolygon::points): Deleted.
(WebCore::DisplayList::ClipConvexPolygon::antialias): Deleted.
(WebCore::DisplayList::DrawConvexPolygon::create): Deleted.
(WebCore::DisplayList::DrawConvexPolygon::points): Deleted.
(WebCore::DisplayList::DrawConvexPolygon::antialiased): Deleted.
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawConvexPolygon): Deleted.
(WebCore::DisplayList::Recorder::clipConvexPolygon): Deleted.
* platform/graphics/displaylists/DisplayListRecorder.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::clipBorderSidePolygon):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::drawLineForBoxSide):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuListButtonDecorations):
Source/WebKit/win:
* FullscreenVideoController.cpp:
(HUDSlider::draw):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContexth">trunk/Source/WebCore/platform/graphics/GraphicsContext.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsPathcpp">trunk/Source/WebCore/platform/graphics/Path.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsPathh">trunk/Source/WebCore/platform/graphics/Path.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoGraphicsContextCairocpp">trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgGraphicsContextCGcpp">trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgPathCGcpp">trunk/Source/WebCore/platform/graphics/cg/PathCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListItemscpp">trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListItemsh">trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecordercpp">trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecorderh">trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjectcpp">trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderElementcpp">trunk/Source/WebCore/rendering/RenderElement.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeIOSmm">trunk/Source/WebCore/rendering/RenderThemeIOS.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMacmm">trunk/Source/WebCore/rendering/RenderThemeMac.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinFullscreenVideoControllercpp">trunk/Source/WebKit/win/FullscreenVideoController.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/ChangeLog        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -1,3 +1,70 @@
</span><ins>+2016-01-15 Simon Fraser <simon.fraser@apple.com>
+
+ Remove GraphicsContext::drawConvexPolygon() and GraphicsContext::clipConvexPolygon()
+ https://bugs.webkit.org/show_bug.cgi?id=153174
+
+ Reviewed by Zalan Bujtas.
+
+ GraphicsContext::drawConvexPolygon() and GraphicsContext::clipConvexPolygon() were
+ poorly named (non-convex polygons are allowed), and just syntactic sugar over
+ clipPath() and drawPath().
+
+ Remove them, but add a convenience function to create a Path from a Vector of
+ points. For CG, we can use the more efficient CGPathAddLines().
+
+ Add TextStream dumping for Path.
+
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/Path.cpp:
+ (WebCore::Path::polygonPathFromPoints):
+ (WebCore::Path::dump):
+ (WebCore::operator<<):
+ * platform/graphics/Path.h:
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::setPlatformShouldAntialias):
+ (WebCore::addConvexPolygonToContext): Deleted.
+ (WebCore::GraphicsContext::drawConvexPolygon): Deleted.
+ (WebCore::GraphicsContext::clipConvexPolygon): Deleted.
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::addConvexPolygonToPath): Deleted.
+ (WebCore::GraphicsContext::drawConvexPolygon): Deleted.
+ (WebCore::GraphicsContext::clipConvexPolygon): Deleted.
+ * platform/graphics/cg/PathCG.cpp:
+ (WebCore::Path::polygonPathFromPoints):
+ (WebCore::Path::moveTo):
+ (WebCore::Path::addLineTo):
+ (WebCore::Path::addQuadCurveTo):
+ (WebCore::Path::addBezierCurveTo):
+ (WebCore::Path::addArcTo):
+ * platform/graphics/displaylists/DisplayListItems.cpp:
+ (WebCore::DisplayList::Item::sizeInBytes): Deleted.
+ (WebCore::DisplayList::ClipConvexPolygon::ClipConvexPolygon): Deleted.
+ (WebCore::DisplayList::ClipConvexPolygon::apply): Deleted.
+ (WebCore::DisplayList::operator<<): Deleted.
+ (WebCore::DisplayList::addConvexPolygonToPath): Deleted.
+ (WebCore::DisplayList::DrawConvexPolygon::DrawConvexPolygon): Deleted.
+ (WebCore::DisplayList::DrawConvexPolygon::localBounds): Deleted.
+ (WebCore::DisplayList::DrawConvexPolygon::apply): Deleted.
+ * platform/graphics/displaylists/DisplayListItems.h:
+ (WebCore::DisplayList::ClipConvexPolygon::create): Deleted.
+ (WebCore::DisplayList::ClipConvexPolygon::points): Deleted.
+ (WebCore::DisplayList::ClipConvexPolygon::antialias): Deleted.
+ (WebCore::DisplayList::DrawConvexPolygon::create): Deleted.
+ (WebCore::DisplayList::DrawConvexPolygon::points): Deleted.
+ (WebCore::DisplayList::DrawConvexPolygon::antialiased): Deleted.
+ * platform/graphics/displaylists/DisplayListRecorder.cpp:
+ (WebCore::DisplayList::Recorder::drawConvexPolygon): Deleted.
+ (WebCore::DisplayList::Recorder::clipConvexPolygon): Deleted.
+ * platform/graphics/displaylists/DisplayListRecorder.h:
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
+ * rendering/RenderElement.cpp:
+ (WebCore::RenderElement::drawLineForBoxSide):
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
+
</ins><span class="cx"> 2016-01-16 Jeremy Huddleston Sequoia <jeremyhu@apple.com>
</span><span class="cx">
</span><span class="cx"> Add Platform.cpp to ANGLESupport
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -342,7 +342,6 @@
</span><span class="cx">
</span><span class="cx"> void drawEllipse(const FloatRect&);
</span><span class="cx"> void drawRaisedEllipse(const FloatRect&, const Color& ellipseColor, const Color& shadowColor);
</span><del>- void drawConvexPolygon(size_t numPoints, const FloatPoint*, bool shouldAntialias = false);
</del><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT void fillPath(const Path&);
</span><span class="cx"> void strokePath(const Path&);
</span><span class="lines">@@ -388,7 +387,6 @@
</span><span class="cx"> void clipOut(const FloatRect&);
</span><span class="cx"> void clipOutRoundedRect(const FloatRoundedRect&);
</span><span class="cx"> void clipPath(const Path&, WindRule = RULE_EVENODD);
</span><del>- void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias = true);
</del><span class="cx"> void clipToImageBuffer(ImageBuffer&, const FloatRect&);
</span><span class="cx">
</span><span class="cx"> IntRect clipBounds() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsPathcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Path.cpp (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Path.cpp        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/platform/graphics/Path.cpp        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include "FloatRoundedRect.h"
</span><span class="cx"> #include "PathTraversalState.h"
</span><span class="cx"> #include "RoundedRect.h"
</span><ins>+#include "TextStream.h"
</ins><span class="cx"> #include <math.h>
</span><span class="cx"> #include <wtf/MathExtras.h>
</span><span class="cx">
</span><span class="lines">@@ -162,10 +163,61 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if !USE(CG)
</span><ins>+Path Path::polygonPathFromPoints(const Vector<FloatPoint>& points)
+{
+ Path path;
+ if (points.size() < 2)
+ return path;
+
+ path.moveTo(points[0]);
+ for (size_t i = 1; i < points.size(); ++i)
+ path.addLineTo(points[i]);
+
+ path.closeSubpath();
+ return path;
+}
+
</ins><span class="cx"> FloatRect Path::fastBoundingRect() const
</span><span class="cx"> {
</span><span class="cx"> return boundingRect();
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#ifndef NDEBUG
+void Path::dump() const
+{
+ TextStream stream;
+ stream << *this;
+ WTFLogAlways("%s", stream.release().utf8().data());
</ins><span class="cx"> }
</span><ins>+#endif
+
+TextStream& operator<<(TextStream& stream, const Path& path)
+{
+ TextStream::GroupScope group(stream);
+ stream << "path " << &path;
+
+ path.apply([&stream](const PathElement& element) {
+ switch (element.type) {
+ case PathElementMoveToPoint: // The points member will contain 1 value.
+ stream << " move to " << element.points[0];
+ break;
+ case PathElementAddLineToPoint: // The points member will contain 1 value.
+ stream << " add line to " << element.points[0];
+ break;
+ case PathElementAddQuadCurveToPoint: // The points member will contain 2 values.
+ stream << " add quad curve to " << element.points[0] << " " << element.points[1];
+ break;
+ case PathElementAddCurveToPoint: // The points member will contain 3 values.
+ stream << " add curve to " << element.points[0] << " " << element.points[1] << " " << element.points[2];
+ break;
+ case PathElementCloseSubpath: // The points member will contain no values.
+ stream << " close subpath";
+ break;
+ }
+ });
+
+ return stream;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsPathh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Path.h (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Path.h        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/platform/graphics/Path.h        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include <functional>
</span><span class="cx"> #include <wtf/FastMalloc.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><ins>+#include <wtf/Vector.h>
</ins><span class="cx">
</span><span class="cx"> #if USE(CG)
</span><span class="cx">
</span><span class="lines">@@ -50,7 +51,7 @@
</span><span class="cx"> #elif USE(WINGDI)
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><del>- class PlatformPath;
</del><ins>+class PlatformPath;
</ins><span class="cx"> }
</span><span class="cx"> typedef WebCore::PlatformPath PlatformPath;
</span><span class="cx">
</span><span class="lines">@@ -72,6 +73,7 @@
</span><span class="cx"> class PathTraversalState;
</span><span class="cx"> class RoundedRect;
</span><span class="cx"> class StrokeStyleApplier;
</span><ins>+ class TextStream;
</ins><span class="cx">
</span><span class="cx"> enum PathElementType {
</span><span class="cx"> PathElementMoveToPoint, // The points member will contain 1 value.
</span><span class="lines">@@ -102,6 +104,8 @@
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT Path(const Path&);
</span><span class="cx"> WEBCORE_EXPORT Path& operator=(const Path&);
</span><ins>+
+ static Path polygonPathFromPoints(const Vector<FloatPoint>&);
</ins><span class="cx">
</span><span class="cx"> bool contains(const FloatPoint&, WindRule rule = RULE_NONZERO) const;
</span><span class="cx"> bool strokeContains(StrokeStyleApplier*, const FloatPoint&) const;
</span><span class="lines">@@ -164,10 +168,16 @@
</span><span class="cx"> void platformAddPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius);
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#ifndef NDEBUG
+ void dump() const;
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx"> PlatformPathPtr m_path;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+TextStream& operator<<(TextStream&, const Path&);
+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoGraphicsContextCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -77,14 +77,6 @@
</span><span class="cx"> cairo_fill(cr);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void addConvexPolygonToContext(cairo_t* context, size_t numPoints, const FloatPoint* points)
-{
- cairo_move_to(context, points[0].x(), points[0].y());
- for (size_t i = 1; i < numPoints; i++)
- cairo_line_to(context, points[i].x(), points[i].y());
- cairo_close_path(context);
-}
-
</del><span class="cx"> enum PathDrawingStyle {
</span><span class="cx"> Fill = 1,
</span><span class="cx"> Stroke = 2,
</span><span class="lines">@@ -435,69 +427,6 @@
</span><span class="cx"> cairo_new_path(cr);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::drawConvexPolygon(size_t npoints, const FloatPoint* points, bool shouldAntialias)
-{
- if (paintingDisabled())
- return;
-
- if (npoints <= 1)
- return;
-
- if (isRecording()) {
- m_displayListRecorder->drawConvexPolygon(npoints, points, shouldAntialias);
- return;
- }
-
- cairo_t* cr = platformContext()->cr();
-
- cairo_save(cr);
- cairo_set_antialias(cr, shouldAntialias ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE);
- addConvexPolygonToContext(cr, npoints, points);
-
- if (fillColor().alpha()) {
- setSourceRGBAFromColor(cr, fillColor());
- cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD);
- cairo_fill_preserve(cr);
- }
-
- if (strokeStyle() != NoStroke) {
- setSourceRGBAFromColor(cr, strokeColor());
- cairo_set_line_width(cr, strokeThickness());
- cairo_stroke(cr);
- } else
- cairo_new_path(cr);
-
- cairo_restore(cr);
-}
-
-void GraphicsContext::clipConvexPolygon(size_t numPoints, const FloatPoint* points, bool antialiased)
-{
- if (paintingDisabled())
- return;
-
- if (numPoints <= 1)
- return;
-
- if (isRecording()) {
- m_displayListRecorder->clipConvexPolygon(numPoints, points, antialiased);
- return;
- }
-
- cairo_t* cr = platformContext()->cr();
-
- cairo_new_path(cr);
- cairo_fill_rule_t savedFillRule = cairo_get_fill_rule(cr);
- cairo_antialias_t savedAntialiasRule = cairo_get_antialias(cr);
-
- cairo_set_antialias(cr, antialiased ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE);
- cairo_set_fill_rule(cr, CAIRO_FILL_RULE_WINDING);
- addConvexPolygonToContext(cr, numPoints, points);
- cairo_clip(cr);
-
- cairo_set_antialias(cr, savedAntialiasRule);
- cairo_set_fill_rule(cr, savedFillRule);
-}
-
</del><span class="cx"> void GraphicsContext::fillPath(const Path& path)
</span><span class="cx"> {
</span><span class="cx"> if (paintingDisabled() || path.isEmpty())
</span><span class="lines">@@ -1294,7 +1223,7 @@
</span><span class="cx">
</span><span class="cx"> // When true, use the default Cairo backend antialias mode (usually this
</span><span class="cx"> // enables standard 'grayscale' antialiasing); false to explicitly disable
</span><del>- // antialiasing. This is the same strategy as used in drawConvexPolygon().
</del><ins>+ // antialiasing.
</ins><span class="cx"> cairo_set_antialias(platformContext()->cr(), enable ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgGraphicsContextCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -532,68 +532,6 @@
</span><span class="cx"> drawPath(path);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void addConvexPolygonToPath(Path& path, size_t numberOfPoints, const FloatPoint* points)
-{
- ASSERT(numberOfPoints > 0);
-
- path.moveTo(points[0]);
- for (size_t i = 1; i < numberOfPoints; ++i)
- path.addLineTo(points[i]);
- path.closeSubpath();
-}
-
-void GraphicsContext::drawConvexPolygon(size_t numberOfPoints, const FloatPoint* points, bool antialiased)
-{
- if (paintingDisabled())
- return;
-
- if (numberOfPoints <= 1)
- return;
-
- if (isRecording()) {
- m_displayListRecorder->drawConvexPolygon(numberOfPoints, points, antialiased);
- return;
- }
-
- CGContextRef context = platformContext();
-
- if (antialiased != shouldAntialias())
- CGContextSetShouldAntialias(context, antialiased);
-
- Path path;
- addConvexPolygonToPath(path, numberOfPoints, points);
- drawPath(path);
-
- if (antialiased != shouldAntialias())
- CGContextSetShouldAntialias(context, shouldAntialias());
-}
-
-void GraphicsContext::clipConvexPolygon(size_t numberOfPoints, const FloatPoint* points, bool antialias)
-{
- if (paintingDisabled())
- return;
-
- if (numberOfPoints <= 1)
- return;
-
- if (isRecording()) {
- m_displayListRecorder->clipConvexPolygon(numberOfPoints, points, antialias);
- return;
- }
-
- CGContextRef context = platformContext();
-
- if (antialias != shouldAntialias())
- CGContextSetShouldAntialias(context, antialias);
-
- Path path;
- addConvexPolygonToPath(path, numberOfPoints, points);
- clipPath(path, RULE_NONZERO);
-
- if (antialias != shouldAntialias())
- CGContextSetShouldAntialias(context, shouldAntialias());
-}
-
</del><span class="cx"> void GraphicsContext::applyStrokePattern()
</span><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="lines">@@ -703,14 +641,6 @@
</span><span class="cx"> CGContextDrawPath(context, drawingMode);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline void fillPathWithFillRule(CGContextRef context, WindRule fillRule)
-{
- if (fillRule == RULE_EVENODD)
- CGContextEOFillPath(context);
- else
- CGContextFillPath(context);
-}
-
</del><span class="cx"> void GraphicsContext::fillPath(const Path& path)
</span><span class="cx"> {
</span><span class="cx"> if (paintingDisabled() || path.isEmpty())
</span><span class="lines">@@ -767,7 +697,11 @@
</span><span class="cx">
</span><span class="cx"> if (m_state.fillPattern)
</span><span class="cx"> applyFillPattern();
</span><del>- fillPathWithFillRule(context, fillRule());
</del><ins>+
+ if (fillRule() == RULE_EVENODD)
+ CGContextEOFillPath(context);
+ else
+ CGContextFillPath(context);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void GraphicsContext::strokePath(const Path& path)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgPathCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/PathCG.cpp (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/PathCG.cpp        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/platform/graphics/cg/PathCG.cpp        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -73,6 +73,22 @@
</span><span class="cx"> return context;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+Path Path::polygonPathFromPoints(const Vector<FloatPoint>& points)
+{
+ Path path;
+ if (points.size() < 2)
+ return path;
+
+ Vector<CGPoint, 32> cgPoints;
+ cgPoints.reserveInitialCapacity(points.size() - 1);
+ for (size_t i = 0; i < points.size(); ++i)
+ cgPoints.uncheckedAppend(points[i]);
+
+ CGPathAddLines(path.ensurePlatformPath(), nullptr, cgPoints.data(), cgPoints.size());
+ path.closeSubpath();
+ return path;
+}
+
</ins><span class="cx"> Path::Path()
</span><span class="cx"> : m_path(nullptr)
</span><span class="cx"> {
</span><span class="lines">@@ -245,27 +261,27 @@
</span><span class="cx">
</span><span class="cx"> void Path::moveTo(const FloatPoint& point)
</span><span class="cx"> {
</span><del>- CGPathMoveToPoint(ensurePlatformPath(), 0, point.x(), point.y());
</del><ins>+ CGPathMoveToPoint(ensurePlatformPath(), nullptr, point.x(), point.y());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Path::addLineTo(const FloatPoint& p)
</span><span class="cx"> {
</span><del>- CGPathAddLineToPoint(ensurePlatformPath(), 0, p.x(), p.y());
</del><ins>+ CGPathAddLineToPoint(ensurePlatformPath(), nullptr, p.x(), p.y());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Path::addQuadCurveTo(const FloatPoint& cp, const FloatPoint& p)
</span><span class="cx"> {
</span><del>- CGPathAddQuadCurveToPoint(ensurePlatformPath(), 0, cp.x(), cp.y(), p.x(), p.y());
</del><ins>+ CGPathAddQuadCurveToPoint(ensurePlatformPath(), nullptr, cp.x(), cp.y(), p.x(), p.y());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Path::addBezierCurveTo(const FloatPoint& cp1, const FloatPoint& cp2, const FloatPoint& p)
</span><span class="cx"> {
</span><del>- CGPathAddCurveToPoint(ensurePlatformPath(), 0, cp1.x(), cp1.y(), cp2.x(), cp2.y(), p.x(), p.y());
</del><ins>+ CGPathAddCurveToPoint(ensurePlatformPath(), nullptr, cp1.x(), cp1.y(), cp2.x(), cp2.y(), p.x(), p.y());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius)
</span><span class="cx"> {
</span><del>- CGPathAddArcToPoint(ensurePlatformPath(), 0, p1.x(), p1.y(), p2.x(), p2.y(), radius);
</del><ins>+ CGPathAddArcToPoint(ensurePlatformPath(), nullptr, p1.x(), p1.y(), p2.x(), p2.y(), radius);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Path::platformAddPathForRoundedRect(const FloatRect& rect, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListItemscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -79,8 +79,6 @@
</span><span class="cx"> return sizeof(downcast<ClipOutToPath>(item));
</span><span class="cx"> case ItemType::ClipPath:
</span><span class="cx"> return sizeof(downcast<ClipPath>(item));
</span><del>- case ItemType::ClipConvexPolygon:
- return sizeof(downcast<ClipConvexPolygon>(item));
</del><span class="cx"> case ItemType::DrawGlyphs:
</span><span class="cx"> return sizeof(downcast<DrawGlyphs>(item));
</span><span class="cx"> case ItemType::DrawImage:
</span><span class="lines">@@ -105,8 +103,6 @@
</span><span class="cx"> return sizeof(downcast<DrawLineForDocumentMarker>(item));
</span><span class="cx"> case ItemType::DrawEllipse:
</span><span class="cx"> return sizeof(downcast<DrawEllipse>(item));
</span><del>- case ItemType::DrawConvexPolygon:
- return sizeof(downcast<DrawConvexPolygon>(item));
</del><span class="cx"> case ItemType::DrawPath:
</span><span class="cx"> return sizeof(downcast<DrawPath>(item));
</span><span class="cx"> case ItemType::DrawFocusRingPath:
</span><span class="lines">@@ -348,26 +344,6 @@
</span><span class="cx"> return ts;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ClipConvexPolygon::ClipConvexPolygon(size_t numberOfPoints, const FloatPoint* points, bool antialiased)
- : Item(ItemType::ClipConvexPolygon)
- , m_antialias(antialiased)
-{
- for (size_t i = 0; i < numberOfPoints; ++i)
- m_points.append(points[i]);
-}
-
-void ClipConvexPolygon::apply(GraphicsContext& context) const
-{
- context.clipConvexPolygon(m_points.size(), m_points.data(), m_antialias);
-}
-
-static TextStream& operator<<(TextStream& ts, const ClipConvexPolygon& item)
-{
- ts.dumpProperty("points", item.points());
- ts.dumpProperty("antialias", item.antialias());
- return ts;
-}
-
</del><span class="cx"> DrawGlyphs::DrawGlyphs(const Font& font, const GlyphBufferGlyph* glyphs, const GlyphBufferAdvance* advances, unsigned count, const FloatPoint& blockLocation, const FloatSize& localAnchor, FontSmoothingMode smoothingMode)
</span><span class="cx"> : DrawingItem(ItemType::DrawGlyphs)
</span><span class="cx"> , m_font(const_cast<Font&>(font))
</span><span class="lines">@@ -682,47 +658,6 @@
</span><span class="cx"> return ts;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// FIXME: Share this code.
-void addConvexPolygonToPath(Path& path, size_t numberOfPoints, const FloatPoint* points)
-{
- ASSERT(numberOfPoints > 0);
-
- path.moveTo(points[0]);
- for (size_t i = 1; i < numberOfPoints; ++i)
- path.addLineTo(points[i]);
- path.closeSubpath();
-}
-
-DrawConvexPolygon::DrawConvexPolygon(size_t numberOfPoints, const FloatPoint* points, bool antialiased)
- : DrawingItem(ItemType::DrawConvexPolygon)
- , m_antialiased(antialiased)
-{
- for (size_t i = 0; i < numberOfPoints; ++i)
- m_points.append(points[i]);
-}
-
-Optional<FloatRect> DrawConvexPolygon::localBounds(const GraphicsContext&) const
-{
- FloatRect result;
- for (auto& point : m_points)
- result.extend(point);
- result.inflate(m_antialiased ? 1 : 0); // Account for antialiasing
- return result;
-}
-
-void DrawConvexPolygon::apply(GraphicsContext& context) const
-{
- context.drawConvexPolygon(m_points.size(), m_points.data(), m_antialiased);
-}
-
-static TextStream& operator<<(TextStream& ts, const DrawConvexPolygon& item)
-{
- ts << static_cast<const DrawingItem&>(item);
- ts.dumpProperty("points", item.points());
- ts.dumpProperty("antialiased", item.antialiased());
- return ts;
-}
-
</del><span class="cx"> void DrawPath::apply(GraphicsContext& context) const
</span><span class="cx"> {
</span><span class="cx"> #if USE(CG)
</span><span class="lines">@@ -1023,7 +958,6 @@
</span><span class="cx"> case ItemType::ClipOut: ts << "clip-out"; break;
</span><span class="cx"> case ItemType::ClipOutToPath: ts << "clip-out-to-path"; break;
</span><span class="cx"> case ItemType::ClipPath: ts << "clip-path"; break;
</span><del>- case ItemType::ClipConvexPolygon: ts << "clip-convex-polygon"; break;
</del><span class="cx"> case ItemType::DrawGlyphs: ts << "draw-glyphs"; break;
</span><span class="cx"> case ItemType::DrawImage: ts << "draw-image"; break;
</span><span class="cx"> case ItemType::DrawTiledImage: ts << "draw-tiled-image"; break;
</span><span class="lines">@@ -1037,7 +971,6 @@
</span><span class="cx"> case ItemType::DrawLinesForText: ts << "draw-lines-for-text"; break;
</span><span class="cx"> case ItemType::DrawLineForDocumentMarker: ts << "draw-lines-for-document-marker"; break;
</span><span class="cx"> case ItemType::DrawEllipse: ts << "draw-ellipse"; break;
</span><del>- case ItemType::DrawConvexPolygon: ts << "draw-convex-polgon"; break;
</del><span class="cx"> case ItemType::DrawPath: ts << "draw-path"; break;
</span><span class="cx"> case ItemType::DrawFocusRingPath: ts << "draw-focus-ring-path"; break;
</span><span class="cx"> case ItemType::DrawFocusRingRects: ts << "draw-focus-ring-rects"; break;
</span><span class="lines">@@ -1114,9 +1047,6 @@
</span><span class="cx"> case ItemType::ClipPath:
</span><span class="cx"> ts << downcast<ClipPath>(item);
</span><span class="cx"> break;
</span><del>- case ItemType::ClipConvexPolygon:
- ts << downcast<ClipConvexPolygon>(item);
- break;
</del><span class="cx"> case ItemType::DrawGlyphs:
</span><span class="cx"> ts << downcast<DrawGlyphs>(item);
</span><span class="cx"> break;
</span><span class="lines">@@ -1152,9 +1082,6 @@
</span><span class="cx"> case ItemType::DrawEllipse:
</span><span class="cx"> ts << downcast<DrawEllipse>(item);
</span><span class="cx"> break;
</span><del>- case ItemType::DrawConvexPolygon:
- ts << downcast<DrawConvexPolygon>(item);
- break;
</del><span class="cx"> case ItemType::DrawPath:
</span><span class="cx"> ts << downcast<DrawPath>(item);
</span><span class="cx"> break;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListItemsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -64,7 +64,6 @@
</span><span class="cx"> ClipOut,
</span><span class="cx"> ClipOutToPath,
</span><span class="cx"> ClipPath,
</span><del>- ClipConvexPolygon,
</del><span class="cx"> DrawGlyphs,
</span><span class="cx"> DrawImage,
</span><span class="cx"> DrawTiledImage,
</span><span class="lines">@@ -78,7 +77,6 @@
</span><span class="cx"> DrawLinesForText,
</span><span class="cx"> DrawLineForDocumentMarker,
</span><span class="cx"> DrawEllipse,
</span><del>- DrawConvexPolygon,
</del><span class="cx"> DrawPath,
</span><span class="cx"> DrawFocusRingPath,
</span><span class="cx"> DrawFocusRingRects,
</span><span class="lines">@@ -522,25 +520,6 @@
</span><span class="cx"> WindRule m_windRule;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-class ClipConvexPolygon : public Item {
-public:
- static Ref<ClipConvexPolygon> create(size_t numberOfPoints, const FloatPoint* points, bool antialiased)
- {
- return adoptRef(*new ClipConvexPolygon(numberOfPoints, points, antialiased));
- }
-
- const Vector<FloatPoint>& points() const { return m_points; }
- bool antialias() const { return m_antialias; }
-
-private:
- ClipConvexPolygon(size_t numberOfPoints, const FloatPoint*, bool antialiased);
-
- virtual void apply(GraphicsContext&) const override;
-
- Vector<FloatPoint> m_points;
- bool m_antialias;
-};
-
</del><span class="cx"> class DrawGlyphs : public DrawingItem {
</span><span class="cx"> public:
</span><span class="cx"> static Ref<DrawGlyphs> create(const Font& font, const GlyphBufferGlyph* glyphs, const GlyphBufferAdvance* advances, unsigned count, const FloatPoint& blockLocation, const FloatSize& localAnchor, FontSmoothingMode smoothingMode)
</span><span class="lines">@@ -897,26 +876,6 @@
</span><span class="cx"> FloatRect m_rect;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-class DrawConvexPolygon : public DrawingItem {
-public:
- static Ref<DrawConvexPolygon> create(size_t numberOfPoints, const FloatPoint* points, bool antialiased)
- {
- return adoptRef(*new DrawConvexPolygon(numberOfPoints, points, antialiased));
- }
-
- const Vector<FloatPoint>& points() const { return m_points; }
- bool antialiased() const { return m_antialiased; }
-
-private:
- DrawConvexPolygon(size_t numberOfPoints, const FloatPoint*, bool antialiased);
-
- virtual void apply(GraphicsContext&) const override;
- virtual Optional<FloatRect> localBounds(const GraphicsContext&) const override;
-
- Vector<FloatPoint> m_points;
- bool m_antialiased;
-};
-
</del><span class="cx"> class DrawPath : public DrawingItem {
</span><span class="cx"> public:
</span><span class="cx"> static Ref<DrawPath> create(const Path& path)
</span><span class="lines">@@ -1355,9 +1314,6 @@
</span><span class="cx"> float m_scaleFactor;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-// FIXME: this needs to move.
-void addConvexPolygonToPath(Path&, size_t numPoints, const FloatPoint*);
-
</del><span class="cx"> TextStream& operator<<(TextStream&, const Item&);
</span><span class="cx">
</span><span class="cx"> } // namespace DisplayList
</span><span class="lines">@@ -1391,7 +1347,6 @@
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(ClipOut)
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(ClipOutToPath)
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(ClipPath)
</span><del>-SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(ClipConvexPolygon)
</del><span class="cx"> SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(DrawGlyphs)
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(DrawImage)
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(DrawTiledImage)
</span><span class="lines">@@ -1405,7 +1360,6 @@
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(DrawLinesForText)
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(DrawLineForDocumentMarker)
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(DrawEllipse)
</span><del>-SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(DrawConvexPolygon)
</del><span class="cx"> SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(DrawPath)
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(DrawFocusRingPath)
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM(DrawFocusRingRects)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecordercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -237,12 +237,6 @@
</span><span class="cx"> updateItemExtent(newItem);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Recorder::drawConvexPolygon(size_t numberOfPoints, const FloatPoint* points, bool antialiased)
-{
- DrawingItem& newItem = downcast<DrawingItem>(appendItem(DrawConvexPolygon::create(numberOfPoints, points, antialiased)));
- updateItemExtent(newItem);
-}
-
</del><span class="cx"> void Recorder::drawPath(const Path& path)
</span><span class="cx"> {
</span><span class="cx"> DrawingItem& newItem = downcast<DrawingItem>(appendItem(DrawPath::create(path)));
</span><span class="lines">@@ -367,15 +361,6 @@
</span><span class="cx"> appendItem(ClipPath::create(path, windRule));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Recorder::clipConvexPolygon(size_t numPoints, const FloatPoint* points, bool antialias)
-{
- Path polygonPath;
- addConvexPolygonToPath(polygonPath, numPoints, points);
- currentState().clipBounds.intersect(polygonPath.fastBoundingRect());
-
- appendItem(ClipConvexPolygon::create(numPoints, points, antialias));
-}
-
</del><span class="cx"> void Recorder::applyDeviceScaleFactor(float deviceScaleFactor)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: this changes the baseCTM, which will invalidate all of our cached extents.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecorderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -95,7 +95,6 @@
</span><span class="cx"> void drawLinesForText(const FloatPoint&, const DashArray& widths, bool printing, bool doubleLines, float strokeThickness);
</span><span class="cx"> void drawLineForDocumentMarker(const FloatPoint&, float width, GraphicsContext::DocumentMarkerLineStyle);
</span><span class="cx"> void drawEllipse(const FloatRect&);
</span><del>- void drawConvexPolygon(size_t numberOfPoints, const FloatPoint*, bool antialiased);
</del><span class="cx"> void drawPath(const Path&);
</span><span class="cx">
</span><span class="cx"> void drawFocusRing(const Path&, int width, int offset, const Color&);
</span><span class="lines">@@ -116,7 +115,6 @@
</span><span class="cx"> void clipOut(const FloatRect&);
</span><span class="cx"> void clipOut(const Path&);
</span><span class="cx"> void clipPath(const Path&, WindRule);
</span><del>- void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias);
</del><span class="cx">
</span><span class="cx"> void applyDeviceScaleFactor(float);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -1905,8 +1905,6 @@
</span><span class="cx"> void RenderBoxModelObject::clipBorderSidePolygon(GraphicsContext& graphicsContext, const RoundedRect& outerBorder, const RoundedRect& innerBorder,
</span><span class="cx"> BoxSide side, bool firstEdgeMatches, bool secondEdgeMatches)
</span><span class="cx"> {
</span><del>- FloatPoint quad[4];
-
</del><span class="cx"> float deviceScaleFactor = document().deviceScaleFactor();
</span><span class="cx"> const FloatRect& outerRect = snapRectToDevicePixels(outerBorder.rect(), deviceScaleFactor);
</span><span class="cx"> const FloatRect& innerRect = snapRectToDevicePixels(innerBorder.rect(), deviceScaleFactor);
</span><span class="lines">@@ -1927,12 +1925,14 @@
</span><span class="cx"> // 3 / \ 3
</span><span class="cx"> // 0----------------3
</span><span class="cx"> //
</span><ins>+ Vector<FloatPoint> quad;
+ quad.reserveInitialCapacity(4);
</ins><span class="cx"> switch (side) {
</span><span class="cx"> case BSTop:
</span><del>- quad[0] = outerRect.minXMinYCorner();
- quad[1] = innerRect.minXMinYCorner();
- quad[2] = innerRect.maxXMinYCorner();
- quad[3] = outerRect.maxXMinYCorner();
</del><ins>+ quad.uncheckedAppend(outerRect.minXMinYCorner());
+ quad.uncheckedAppend(innerRect.minXMinYCorner());
+ quad.uncheckedAppend(innerRect.maxXMinYCorner());
+ quad.uncheckedAppend(outerRect.maxXMinYCorner());
</ins><span class="cx">
</span><span class="cx"> if (!innerBorder.radii().topLeft().isZero())
</span><span class="cx"> findInnerVertex(outerRect.minXMinYCorner(), innerRect.minXMinYCorner(), centerPoint, quad[1]);
</span><span class="lines">@@ -1942,10 +1942,10 @@
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case BSLeft:
</span><del>- quad[0] = outerRect.minXMinYCorner();
- quad[1] = innerRect.minXMinYCorner();
- quad[2] = innerRect.minXMaxYCorner();
- quad[3] = outerRect.minXMaxYCorner();
</del><ins>+ quad.uncheckedAppend(outerRect.minXMinYCorner());
+ quad.uncheckedAppend(innerRect.minXMinYCorner());
+ quad.uncheckedAppend(innerRect.minXMaxYCorner());
+ quad.uncheckedAppend(outerRect.minXMaxYCorner());
</ins><span class="cx">
</span><span class="cx"> if (!innerBorder.radii().topLeft().isZero())
</span><span class="cx"> findInnerVertex(outerRect.minXMinYCorner(), innerRect.minXMinYCorner(), centerPoint, quad[1]);
</span><span class="lines">@@ -1955,10 +1955,10 @@
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case BSBottom:
</span><del>- quad[0] = outerRect.minXMaxYCorner();
- quad[1] = innerRect.minXMaxYCorner();
- quad[2] = innerRect.maxXMaxYCorner();
- quad[3] = outerRect.maxXMaxYCorner();
</del><ins>+ quad.uncheckedAppend(outerRect.minXMaxYCorner());
+ quad.uncheckedAppend(innerRect.minXMaxYCorner());
+ quad.uncheckedAppend(innerRect.maxXMaxYCorner());
+ quad.uncheckedAppend(outerRect.maxXMaxYCorner());
</ins><span class="cx">
</span><span class="cx"> if (!innerBorder.radii().bottomLeft().isZero())
</span><span class="cx"> findInnerVertex(outerRect.minXMaxYCorner(), innerRect.minXMaxYCorner(), centerPoint, quad[1]);
</span><span class="lines">@@ -1968,10 +1968,10 @@
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case BSRight:
</span><del>- quad[0] = outerRect.maxXMinYCorner();
- quad[1] = innerRect.maxXMinYCorner();
- quad[2] = innerRect.maxXMaxYCorner();
- quad[3] = outerRect.maxXMaxYCorner();
</del><ins>+ quad.uncheckedAppend(outerRect.maxXMinYCorner());
+ quad.uncheckedAppend(innerRect.maxXMinYCorner());
+ quad.uncheckedAppend(innerRect.maxXMaxYCorner());
+ quad.uncheckedAppend(outerRect.maxXMaxYCorner());
</ins><span class="cx">
</span><span class="cx"> if (!innerBorder.radii().topRight().isZero())
</span><span class="cx"> findInnerVertex(outerRect.maxXMinYCorner(), innerRect.maxXMinYCorner(), centerPoint, quad[1]);
</span><span class="lines">@@ -1984,25 +1984,35 @@
</span><span class="cx"> // If the border matches both of its adjacent sides, don't anti-alias the clip, and
</span><span class="cx"> // if neither side matches, anti-alias the clip.
</span><span class="cx"> if (firstEdgeMatches == secondEdgeMatches) {
</span><del>- graphicsContext.clipConvexPolygon(4, quad, !firstEdgeMatches);
</del><ins>+ bool wasAntialiased = graphicsContext.shouldAntialias();
+ graphicsContext.setShouldAntialias(!firstEdgeMatches);
+ graphicsContext.clipPath(Path::polygonPathFromPoints(quad), RULE_NONZERO);
+ graphicsContext.setShouldAntialias(wasAntialiased);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Square off the end which shouldn't be affected by antialiasing, and clip.
</span><del>- FloatPoint firstQuad[4];
- firstQuad[0] = quad[0];
- firstQuad[1] = quad[1];
- firstQuad[2] = side == BSTop || side == BSBottom ? FloatPoint(quad[3].x(), quad[2].y()) : FloatPoint(quad[2].x(), quad[3].y());
- firstQuad[3] = quad[3];
- graphicsContext.clipConvexPolygon(4, firstQuad, !firstEdgeMatches);
</del><ins>+ Vector<FloatPoint> firstQuad = {
+ quad[0],
+ quad[1],
+ side == BSTop || side == BSBottom ? FloatPoint(quad[3].x(), quad[2].y()) : FloatPoint(quad[2].x(), quad[3].y()),
+ quad[3]
+ };
+ bool wasAntialiased = graphicsContext.shouldAntialias();
+ graphicsContext.setShouldAntialias(!firstEdgeMatches);
+ graphicsContext.clipPath(Path::polygonPathFromPoints(firstQuad), RULE_NONZERO);
</ins><span class="cx">
</span><del>- FloatPoint secondQuad[4];
- secondQuad[0] = quad[0];
- secondQuad[1] = side == BSTop || side == BSBottom ? FloatPoint(quad[0].x(), quad[1].y()) : FloatPoint(quad[1].x(), quad[0].y());
- secondQuad[2] = quad[2];
- secondQuad[3] = quad[3];
</del><ins>+ Vector<FloatPoint> secondQuad = {
+ quad[0],
+ side == BSTop || side == BSBottom ? FloatPoint(quad[0].x(), quad[1].y()) : FloatPoint(quad[1].x(), quad[0].y()),
+ quad[2],
+ quad[3]
+ };
</ins><span class="cx"> // Antialiasing affects the second side.
</span><del>- graphicsContext.clipConvexPolygon(4, secondQuad, !secondEdgeMatches);
</del><ins>+ graphicsContext.setShouldAntialias(!secondEdgeMatches);
+ graphicsContext.clipPath(Path::polygonPathFromPoints(secondQuad), RULE_NONZERO);
+
+ graphicsContext.setShouldAntialias(wasAntialiased);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static LayoutRect calculateSideRectIncludingInner(const RoundedRect& outerBorder, const BorderEdge edges[], BoxSide side)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderElement.cpp        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -2037,8 +2037,6 @@
</span><span class="cx"> ASSERT(x2 >= x1);
</span><span class="cx"> ASSERT(y2 >= y1);
</span><span class="cx"> if (!adjacentWidth1 && !adjacentWidth2) {
</span><del>- // Turn off antialiasing to match the behavior of drawConvexPolygon();
- // this matters for rects in transformed contexts.
</del><span class="cx"> graphicsContext.setStrokeStyle(NoStroke);
</span><span class="cx"> graphicsContext.setFillColor(color);
</span><span class="cx"> bool wasAntialiased = graphicsContext.shouldAntialias();
</span><span class="lines">@@ -2055,37 +2053,42 @@
</span><span class="cx"> x2 = roundToDevicePixel(x2, deviceScaleFactor);
</span><span class="cx"> y2 = roundToDevicePixel(y2, deviceScaleFactor);
</span><span class="cx">
</span><del>- FloatPoint quad[4];
</del><ins>+ Vector<FloatPoint> quad;
+ quad.reserveInitialCapacity(4);
</ins><span class="cx"> switch (side) {
</span><span class="cx"> case BSTop:
</span><del>- quad[0] = FloatPoint(x1 + std::max<float>(-adjacentWidth1, 0), y1);
- quad[1] = FloatPoint(x1 + std::max<float>(adjacentWidth1, 0), y2);
- quad[2] = FloatPoint(x2 - std::max<float>(adjacentWidth2, 0), y2);
- quad[3] = FloatPoint(x2 - std::max<float>(-adjacentWidth2, 0), y1);
</del><ins>+ quad.uncheckedAppend({ x1 + std::max<float>(-adjacentWidth1, 0), y1 });
+ quad.uncheckedAppend({ x1 + std::max<float>( adjacentWidth1, 0), y2 });
+ quad.uncheckedAppend({ x2 - std::max<float>( adjacentWidth2, 0), y2 });
+ quad.uncheckedAppend({ x2 - std::max<float>(-adjacentWidth2, 0), y1 });
</ins><span class="cx"> break;
</span><span class="cx"> case BSBottom:
</span><del>- quad[0] = FloatPoint(x1 + std::max<float>(adjacentWidth1, 0), y1);
- quad[1] = FloatPoint(x1 + std::max<float>(-adjacentWidth1, 0), y2);
- quad[2] = FloatPoint(x2 - std::max<float>(-adjacentWidth2, 0), y2);
- quad[3] = FloatPoint(x2 - std::max<float>(adjacentWidth2, 0), y1);
</del><ins>+ quad.uncheckedAppend({ x1 + std::max<float>( adjacentWidth1, 0), y1 });
+ quad.uncheckedAppend({ x1 + std::max<float>(-adjacentWidth1, 0), y2 });
+ quad.uncheckedAppend({ x2 - std::max<float>(-adjacentWidth2, 0), y2 });
+ quad.uncheckedAppend({ x2 - std::max<float>( adjacentWidth2, 0), y1 });
</ins><span class="cx"> break;
</span><span class="cx"> case BSLeft:
</span><del>- quad[0] = FloatPoint(x1, y1 + std::max<float>(-adjacentWidth1, 0));
- quad[1] = FloatPoint(x1, y2 - std::max<float>(-adjacentWidth2, 0));
- quad[2] = FloatPoint(x2, y2 - std::max<float>(adjacentWidth2, 0));
- quad[3] = FloatPoint(x2, y1 + std::max<float>(adjacentWidth1, 0));
</del><ins>+ quad.uncheckedAppend({ x1, y1 + std::max<float>(-adjacentWidth1, 0) });
+ quad.uncheckedAppend({ x1, y2 - std::max<float>(-adjacentWidth2, 0) });
+ quad.uncheckedAppend({ x2, y2 - std::max<float>( adjacentWidth2, 0) });
+ quad.uncheckedAppend({ x2, y1 + std::max<float>( adjacentWidth1, 0) });
</ins><span class="cx"> break;
</span><span class="cx"> case BSRight:
</span><del>- quad[0] = FloatPoint(x1, y1 + std::max<float>(adjacentWidth1, 0));
- quad[1] = FloatPoint(x1, y2 - std::max<float>(adjacentWidth2, 0));
- quad[2] = FloatPoint(x2, y2 - std::max<float>(-adjacentWidth2, 0));
- quad[3] = FloatPoint(x2, y1 + std::max<float>(-adjacentWidth1, 0));
</del><ins>+ quad.uncheckedAppend({ x1, y1 + std::max<float>( adjacentWidth1, 0) });
+ quad.uncheckedAppend({ x1, y2 - std::max<float>( adjacentWidth2, 0) });
+ quad.uncheckedAppend({ x2, y2 - std::max<float>(-adjacentWidth2, 0) });
+ quad.uncheckedAppend({ x2, y1 + std::max<float>(-adjacentWidth1, 0) });
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> graphicsContext.setStrokeStyle(NoStroke);
</span><span class="cx"> graphicsContext.setFillColor(color);
</span><del>- graphicsContext.drawConvexPolygon(4, quad, antialias);
</del><ins>+ bool wasAntialiased = graphicsContext.shouldAntialias();
+ graphicsContext.setShouldAntialias(antialias);
+ graphicsContext.fillPath(Path::polygonPathFromPoints(quad));
+ graphicsContext.setShouldAntialias(wasAntialiased);
+
</ins><span class="cx"> graphicsContext.setStrokeStyle(oldStrokeStyle);
</span><span class="cx"> break;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -683,25 +683,26 @@
</span><span class="cx"> float centerX = floorf(buttonClip.x() + buttonClip.width() / 2.0) - 0.5;
</span><span class="cx"> float centerY = floorf(buttonClip.y() + buttonClip.height() * 3.0 / 8.0);
</span><span class="cx">
</span><del>- FloatPoint arrow[3];
- FloatPoint shadow[3];
</del><ins>+ Vector<FloatPoint> arrow = {
+ { centerX - MenuListArrowWidth / 2, centerY },
+ { centerX + MenuListArrowWidth / 2, centerY },
+ { centerX, centerY + MenuListArrowHeight }
+ };
</ins><span class="cx">
</span><del>- arrow[0] = FloatPoint(centerX - MenuListArrowWidth / 2.0, centerY);
- arrow[1] = FloatPoint(centerX + MenuListArrowWidth / 2.0, centerY);
- arrow[2] = FloatPoint(centerX, centerY + MenuListArrowHeight);
</del><ins>+ Vector<FloatPoint> shadow = {
+ { arrow[0].x(), arrow[0].y() + 1 },
+ { arrow[1].x(), arrow[1].y() + 1 },
+ { arrow[2].x(), arrow[2].y() + 1 }
+ };
</ins><span class="cx">
</span><del>- shadow[0] = FloatPoint(arrow[0].x(), arrow[0].y() + 1.0f);
- shadow[1] = FloatPoint(arrow[1].x(), arrow[1].y() + 1.0f);
- shadow[2] = FloatPoint(arrow[2].x(), arrow[2].y() + 1.0f);
-
</del><span class="cx"> float opacity = isReadOnlyControl(box) ? 0.2 : 0.5;
</span><span class="cx"> paintInfo.context().setStrokeColor(Color(0.0f, 0.0f, 0.0f, opacity));
</span><span class="cx"> paintInfo.context().setFillColor(Color(0.0f, 0.0f, 0.0f, opacity));
</span><del>- paintInfo.context().drawConvexPolygon(3, shadow, true);
</del><ins>+ paintInfo.context().drawPath(Path::polygonPathFromPoints(shadow));
</ins><span class="cx">
</span><span class="cx"> paintInfo.context().setStrokeColor(Color::white);
</span><span class="cx"> paintInfo.context().setFillColor(Color::white);
</span><del>- paintInfo.context().drawConvexPolygon(3, arrow, true);
</del><ins>+ paintInfo.context().drawPath(Path::polygonPathFromPoints(arrow));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.mm        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -1278,21 +1278,21 @@
</span><span class="cx"> paintInfo.context().setFillColor(renderer.style().visitedDependentColor(CSSPropertyColor));
</span><span class="cx"> paintInfo.context().setStrokeStyle(NoStroke);
</span><span class="cx">
</span><del>- FloatPoint arrow1[3];
- arrow1[0] = FloatPoint(leftEdge, centerY - spaceBetweenArrows / 2.0f);
- arrow1[1] = FloatPoint(leftEdge + arrowWidth, centerY - spaceBetweenArrows / 2.0f);
- arrow1[2] = FloatPoint(leftEdge + arrowWidth / 2.0f, centerY - spaceBetweenArrows / 2.0f - arrowHeight);
-
</del><span class="cx"> // Draw the top arrow
</span><del>- paintInfo.context().drawConvexPolygon(3, arrow1, true);
</del><ins>+ Vector<FloatPoint> arrow1 = {
+ { leftEdge, centerY - spaceBetweenArrows / 2.0f },
+ { leftEdge + arrowWidth, centerY - spaceBetweenArrows / 2.0f },
+ { leftEdge + arrowWidth / 2.0f, centerY - spaceBetweenArrows / 2.0f - arrowHeight }
+ };
+ paintInfo.context().fillPath(Path::polygonPathFromPoints(arrow1));
</ins><span class="cx">
</span><del>- FloatPoint arrow2[3];
- arrow2[0] = FloatPoint(leftEdge, centerY + spaceBetweenArrows / 2.0f);
- arrow2[1] = FloatPoint(leftEdge + arrowWidth, centerY + spaceBetweenArrows / 2.0f);
- arrow2[2] = FloatPoint(leftEdge + arrowWidth / 2.0f, centerY + spaceBetweenArrows / 2.0f + arrowHeight);
-
</del><span class="cx"> // Draw the bottom arrow
</span><del>- paintInfo.context().drawConvexPolygon(3, arrow2, true);
</del><ins>+ Vector<FloatPoint> arrow2 = {
+ { leftEdge, centerY + spaceBetweenArrows / 2.0f },
+ { leftEdge + arrowWidth, centerY + spaceBetweenArrows / 2.0f },
+ { leftEdge + arrowWidth / 2.0f, centerY + spaceBetweenArrows / 2.0f + arrowHeight }
+ };
+ paintInfo.context().fillPath(Path::polygonPathFromPoints(arrow2));
</ins><span class="cx">
</span><span class="cx"> Color leftSeparatorColor(0, 0, 0, 40);
</span><span class="cx"> Color rightSeparatorColor(255, 255, 255, 40);
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebKit/win/ChangeLog        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-01-15 Simon Fraser <simon.fraser@apple.com>
+
+ Remove GraphicsContext::drawConvexPolygon() and GraphicsContext::clipConvexPolygon()
+ https://bugs.webkit.org/show_bug.cgi?id=153174
+
+ Reviewed by Zalan Bujtas.
+
+ GraphicsContext::drawConvexPolygon() and GraphicsContext::clipConvexPolygon() were
+ poorly named (non-convex polygons are allowed), and just syntactic sugar over
+ clipPath() and drawPath().
+
+ Remove them, but add a convenience function to create a Path from a Vector of
+ points. For CG, we can use the more efficient CGPathAddLines().
+
+ * FullscreenVideoController.cpp:
+ (HUDSlider::draw):
+
</ins><span class="cx"> 2016-01-05 Per Arne Vollan <peavo@outlook.com>
</span><span class="cx">
</span><span class="cx"> [WinCairo] Download should use header values from provided request object.
</span></span></pre></div>
<a id="trunkSourceWebKitwinFullscreenVideoControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/FullscreenVideoController.cpp (195169 => 195170)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/FullscreenVideoController.cpp        2016-01-16 16:46:03 UTC (rev 195169)
+++ trunk/Source/WebKit/win/FullscreenVideoController.cpp        2016-01-16 18:12:41 UTC (rev 195170)
</span><span class="lines">@@ -146,17 +146,15 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Draw a diamond
</span><del>- FloatPoint points[4];
</del><span class="cx"> float half = static_cast<float>(m_buttonSize) / 2;
</span><del>- points[0].setX(m_rect.location().x() + m_buttonPosition + half);
- points[0].setY(m_rect.location().y());
- points[1].setX(m_rect.location().x() + m_buttonPosition + m_buttonSize);
- points[1].setY(m_rect.location().y() + half);
- points[2].setX(m_rect.location().x() + m_buttonPosition + half);
- points[2].setY(m_rect.location().y() + m_buttonSize);
- points[3].setX(m_rect.location().x() + m_buttonPosition);
- points[3].setY(m_rect.location().y() + half);
- context.drawConvexPolygon(4, points, true);
</del><ins>+
+ Vector<FloatPoint> points = {
+ FloatPoint(m_rect.location().x() + m_buttonPosition + half, m_rect.location().y()),
+ FloatPoint(m_rect.location().x() + m_buttonPosition + m_buttonSize, m_rect.location().y() + half),
+ FloatPoint(m_rect.location().x() + m_buttonPosition + half, m_rect.location().y() + m_buttonSize),
+ FloatPoint(m_rect.location().x() + m_buttonPosition, m_rect.location().y() + half)
+ };
+ context.drawPath(Path::polygonPathFromPoints(points));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void HUDSlider::drag(const IntPoint& point, bool start)
</span></span></pre>
</div>
</div>
</body>
</html>