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

Unified Diff: cc/CCFontAtlas.cpp

Issue 10900021: Use std::string instead of WTF::String / TextStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « cc/CCFontAtlas.h ('k') | cc/CCHeadsUpDisplayLayerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCFontAtlas.cpp
diff --git a/cc/CCFontAtlas.cpp b/cc/CCFontAtlas.cpp
index 44695e1285f3166905004f56735da821405f4032..eadc860898a8430adb76c142e3f40f4f7e5db483 100644
--- a/cc/CCFontAtlas.cpp
+++ b/cc/CCFontAtlas.cpp
@@ -7,8 +7,10 @@
#if USE(ACCELERATED_COMPOSITING)
#include "CCFontAtlas.h"
+#include "base/string_split.h"
#include "CCProxy.h"
#include "SkCanvas.h"
+#include <vector>
namespace WebCore {
@@ -26,12 +28,12 @@ CCFontAtlas::~CCFontAtlas()
{
}
-void CCFontAtlas::drawText(SkCanvas* canvas, const SkPaint& paint, const String& text, const IntPoint& destPosition, const IntSize& clip) const
+void CCFontAtlas::drawText(SkCanvas* canvas, const SkPaint& paint, const std::string& text, const IntPoint& destPosition, const IntSize& clip) const
{
ASSERT(CCProxy::isImplThread());
- Vector<String> lines;
- text.split('\n', lines);
+ std::vector<std::string> lines;
+ base::SplitString(text, '\n', &lines);
IntPoint position = destPosition;
for (size_t i = 0; i < lines.size(); ++i) {
@@ -42,7 +44,7 @@ void CCFontAtlas::drawText(SkCanvas* canvas, const SkPaint& paint, const String&
}
}
-void CCFontAtlas::drawOneLineOfTextInternal(SkCanvas* canvas, const SkPaint& paint, const String& textLine, const IntPoint& destPosition) const
+void CCFontAtlas::drawOneLineOfTextInternal(SkCanvas* canvas, const SkPaint& paint, const std::string& textLine, const IntPoint& destPosition) const
{
ASSERT(CCProxy::isImplThread());
« no previous file with comments | « cc/CCFontAtlas.h ('k') | cc/CCHeadsUpDisplayLayerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698