| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrGLSL_DEFINED | 8 #ifndef GrGLSL_DEFINED |
| 9 #define GrGLSL_DEFINED | 9 #define GrGLSL_DEFINED |
| 10 | 10 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } else { | 128 } else { |
| 129 fType = kFullExpr_ExprType; | 129 fType = kFullExpr_ExprType; |
| 130 fExpr.appendf(Self::CastIntStr(), v); | 130 fExpr.appendf(Self::CastIntStr(), v); |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 | 133 |
| 134 /** Constructs an expression from a string. | 134 /** Constructs an expression from a string. |
| 135 * Argument expr is a simple expression or a parenthesized expression. */ | 135 * Argument expr is a simple expression or a parenthesized expression. */ |
| 136 // TODO: make explicit once effects input Exprs. | 136 // TODO: make explicit once effects input Exprs. |
| 137 GrGLSLExpr(const char expr[]) { | 137 GrGLSLExpr(const char expr[]) { |
| 138 if (NULL == expr) { // TODO: remove this once effects input Exprs. | 138 if (nullptr == expr) { // TODO: remove this once effects input Exprs. |
| 139 fType = kOnes_ExprType; | 139 fType = kOnes_ExprType; |
| 140 } else { | 140 } else { |
| 141 fType = kFullExpr_ExprType; | 141 fType = kFullExpr_ExprType; |
| 142 fExpr = expr; | 142 fExpr = expr; |
| 143 } | 143 } |
| 144 SkASSERT(this->isValid()); | 144 SkASSERT(this->isValid()); |
| 145 } | 145 } |
| 146 | 146 |
| 147 /** Constructs an expression from a string. | 147 /** Constructs an expression from a string. |
| 148 * Argument expr is a simple expression or a parenthesized expression. */ | 148 * Argument expr is a simple expression or a parenthesized expression. */ |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 317 |
| 318 /** | 318 /** |
| 319 * Does an inplace mul, *=, of vec4VarName by mulFactor. | 319 * Does an inplace mul, *=, of vec4VarName by mulFactor. |
| 320 * A semicolon is added after the assignment. | 320 * A semicolon is added after the assignment. |
| 321 */ | 321 */ |
| 322 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); | 322 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); |
| 323 | 323 |
| 324 #include "GrGLSL_impl.h" | 324 #include "GrGLSL_impl.h" |
| 325 | 325 |
| 326 #endif | 326 #endif |
| OLD | NEW |