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

Side by Side Diff: src/sksl/SkSLIRGenerator.cpp

Issue 2300023002: minor SkSL changes to avoid compiler errors in Chromium (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « src/sksl/SkSLGLSLCodeGenerator.cpp ('k') | src/sksl/SkSLParser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 #include "SkSLIRGenerator.h" 8 #include "SkSLIRGenerator.h"
9 9
10 #include "limits.h" 10 #include "limits.h"
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 std::shared_ptr<SymbolTable> old = fSymbolTable; 480 std::shared_ptr<SymbolTable> old = fSymbolTable;
481 AutoSymbolTable table(this); 481 AutoSymbolTable table(this);
482 Modifiers mods = this->convertModifiers(intf.fModifiers); 482 Modifiers mods = this->convertModifiers(intf.fModifiers);
483 std::vector<Type::Field> fields; 483 std::vector<Type::Field> fields;
484 for (size_t i = 0; i < intf.fDeclarations.size(); i++) { 484 for (size_t i = 0; i < intf.fDeclarations.size(); i++) {
485 std::unique_ptr<VarDeclaration> decl = this->convertVarDeclaration( 485 std::unique_ptr<VarDeclaration> decl = this->convertVarDeclaration(
486 *intf.f Declarations[i], 486 *intf.f Declarations[i],
487 Variabl e::kGlobal_Storage); 487 Variabl e::kGlobal_Storage);
488 for (size_t j = 0; j < decl->fVars.size(); j++) { 488 for (size_t j = 0; j < decl->fVars.size(); j++) {
489 fields.push_back(Type::Field(decl->fVars[j]->fModifiers, decl->fVars [j]->fName, 489 fields.push_back(Type::Field(decl->fVars[j]->fModifiers, decl->fVars [j]->fName,
490 decl->fVars[j]->fType)); 490 &decl->fVars[j]->fType));
491 if (decl->fValues[j]) { 491 if (decl->fValues[j]) {
492 fErrors.error(decl->fPosition, 492 fErrors.error(decl->fPosition,
493 "initializers are not permitted on interface block fields"); 493 "initializers are not permitted on interface block fields");
494 } 494 }
495 if (decl->fVars[j]->fModifiers.fFlags & (Modifiers::kIn_Flag | 495 if (decl->fVars[j]->fModifiers.fFlags & (Modifiers::kIn_Flag |
496 Modifiers::kOut_Flag | 496 Modifiers::kOut_Flag |
497 Modifiers::kUniform_Flag | 497 Modifiers::kUniform_Flag |
498 Modifiers::kConst_Flag)) { 498 Modifiers::kConst_Flag)) {
499 fErrors.error(decl->fPosition, 499 fErrors.error(decl->fPosition,
500 "interface block fields may not have storage quali fiers"); 500 "interface block fields may not have storage quali fiers");
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 case Expression::kIndex_Kind: 1258 case Expression::kIndex_Kind:
1259 this->markWrittenTo(*((IndexExpression&) expr).fBase); 1259 this->markWrittenTo(*((IndexExpression&) expr).fBase);
1260 break; 1260 break;
1261 default: 1261 default:
1262 fErrors.error(expr.fPosition, "cannot assign to '" + expr.descriptio n() + "'"); 1262 fErrors.error(expr.fPosition, "cannot assign to '" + expr.descriptio n() + "'");
1263 break; 1263 break;
1264 } 1264 }
1265 } 1265 }
1266 1266
1267 } 1267 }
OLDNEW
« no previous file with comments | « src/sksl/SkSLGLSLCodeGenerator.cpp ('k') | src/sksl/SkSLParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698