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

Side by Side Diff: include/gpu/GrEffectStage.h

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 | « include/gpu/GrDrawEffect.h ('k') | include/gpu/GrGpuResource.h » ('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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 25 matching lines...) Expand all
36 if (other.fCoordChangeMatrixSet) { 36 if (other.fCoordChangeMatrixSet) {
37 fCoordChangeMatrix = other.fCoordChangeMatrix; 37 fCoordChangeMatrix = other.fCoordChangeMatrix;
38 } 38 }
39 fEffect.reset(SkRef(other.fEffect.get())); 39 fEffect.reset(SkRef(other.fEffect.get()));
40 memcpy(fVertexAttribIndices, other.fVertexAttribIndices, sizeof(fVertexA ttribIndices)); 40 memcpy(fVertexAttribIndices, other.fVertexAttribIndices, sizeof(fVertexA ttribIndices));
41 return *this; 41 return *this;
42 } 42 }
43 43
44 static bool AreCompatible(const GrEffectStage& a, const GrEffectStage& b, 44 static bool AreCompatible(const GrEffectStage& a, const GrEffectStage& b,
45 bool usingExplicitLocalCoords) { 45 bool usingExplicitLocalCoords) {
46 SkASSERT(NULL != a.fEffect.get()); 46 SkASSERT(a.fEffect.get());
47 SkASSERT(NULL != b.fEffect.get()); 47 SkASSERT(b.fEffect.get());
48 48
49 if (!a.getEffect()->isEqual(*b.getEffect())) { 49 if (!a.getEffect()->isEqual(*b.getEffect())) {
50 return false; 50 return false;
51 } 51 }
52 52
53 // We always track the coord change matrix, but it has no effect when ex plicit local coords 53 // We always track the coord change matrix, but it has no effect when ex plicit local coords
54 // are used. 54 // are used.
55 if (usingExplicitLocalCoords) { 55 if (usingExplicitLocalCoords) {
56 return true; 56 return true;
57 } 57 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 int getVertexAttribIndexCount() const { return fEffect->numVertexAttribs(); } 137 int getVertexAttribIndexCount() const { return fEffect->numVertexAttribs(); }
138 138
139 private: 139 private:
140 bool fCoordChangeMatrixSet; 140 bool fCoordChangeMatrixSet;
141 SkMatrix fCoordChangeMatrix; 141 SkMatrix fCoordChangeMatrix;
142 SkAutoTUnref<const GrEffect> fEffect; 142 SkAutoTUnref<const GrEffect> fEffect;
143 int fVertexAttribIndices[2]; 143 int fVertexAttribIndices[2];
144 }; 144 };
145 145
146 #endif 146 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrDrawEffect.h ('k') | include/gpu/GrGpuResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698