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

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
« no previous file with comments | « cc/ProgramBinding.h ('k') | cc/RenderSurfaceChromium.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ProgramBinding.cpp
diff --git a/cc/ProgramBinding.cpp b/cc/ProgramBinding.cpp
index e61bf78d5d4559ff07780b1d3d1b80bf2633be2f..1c175b939a565742c364c498ff7998f1eb49f720 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,12 @@ 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()));
+ GLC(context, context->shaderSource(shader, shaderSource.data()));
GLC(context, context->compileShader(shader));
#ifndef NDEBUG
int compiled = 0;
« no previous file with comments | « cc/ProgramBinding.h ('k') | cc/RenderSurfaceChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698