Summary: | Avoid calling String::format() in PlatformCAFilters::setFiltersOnLayer() | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> | ||||||||
Component: | Animations | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, dino, sam, simon.fraser, thorton, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 30342 | ||||||||||
Attachments: |
|
Description
Said Abou-Hallawa
2017-09-15 16:53:00 PDT
Created attachment 320969 [details]
Patch
Comment on attachment 320969 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320969&action=review > Source/WebCore/ChangeLog:8 > + String::fromat() is a bigger hammer for what we need to do in this function. FROMAT > Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:71 > + static NeverDestroyed<String> filterNamePrefix ="filter_"; There's a missing space after the =. Also isn't there a way to make this more efficient b/c it comes from a literal (something like ASCIILiteral? or does that just happen magically? I don't know. Look around.) Created attachment 320976 [details]
Patch
Created attachment 320984 [details]
Patch
Comment on attachment 320984 [details] Patch Clearing flags on attachment: 320984 Committed r222125: <http://trac.webkit.org/changeset/222125> All reviewed patches have been landed. Closing bug. Comment on attachment 320984 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320984&action=review > Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:74 > + String filterName = filterNamePrefix.get() + String::number(i); For the future, this could be make more efficient by doing: #include <wtf/text/StringConcatenate.h> #include <wtf/text/StringConcatenateNumbers.h> auto filterName = makeString("filter_", i); |