OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
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 #include "SkDrawGradient.h" | 10 #include "SkDrawGradient.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 void SkDrawLinearGradient::dump(SkAnimateMaker* maker) { | 168 void SkDrawLinearGradient::dump(SkAnimateMaker* maker) { |
169 dumpBase(maker); | 169 dumpBase(maker); |
170 dumpRest(maker); | 170 dumpRest(maker); |
171 } | 171 } |
172 #endif | 172 #endif |
173 | 173 |
174 SkShader* SkDrawLinearGradient::getShader() { | 174 SkShader* SkDrawLinearGradient::getShader() { |
175 if (addPrelude() == 0 || points.count() != 4) | 175 if (addPrelude() == 0 || points.count() != 4) |
176 return NULL; | 176 return NULL; |
177 SkShader* shader = SkGradientShader::CreateLinear((SkPoint*)points.begin(), | 177 SkShader* shader = SkGradientShader::CreateLinear((SkPoint*)points.begin(), |
178 fColors.begin(), offsets.begin(), fColors.count(), (SkShader::TileMode)
tileMode, fUnitMapper); | 178 fColors.begin(), offsets.begin(), fColors.count(), (SkShader::TileMode)
tileMode, |
| 179 fUnitMapper, 0, getMatrix()); |
179 SkAutoTDelete<SkShader> autoDel(shader); | 180 SkAutoTDelete<SkShader> autoDel(shader); |
180 addPostlude(shader); | |
181 (void)autoDel.detach(); | 181 (void)autoDel.detach(); |
182 return shader; | 182 return shader; |
183 } | 183 } |
184 | 184 |
185 | 185 |
186 #if SK_USE_CONDENSED_INFO == 0 | 186 #if SK_USE_CONDENSED_INFO == 0 |
187 | 187 |
188 const SkMemberInfo SkDrawRadialGradient::fInfo[] = { | 188 const SkMemberInfo SkDrawRadialGradient::fInfo[] = { |
189 SK_MEMBER_INHERITED, | 189 SK_MEMBER_INHERITED, |
190 SK_MEMBER(center, Point), | 190 SK_MEMBER(center, Point), |
(...skipping 12 matching lines...) Expand all Loading... |
203 void SkDrawRadialGradient::dump(SkAnimateMaker* maker) { | 203 void SkDrawRadialGradient::dump(SkAnimateMaker* maker) { |
204 dumpBase(maker); | 204 dumpBase(maker); |
205 dumpRest(maker); | 205 dumpRest(maker); |
206 } | 206 } |
207 #endif | 207 #endif |
208 | 208 |
209 SkShader* SkDrawRadialGradient::getShader() { | 209 SkShader* SkDrawRadialGradient::getShader() { |
210 if (addPrelude() == 0) | 210 if (addPrelude() == 0) |
211 return NULL; | 211 return NULL; |
212 SkShader* shader = SkGradientShader::CreateRadial(center, | 212 SkShader* shader = SkGradientShader::CreateRadial(center, |
213 radius, fColors.begin(), offsets.begin(), fColors.count(), (SkShader::Ti
leMode) tileMode, fUnitMapper); | 213 radius, fColors.begin(), offsets.begin(), fColors.count(), (SkShader::Ti
leMode) tileMode, |
| 214 fUnitMapper, 0, getMatrix()); |
214 SkAutoTDelete<SkShader> autoDel(shader); | 215 SkAutoTDelete<SkShader> autoDel(shader); |
215 addPostlude(shader); | |
216 (void)autoDel.detach(); | 216 (void)autoDel.detach(); |
217 return shader; | 217 return shader; |
218 } | 218 } |
OLD | NEW |