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

Unified Diff: cc/ProgramBinding.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
Index: cc/ProgramBinding.cpp
diff --git a/cc/ProgramBinding.cpp b/cc/ProgramBinding.cpp
index e61bf78d5d4559ff07780b1d3d1b80bf2633be2f..0325397e8eccfedaff8b494ca8dc70e4eedef5ed 100644
--- a/cc/ProgramBinding.cpp
+++ b/cc/ProgramBinding.cpp
@@ -13,7 +13,6 @@
#include "GraphicsContext3D.h"
#include "TraceEvent.h"
#include <public/WebGraphicsContext3D.h>
-#include <wtf/text/CString.h>
using WebKit::WebGraphicsContext3D;
@@ -42,7 +41,7 @@ static bool contextLost(WebGraphicsContext3D* context)
}
-void ProgramBindingBase::init(WebGraphicsContext3D* context, const String& vertexShader, const String& fragmentShader)
+void ProgramBindingBase::init(WebGraphicsContext3D* context, const std::string& vertexShader, const std::string& fragmentShader)
{
TRACE_EVENT0("cc", "ProgramBindingBase::init");
m_vertexShaderId = loadShader(context, GraphicsContext3D::VERTEX_SHADER, vertexShader);
@@ -94,13 +93,13 @@ void ProgramBindingBase::cleanup(WebGraphicsContext3D* context)
cleanupShaders(context);
}
-unsigned ProgramBindingBase::loadShader(WebGraphicsContext3D* context, unsigned type, const String& shaderSource)
+unsigned ProgramBindingBase::loadShader(WebGraphicsContext3D* context, unsigned type, const std::string& shaderSource)
{
unsigned shader = context->createShader(type);
if (!shader)
return 0;
- String sourceString(shaderSource);
- GLC(context, context->shaderSource(shader, sourceString.utf8().data()));
+ std::string sourceString(shaderSource);
enne (OOO) 2012/09/10 03:43:42 No need for this extra copy here. std::string dat
+ GLC(context, context->shaderSource(shader, sourceString.data()));
GLC(context, context->compileShader(shader));
#ifndef NDEBUG
int compiled = 0;
« cc/CCLayerImpl.h ('K') | « cc/ProgramBinding.h ('k') | cc/RenderSurfaceChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698