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

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

Issue 372773002: Remove use of GrEffectRef from draw state and below. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « include/gpu/GrDrawEffect.h ('k') | src/core/SkXfermode.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 /* 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 27 matching lines...) Expand all
38 } 38 }
39 fEffectRef.reset(SkRef(other.fEffectRef.get())); 39 fEffectRef.reset(SkRef(other.fEffectRef.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 bool operator== (const GrEffectStage& other) const { 44 bool operator== (const GrEffectStage& other) const {
45 SkASSERT(NULL != fEffectRef.get()); 45 SkASSERT(NULL != fEffectRef.get());
46 SkASSERT(NULL != other.fEffectRef.get()); 46 SkASSERT(NULL != other.fEffectRef.get());
47 47
48 if (!(*this->getEffect())->isEqual(*other.getEffect())) { 48 if (!this->getEffect()->isEqual(*other.getEffect())) {
49 return false; 49 return false;
50 } 50 }
51 51
52 if (fCoordChangeMatrixSet != other.fCoordChangeMatrixSet) { 52 if (fCoordChangeMatrixSet != other.fCoordChangeMatrixSet) {
53 return false; 53 return false;
54 } 54 }
55 55
56 if (!fCoordChangeMatrixSet) { 56 if (!fCoordChangeMatrixSet) {
57 return true; 57 return true;
58 } 58 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 * installed in the stage. 119 * installed in the stage.
120 */ 120 */
121 const SkMatrix& getCoordChangeMatrix() const { 121 const SkMatrix& getCoordChangeMatrix() const {
122 if (fCoordChangeMatrixSet) { 122 if (fCoordChangeMatrixSet) {
123 return fCoordChangeMatrix; 123 return fCoordChangeMatrix;
124 } else { 124 } else {
125 return SkMatrix::I(); 125 return SkMatrix::I();
126 } 126 }
127 } 127 }
128 128
129 const GrEffectRef* getEffect() const { return fEffectRef.get(); } 129 const GrEffect* getEffect() const { return fEffectRef.get()->get(); }
130 130
131 const int* getVertexAttribIndices() const { return fVertexAttribIndices; } 131 const int* getVertexAttribIndices() const { return fVertexAttribIndices; }
132 int getVertexAttribIndexCount() const { return fEffectRef->get()->numVertexA ttribs(); } 132 int getVertexAttribIndexCount() const { return fEffectRef->get()->numVertexA ttribs(); }
133 133
134 private: 134 private:
135 bool fCoordChangeMatrixSet; 135 bool fCoordChangeMatrixSet;
136 SkMatrix fCoordChangeMatrix; 136 SkMatrix fCoordChangeMatrix;
137 SkAutoTUnref<const GrEffectRef> fEffectRef; 137 SkAutoTUnref<const GrEffectRef> fEffectRef;
138 int fVertexAttribIndices[2]; 138 int fVertexAttribIndices[2];
139 }; 139 };
140 140
141 #endif 141 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrDrawEffect.h ('k') | src/core/SkXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698