Remove GraphicsContext::drawConvexPolygon() and GraphicsContext::clipConvexPolygon()
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Jan 2016 18:12:41 +0000 (18:12 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Jan 2016 18:12:41 +0000 (18:12 +0000)
commiteaecb099d59420fea0892021ce00b51d7df52d3c
treee6da1024564120822047a56444af6378fb3dbf32
parent146c491b78cb7d98cb75cb1bb68c1998cd2fc46c
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/Path.cpp
Source/WebCore/platform/graphics/Path.h
Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Source/WebCore/platform/graphics/cg/PathCG.cpp
Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderThemeIOS.mm
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/FullscreenVideoController.cpp