Changeset 87099 in webkit
- Timestamp:
- May 23, 2011 2:50:03 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r87098 r87099 1 2011-05-23 Mike Reed <reed@google.com> 2 3 Reviewed by James Robinson. 4 5 Skia: Need to implement GraphicsContext::clipConvexPolygon() 6 https://bugs.webkit.org/show_bug.cgi?id=41311 7 8 No new tests. 9 10 * platform/graphics/skia/GraphicsContextSkia.cpp: 11 (WebCore::setPathFromConvexPoints): 12 (WebCore::GraphicsContext::drawConvexPolygon): 13 (WebCore::GraphicsContext::clipConvexPolygon): 14 1 15 2011-05-23 James Simonsen <simonjam@chromium.org> 2 16 -
trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
r85350 r87099 450 450 } 451 451 452 static void setPathFromConvexPoints(SkPath* path, size_t numPoints, const FloatPoint* points) 453 { 454 path->incReserve(numPoints); 455 path->moveTo(WebCoreFloatToSkScalar(points[0].x()), 456 WebCoreFloatToSkScalar(points[0].y())); 457 for (size_t i = 1; i < numPoints; ++i) { 458 path->lineTo(WebCoreFloatToSkScalar(points[i].x()), 459 WebCoreFloatToSkScalar(points[i].y())); 460 } 461 path->setIsConvex(true); 462 } 463 452 464 void GraphicsContext::drawConvexPolygon(size_t numPoints, 453 465 const FloatPoint* points, … … 463 475 464 476 SkPath path; 465 466 path.incReserve(numPoints); 467 path.moveTo(WebCoreFloatToSkScalar(points[0].x()), 468 WebCoreFloatToSkScalar(points[0].y())); 469 for (size_t i = 1; i < numPoints; i++) { 470 path.lineTo(WebCoreFloatToSkScalar(points[i].x()), 471 WebCoreFloatToSkScalar(points[i].y())); 472 } 477 setPathFromConvexPoints(&path, numPoints, points); 473 478 474 479 if (!isPathSkiaSafe(getCTM(), path)) … … 494 499 return; 495 500 496 // FIXME: IMPLEMENT!! 501 SkPath path; 502 setPathFromConvexPoints(&path, numPoints, points); 503 platformContext()->canvas()->clipPath(path); 497 504 } 498 505
Note: See TracChangeset
for help on using the changeset viewer.