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

Side by Side Diff: src/gpu/GrRODrawState.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 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/gpu/GrRODrawState.h ('k') | src/gpu/GrRecordReplaceDraw.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 2014 Google Inc. 2 * Copyright 2014 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 "GrRODrawState.h" 8 #include "GrRODrawState.h"
9 #include "GrDrawTargetCaps.h" 9 #include "GrDrawTargetCaps.h"
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 bool GrRODrawState::validateVertexAttribs() const { 75 bool GrRODrawState::validateVertexAttribs() const {
76 // check consistency of effects and attributes 76 // check consistency of effects and attributes
77 GrSLType slTypes[kMaxVertexAttribCnt]; 77 GrSLType slTypes[kMaxVertexAttribCnt];
78 for (int i = 0; i < kMaxVertexAttribCnt; ++i) { 78 for (int i = 0; i < kMaxVertexAttribCnt; ++i) {
79 slTypes[i] = static_cast<GrSLType>(-1); 79 slTypes[i] = static_cast<GrSLType>(-1);
80 } 80 }
81 81
82 if (this->hasGeometryProcessor()) { 82 if (this->hasGeometryProcessor()) {
83 const GrEffectStage& stage = *this->getGeometryProcessor(); 83 const GrEffectStage& stage = *this->getGeometryProcessor();
84 const GrEffect* effect = stage.getEffect(); 84 const GrEffect* effect = stage.getEffect();
85 SkASSERT(NULL != effect); 85 SkASSERT(effect);
86 // make sure that any attribute indices have the correct binding type, t hat the attrib 86 // make sure that any attribute indices have the correct binding type, t hat the attrib
87 // type and effect's shader lang type are compatible, and that attribute s shared by 87 // type and effect's shader lang type are compatible, and that attribute s shared by
88 // multiple effects use the same shader lang type. 88 // multiple effects use the same shader lang type.
89 const int* attributeIndices = stage.getVertexAttribIndices(); 89 const int* attributeIndices = stage.getVertexAttribIndices();
90 int numAttributes = stage.getVertexAttribIndexCount(); 90 int numAttributes = stage.getVertexAttribIndexCount();
91 for (int i = 0; i < numAttributes; ++i) { 91 for (int i = 0; i < numAttributes; ++i) {
92 int attribIndex = attributeIndices[i]; 92 int attribIndex = attributeIndices[i];
93 if (attribIndex >= fVACount || 93 if (attribIndex >= fVACount ||
94 kEffect_GrVertexAttribBinding != fVAPtr[attribIndex].fBinding) { 94 kEffect_GrVertexAttribBinding != fVAPtr[attribIndex].fBinding) {
95 return false; 95 return false;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 find that only 1, ISA, and ISC produce the correct destination when applied to S' and D. 177 find that only 1, ISA, and ISC produce the correct destination when applied to S' and D.
178 Also, if we're directly rendering coverage (isCoverageDrawing) then coverag e is treated as 178 Also, if we're directly rendering coverage (isCoverageDrawing) then coverag e is treated as
179 color by definition. 179 color by definition.
180 */ 180 */
181 return kOne_GrBlendCoeff == fDstBlend || 181 return kOne_GrBlendCoeff == fDstBlend ||
182 kISA_GrBlendCoeff == fDstBlend || 182 kISA_GrBlendCoeff == fDstBlend ||
183 kISC_GrBlendCoeff == fDstBlend || 183 kISC_GrBlendCoeff == fDstBlend ||
184 this->isCoverageDrawing(); 184 this->isCoverageDrawing();
185 } 185 }
186 186
OLDNEW
« no previous file with comments | « src/gpu/GrRODrawState.h ('k') | src/gpu/GrRecordReplaceDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698