From 93ba0a4fc85f04bc1be9429983df1e57473b49a7 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Mon, 14 Aug 2017 14:48:10 -0400 Subject: Switch SkSL to std::string On desktop, this saves just over 5% of the time in the SkSL compiler. As written, the code will now build either way, so it's much easier to switch back (or even have some platforms use SkString, if that's ever required). Bug: skia: Change-Id: I634f26a4f6fcb404e59bda6a5c6a21a9c6d73c0b Reviewed-on: https://skia-review.googlesource.com/34381 Reviewed-by: Brian Osman Commit-Queue: Brian Osman --- tests/SkSLGLSLTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/SkSLGLSLTest.cpp') diff --git a/tests/SkSLGLSLTest.cpp b/tests/SkSLGLSLTest.cpp index c1bf2bbbce..a7f6740442 100644 --- a/tests/SkSLGLSLTest.cpp +++ b/tests/SkSLGLSLTest.cpp @@ -23,7 +23,8 @@ static void test(skiatest::Reporter* r, const char* src, const SkSL::Program::Se SkSL::Program::Kind kind = SkSL::Program::kFragment_Kind) { SkSL::Compiler compiler; SkSL::String output; - std::unique_ptr program = compiler.convertProgram(kind, SkString(src), settings); + std::unique_ptr program = compiler.convertProgram(kind, SkSL::String(src), + settings); if (!program) { SkDebugf("Unexpected error compiling %s\n%s", src, compiler.errorText().c_str()); } -- cgit v1.2.3