Chromium Code Reviews| 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; |