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 "SkTwoPointConicalGradient.h" | 8 #include "SkTwoPointConicalGradient.h" |
9 #include "SkTwoPointConicalGradient_gpu.h" | 9 #include "SkTwoPointConicalGradient_gpu.h" |
10 | 10 |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 SkTSwap(info->fPoint[0], info->fPoint[1]); | 305 SkTSwap(info->fPoint[0], info->fPoint[1]); |
306 SkTSwap(info->fRadius[0], info->fRadius[1]); | 306 SkTSwap(info->fRadius[0], info->fRadius[1]); |
307 } | 307 } |
308 } | 308 } |
309 return kConical_GradientType; | 309 return kConical_GradientType; |
310 } | 310 } |
311 | 311 |
312 SkFlattenable* SkTwoPointConicalGradient::CreateProc(SkReadBuffer& buffer) { | 312 SkFlattenable* SkTwoPointConicalGradient::CreateProc(SkReadBuffer& buffer) { |
313 DescriptorScope desc; | 313 DescriptorScope desc; |
314 if (!desc.unflatten(buffer)) { | 314 if (!desc.unflatten(buffer)) { |
315 return NULL; | 315 return nullptr; |
316 } | 316 } |
317 SkPoint c1 = buffer.readPoint(); | 317 SkPoint c1 = buffer.readPoint(); |
318 SkPoint c2 = buffer.readPoint(); | 318 SkPoint c2 = buffer.readPoint(); |
319 SkScalar r1 = buffer.readScalar(); | 319 SkScalar r1 = buffer.readScalar(); |
320 SkScalar r2 = buffer.readScalar(); | 320 SkScalar r2 = buffer.readScalar(); |
321 | 321 |
322 if (buffer.readBool()) { // flipped | 322 if (buffer.readBool()) { // flipped |
323 SkTSwap(c1, c2); | 323 SkTSwap(c1, c2); |
324 SkTSwap(r1, r2); | 324 SkTSwap(r1, r2); |
325 | 325 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 str->appendScalar(fCenter2.fY); | 406 str->appendScalar(fCenter2.fY); |
407 str->append(") radius2: "); | 407 str->append(") radius2: "); |
408 str->appendScalar(fRadius2); | 408 str->appendScalar(fRadius2); |
409 str->append(" "); | 409 str->append(" "); |
410 | 410 |
411 this->INHERITED::toString(str); | 411 this->INHERITED::toString(str); |
412 | 412 |
413 str->append(")"); | 413 str->append(")"); |
414 } | 414 } |
415 #endif | 415 #endif |
OLD | NEW |