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

Unified Diff: third_party/WebKit/Source/platform/graphics/Color.h

Issue 2100573002: Avoid copying strings when parsing CSS colors on the slow path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing else. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/Color.h
diff --git a/third_party/WebKit/Source/platform/graphics/Color.h b/third_party/WebKit/Source/platform/graphics/Color.h
index 681000ace876648888670752e0a358e47ee66b09..dc79b9bebb583780e871951757062217027561db 100644
--- a/third_party/WebKit/Source/platform/graphics/Color.h
+++ b/third_party/WebKit/Source/platform/graphics/Color.h
@@ -29,6 +29,7 @@
#include "platform/animation/AnimationUtilities.h"
#include "wtf/Allocator.h"
#include "wtf/Forward.h"
+#include "wtf/text/StringView.h"
#include "wtf/text/Unicode.h"
namespace blink {
@@ -122,7 +123,7 @@ public:
Color blend(const Color&) const;
Color blendWithWhite() const;
- static bool parseHexColor(const String&, RGBA32&);
+ static bool parseHexColor(const StringView&, RGBA32&);
static bool parseHexColor(const LChar*, unsigned, RGBA32&);
static bool parseHexColor(const UChar*, unsigned, RGBA32&);

Powered by Google App Engine
This is Rietveld 408576698