OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 #ifndef GrPaint_DEFINED | 10 #ifndef GrPaint_DEFINED |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 GrPaint& operator=(const GrPaint& paint) { | 119 GrPaint& operator=(const GrPaint& paint) { |
120 fAntiAlias = paint.fAntiAlias; | 120 fAntiAlias = paint.fAntiAlias; |
121 fDither = paint.fDither; | 121 fDither = paint.fDither; |
122 | 122 |
123 fColor = paint.fColor; | 123 fColor = paint.fColor; |
124 | 124 |
125 fColorStages = paint.fColorStages; | 125 fColorStages = paint.fColorStages; |
126 fCoverageStages = paint.fCoverageStages; | 126 fCoverageStages = paint.fCoverageStages; |
127 | 127 |
128 fXPFactory.reset(SkRef(paint.getXPFactory())); | 128 fXPFactory.reset(SkRef(paint.getXPFactory())); |
129 fProcDataManager.reset(SkNEW_ARGS(GrProcessorDataManager, (*paint.proces
sorDataManager()))); | 129 fProcDataManager.reset(new GrProcessorDataManager(*paint.processorDataMa
nager())); |
130 | 130 |
131 return *this; | 131 return *this; |
132 } | 132 } |
133 | 133 |
134 /** | 134 /** |
135 * Returns true if the paint's output color will be constant after blending.
If the result is | 135 * Returns true if the paint's output color will be constant after blending.
If the result is |
136 * true, constantColor will be updated to contain the constant color. Note t
hat we can conflate | 136 * true, constantColor will be updated to contain the constant color. Note t
hat we can conflate |
137 * coverage and color, so the actual values written to pixels with partial c
overage may still | 137 * coverage and color, so the actual values written to pixels with partial c
overage may still |
138 * not seem constant, even if this function returns true. | 138 * not seem constant, even if this function returns true. |
139 */ | 139 */ |
140 bool isConstantBlendedColor(GrColor* constantColor) const; | 140 bool isConstantBlendedColor(GrColor* constantColor) const; |
141 | 141 |
142 GrProcessorDataManager* getProcessorDataManager() { return fProcDataManager.
get(); } | 142 GrProcessorDataManager* getProcessorDataManager() { return fProcDataManager.
get(); } |
143 | 143 |
144 const GrProcessorDataManager* processorDataManager() const { return fProcDat
aManager.get(); } | 144 const GrProcessorDataManager* processorDataManager() const { return fProcDat
aManager.get(); } |
145 | 145 |
146 private: | 146 private: |
147 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; | 147 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; |
148 SkSTArray<4, GrFragmentStage> fColorStages; | 148 SkSTArray<4, GrFragmentStage> fColorStages; |
149 SkSTArray<2, GrFragmentStage> fCoverageStages; | 149 SkSTArray<2, GrFragmentStage> fCoverageStages; |
150 | 150 |
151 bool fAntiAlias; | 151 bool fAntiAlias; |
152 bool fDither; | 152 bool fDither; |
153 | 153 |
154 GrColor fColor; | 154 GrColor fColor; |
155 SkAutoTUnref<GrProcessorDataManager> fProcDataManager; | 155 SkAutoTUnref<GrProcessorDataManager> fProcDataManager; |
156 }; | 156 }; |
157 | 157 |
158 #endif | 158 #endif |
OLD | NEW |