| Summary: | Convert OwnPtr to std::unique_ptr in GraphicsContextCairo.cpp | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jinwoo Song <jinwoo7.song> | ||||||
| Component: | New Bugs | Assignee: | Jinwoo Song <jinwoo7.song> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | commit-queue | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 128007 | ||||||||
| Attachments: |
|
||||||||
|
Description
Jinwoo Song
2015-04-21 19:37:25 PDT
Created attachment 251296 [details]
Patch
Comment on attachment 251296 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251296&action=review > Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:961 > + std::unique_ptr<cairo_path_t, void(*)(cairo_path_t*)> pathCopy(cairo_copy_path(path.platformPath()->context()), [](cairo_path_t* path) { > + cairo_path_destroy(path); > + }); > cairo_append_path(cr, pathCopy.get()); In this three-line sequence, I don’t see the benefit of using unique_ptr rather than just using cairo_path_destroy in a normal way. Comment on attachment 251296 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251296&action=review >> Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:961 >> cairo_append_path(cr, pathCopy.get()); > > In this three-line sequence, I don’t see the benefit of using unique_ptr rather than just using cairo_path_destroy in a normal way. You're definitely right! I'll update the patch as your recommendation. Created attachment 251400 [details]
Patch
Applied Darin's comment.
Comment on attachment 251400 [details] Patch Clearing flags on attachment: 251400 Committed r183170: <http://trac.webkit.org/changeset/183170> All reviewed patches have been landed. Closing bug. |