OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 #include "SkRadialGradient.h" | 9 #include "SkRadialGradient.h" |
10 #include "SkRadialGradient_Table.h" | 10 #include "SkRadialGradient_Table.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 uint16_t* SK_RESTRICT dstC, const uint16_t* SK_RE
STRICT cache, | 139 uint16_t* SK_RESTRICT dstC, const uint16_t* SK_RE
STRICT cache, |
140 int toggle, int count) { | 140 int toggle, int count) { |
141 shadeSpan16_radial<repeat_tileproc_nonstatic>(fx, dx, fy, dy, dstC, cache, t
oggle, count); | 141 shadeSpan16_radial<repeat_tileproc_nonstatic>(fx, dx, fy, dy, dstC, cache, t
oggle, count); |
142 } | 142 } |
143 | 143 |
144 } // namespace | 144 } // namespace |
145 | 145 |
146 ///////////////////////////////////////////////////////////////////// | 146 ///////////////////////////////////////////////////////////////////// |
147 | 147 |
148 SkRadialGradient::SkRadialGradient(const SkPoint& center, SkScalar radius, | 148 SkRadialGradient::SkRadialGradient(const SkPoint& center, SkScalar radius, |
149 const Descriptor& desc) | 149 const Descriptor& desc, const SkMatrix* local
Matrix) |
150 : SkGradientShaderBase(desc), | 150 : SkGradientShaderBase(desc, localMatrix), |
151 fCenter(center), | 151 fCenter(center), |
152 fRadius(radius) | 152 fRadius(radius) |
153 { | 153 { |
154 // make sure our table is insync with our current #define for kSQRT_TABLE_SI
ZE | 154 // make sure our table is insync with our current #define for kSQRT_TABLE_SI
ZE |
155 SkASSERT(sizeof(gSqrt8Table) == kSQRT_TABLE_SIZE); | 155 SkASSERT(sizeof(gSqrt8Table) == kSQRT_TABLE_SIZE); |
156 | 156 |
157 rad_to_unit_matrix(center, radius, &fPtsToUnit); | 157 rad_to_unit_matrix(center, radius, &fPtsToUnit); |
158 } | 158 } |
159 | 159 |
160 size_t SkRadialGradient::contextSize() const { | 160 size_t SkRadialGradient::contextSize() const { |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 str->appendScalar(fCenter.fY); | 595 str->appendScalar(fCenter.fY); |
596 str->append(") radius: "); | 596 str->append(") radius: "); |
597 str->appendScalar(fRadius); | 597 str->appendScalar(fRadius); |
598 str->append(" "); | 598 str->append(" "); |
599 | 599 |
600 this->INHERITED::toString(str); | 600 this->INHERITED::toString(str); |
601 | 601 |
602 str->append(")"); | 602 str->append(")"); |
603 } | 603 } |
604 #endif | 604 #endif |
OLD | NEW |