Changeset 140098 in webkit
- Timestamp:
- Jan 17, 2013 8:01:33 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140097 r140098 1 2013-01-17 Rik Cabanier <cabanier@adobe.com> 2 3 Update GraphicsContext to support winding rule in clip operator for Chromium 4 https://bugs.webkit.org/show_bug.cgi?id=106872 5 6 Reviewed by Dirk Schulze. 7 8 Added support for winding to clip() and canvasClip() functions. 9 10 No new tests, no change in behavior. 11 12 * platform/graphics/skia/GraphicsContextSkia.cpp: 13 (WebCore::GraphicsContext::clip): Call clipPath() instead with winding rule. 14 (WebCore::GraphicsContext::canvasClip): Honor the winding rule. 15 1 16 2013-01-17 Shinya Kawanaka <shinyak@chromium.org> 2 17 -
trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
r139967 r140098 315 315 } 316 316 317 // FIXME: don't ignore the winding rule. https://bugs.webkit.org/show_bug.cgi?id=106872 318 void GraphicsContext::clip(const Path& path, WindRule) 317 void GraphicsContext::clip(const Path& path, WindRule clipRule) 319 318 { 320 319 if (paintingDisabled() || path.isEmpty()) 321 320 return; 322 321 323 platformContext()->clipPath(*path.platformPath(), PlatformContextSkia::AntiAliased);322 clipPath(path, clipRule); 324 323 } 325 324 … … 339 338 } 340 339 341 // FIXME: don't ignore the winding rule. https://bugs.webkit.org/show_bug.cgi?id=106872 342 void GraphicsContext::canvasClip(const Path& path, WindRule) 343 { 344 if (paintingDisabled()) 345 return; 346 347 platformContext()->clipPath(path.isNull() ? SkPath() : *path.platformPath()); 340 void GraphicsContext::canvasClip(const Path& pathToClip, WindRule clipRule) 341 { 342 if (paintingDisabled()) 343 return; 344 345 const SkPath* path = pathToClip.platformPath(); 346 SkPath::FillType ftype = (clipRule == RULE_EVENODD) ? SkPath::kEvenOdd_FillType : SkPath::kWinding_FillType; 347 SkPath storage; 348 349 if (path && (path->getFillType() != ftype)) { 350 storage = *path; 351 storage.setFillType(ftype); 352 path = &storage; 353 } 354 355 platformContext()->clipPath(path ? *path : SkPath()); 348 356 } 349 357
Note: See TracChangeset
for help on using the changeset viewer.