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

Unified Diff: src/sksl/ir/SkSLSwizzle.h

Issue 2131223002: SkSL performance improvements (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: fixed windows build error Created 4 years, 5 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: src/sksl/ir/SkSLSwizzle.h
diff --git a/src/sksl/ir/SkSLSwizzle.h b/src/sksl/ir/SkSLSwizzle.h
index ce360d18471c88546990d8042fc731d37fd36bcb..4b4750faa5050f39a1675b8687cedf234e812543 100644
--- a/src/sksl/ir/SkSLSwizzle.h
+++ b/src/sksl/ir/SkSLSwizzle.h
@@ -18,9 +18,8 @@ namespace SkSL {
* instance, swizzling a vec3 with two components will result in a vec2. It is possible to swizzle
* with more components than the source vector, as in 'vec2(1).xxxx'.
*/
-static std::shared_ptr<Type> get_type(Expression& value,
- size_t count) {
- std::shared_ptr<Type> base = value.fType->componentType();
+static const Type& get_type(Expression& value, size_t count) {
+ const Type& base = value.fType.componentType();
if (count == 1) {
return base;
}

Powered by Google App Engine
This is Rietveld 408576698