Changeset 187621 in webkit
- Timestamp:
- Jul 30, 2015, 4:41:54 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r187620 r187621 1 2015-07-30 Simon Fraser <simon.fraser@apple.com> 2 3 Make Path::apply() take a function reference 4 https://bugs.webkit.org/show_bug.cgi?id=147472 5 6 Reviewed by Anders Carlsson. 7 8 Path::apply() should take a const reference to a std::function. 9 10 * platform/graphics/Path.h: 11 * platform/graphics/cairo/PathCairo.cpp: 12 * platform/graphics/cg/PathCG.cpp: 13 (WebCore::CGPathApplierToPathApplier): 14 (WebCore::Path::apply): 15 1 16 2015-07-30 Anders Carlsson <andersca@apple.com> 2 17 -
trunk/Source/WebCore/platform/graphics/Path.h
r187597 r187621 156 156 WEBCORE_EXPORT PlatformPathPtr ensurePlatformPath(); 157 157 158 WEBCORE_EXPORT void apply( PathApplierFunction) const;158 WEBCORE_EXPORT void apply(const PathApplierFunction&) const; 159 159 void transform(const AffineTransform&); 160 160 -
trunk/Source/WebCore/platform/graphics/cairo/PathCairo.cpp
r187597 r187621 391 391 } 392 392 393 void Path::apply( PathApplierFunctionfunction) const393 void Path::apply(const PathApplierFunction& function) const 394 394 { 395 395 if (isNull()) -
trunk/Source/WebCore/platform/graphics/cg/PathCG.cpp
r187597 r187621 376 376 } 377 377 378 static void CGPathApplierToPathApplier(void *info, const CGPathElement* element)379 { 380 PathApplierFunctionfunction = *(PathApplierFunction*)info;378 static void CGPathApplierToPathApplier(void* info, const CGPathElement* element) 379 { 380 const PathApplierFunction& function = *(PathApplierFunction*)info; 381 381 FloatPoint points[3]; 382 382 PathElement pelement; … … 404 404 } 405 405 406 void Path::apply( PathApplierFunctionfunction) const407 { 408 if (isNull()) 409 return; 410 411 CGPathApply(m_path, &function, CGPathApplierToPathApplier);406 void Path::apply(const PathApplierFunction& function) const 407 { 408 if (isNull()) 409 return; 410 411 CGPathApply(m_path, (void*)&function, CGPathApplierToPathApplier); 412 412 } 413 413
Note:
See TracChangeset
for help on using the changeset viewer.