Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp

Issue 1844223002: Literal AtomicString construction can rely on strlen optimization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 21 matching lines...) Expand all
32 #include "platform/graphics/filters/SourceGraphic.h" 32 #include "platform/graphics/filters/SourceGraphic.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 namespace { 36 namespace {
37 37
38 class FilterInputKeywords { 38 class FilterInputKeywords {
39 public: 39 public:
40 static const AtomicString& getSourceGraphic() 40 static const AtomicString& getSourceGraphic()
41 { 41 {
42 DEFINE_STATIC_LOCAL(const AtomicString, s_sourceGraphicName, ("SourceGra phic", AtomicString::ConstructFromLiteral)); 42 DEFINE_STATIC_LOCAL(const AtomicString, s_sourceGraphicName, ("SourceGra phic"));
43 return s_sourceGraphicName; 43 return s_sourceGraphicName;
44 } 44 }
45 45
46 static const AtomicString& sourceAlpha() 46 static const AtomicString& sourceAlpha()
47 { 47 {
48 DEFINE_STATIC_LOCAL(const AtomicString, s_sourceAlphaName, ("SourceAlpha ", AtomicString::ConstructFromLiteral)); 48 DEFINE_STATIC_LOCAL(const AtomicString, s_sourceAlphaName, ("SourceAlpha "));
49 return s_sourceAlphaName; 49 return s_sourceAlphaName;
50 } 50 }
51 51
52 static const AtomicString& fillPaint() 52 static const AtomicString& fillPaint()
53 { 53 {
54 DEFINE_STATIC_LOCAL(const AtomicString, s_fillPaintName, ("FillPaint", A tomicString::ConstructFromLiteral)); 54 DEFINE_STATIC_LOCAL(const AtomicString, s_fillPaintName, ("FillPaint"));
55 return s_fillPaintName; 55 return s_fillPaintName;
56 } 56 }
57 57
58 static const AtomicString& strokePaint() 58 static const AtomicString& strokePaint()
59 { 59 {
60 DEFINE_STATIC_LOCAL(const AtomicString, s_strokePaintName, ("StrokePaint ", AtomicString::ConstructFromLiteral)); 60 DEFINE_STATIC_LOCAL(const AtomicString, s_strokePaintName, ("StrokePaint "));
61 return s_strokePaintName; 61 return s_strokePaintName;
62 } 62 }
63 }; 63 };
64 64
65 } // namespace 65 } // namespace
66 66
67 void SVGFilterGraphNodeMap::addBuiltinEffect(FilterEffect* effect) 67 void SVGFilterGraphNodeMap::addBuiltinEffect(FilterEffect* effect)
68 { 68 {
69 m_effectReferences.add(effect, FilterEffectSet()); 69 m_effectReferences.add(effect, FilterEffectSet());
70 } 70 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 return namedEffect; 209 return namedEffect;
210 } 210 }
211 211
212 if (m_lastEffect) 212 if (m_lastEffect)
213 return m_lastEffect.get(); 213 return m_lastEffect.get();
214 214
215 return m_builtinEffects.get(FilterInputKeywords::getSourceGraphic()); 215 return m_builtinEffects.get(FilterInputKeywords::getSourceGraphic());
216 } 216 }
217 217
218 } // namespace blink 218 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698