OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "SkSweepGradient.h" | 8 #include "SkSweepGradient.h" |
9 | 9 |
10 static SkMatrix translate(SkScalar dx, SkScalar dy) { | 10 static SkMatrix translate(SkScalar dx, SkScalar dy) { |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 } else { | 214 } else { |
215 t.printf("atan(- %s.y, - %s.x) * 0.1591549430918 + 0.5", | 215 t.printf("atan(- %s.y, - %s.x) * 0.1591549430918 + 0.5", |
216 coords2D.c_str(), coords2D.c_str()); | 216 coords2D.c_str(), coords2D.c_str()); |
217 } | 217 } |
218 this->emitColor(args.fFragBuilder, | 218 this->emitColor(args.fFragBuilder, |
219 args.fUniformHandler, | 219 args.fUniformHandler, |
220 args.fGLSLCaps, | 220 args.fGLSLCaps, |
221 ge, t.c_str(), | 221 ge, t.c_str(), |
222 args.fOutputColor, | 222 args.fOutputColor, |
223 args.fInputColor, | 223 args.fInputColor, |
224 args.fSamplers); | 224 args.fTexSamplers); |
225 } | 225 } |
226 | 226 |
227 ///////////////////////////////////////////////////////////////////// | 227 ///////////////////////////////////////////////////////////////////// |
228 | 228 |
229 const GrFragmentProcessor* SkSweepGradient::asFragmentProcessor( | 229 const GrFragmentProcessor* SkSweepGradient::asFragmentProcessor( |
230 GrContext* context, | 230 GrContext* context, |
231 const SkMatrix& viewM, | 231 const SkMatrix& viewM, |
232 const SkMatrix* localMatrix, | 232 const SkMatrix* localMatrix, |
233 SkFilterQuality) const { | 233 SkFilterQuality) const { |
234 | 234 |
(...skipping 25 matching lines...) Expand all Loading... |
260 str->appendScalar(fCenter.fX); | 260 str->appendScalar(fCenter.fX); |
261 str->append(", "); | 261 str->append(", "); |
262 str->appendScalar(fCenter.fY); | 262 str->appendScalar(fCenter.fY); |
263 str->append(") "); | 263 str->append(") "); |
264 | 264 |
265 this->INHERITED::toString(str); | 265 this->INHERITED::toString(str); |
266 | 266 |
267 str->append(")"); | 267 str->append(")"); |
268 } | 268 } |
269 #endif | 269 #endif |
OLD | NEW |