WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 144033
Convert OwnPtr to std::unique_ptr in GraphicsContextCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=144033
Summary
Convert OwnPtr to std::unique_ptr in GraphicsContextCairo.cpp
Jinwoo Song
Reported
2015-04-21 19:37:25 PDT
Convert OwnPtr to std::unique_ptr in GraphicsContextCairo.cpp
Attachments
Patch
(3.97 KB, patch)
2015-04-21 19:41 PDT
,
Jinwoo Song
no flags
Details
Formatted Diff
Diff
Patch
(4.00 KB, patch)
2015-04-22 20:55 PDT
,
Jinwoo Song
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Jinwoo Song
Comment 1
2015-04-21 19:41:16 PDT
Created
attachment 251296
[details]
Patch
Darin Adler
Comment 2
2015-04-22 09:13:22 PDT
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.
Jinwoo Song
Comment 3
2015-04-22 20:54:41 PDT
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.
Jinwoo Song
Comment 4
2015-04-22 20:55:55 PDT
Created
attachment 251400
[details]
Patch Applied Darin's comment.
WebKit Commit Bot
Comment 5
2015-04-22 22:27:39 PDT
Comment on
attachment 251400
[details]
Patch Clearing flags on attachment: 251400 Committed
r183170
: <
http://trac.webkit.org/changeset/183170
>
WebKit Commit Bot
Comment 6
2015-04-22 22:27:42 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug