| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 "Sk4fLinearGradient.h" |
| 8 #include "SkGradientShaderPriv.h" | 9 #include "SkGradientShaderPriv.h" |
| 9 #include "SkLinearGradient.h" | 10 #include "SkLinearGradient.h" |
| 10 #include "SkRadialGradient.h" | 11 #include "SkRadialGradient.h" |
| 11 #include "SkTwoPointConicalGradient.h" | 12 #include "SkTwoPointConicalGradient.h" |
| 12 #include "SkSweepGradient.h" | 13 #include "SkSweepGradient.h" |
| 13 | 14 |
| 14 void SkGradientShaderBase::Descriptor::flatten(SkWriteBuffer& buffer) const { | 15 void SkGradientShaderBase::Descriptor::flatten(SkWriteBuffer& buffer) const { |
| 15 buffer.writeColorArray(fColors, fCount); | 16 buffer.writeColorArray(fColors, fCount); |
| 16 if (fPos) { | 17 if (fPos) { |
| 17 buffer.writeBool(true); | 18 buffer.writeBool(true); |
| (...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1203 (*stops)[i] = stop; | 1204 (*stops)[i] = stop; |
| 1204 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st
op) : 1.f; | 1205 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st
op) : 1.f; |
| 1205 } | 1206 } |
| 1206 } | 1207 } |
| 1207 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM
odeCount)); | 1208 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM
odeCount)); |
| 1208 | 1209 |
| 1209 return outColors; | 1210 return outColors; |
| 1210 } | 1211 } |
| 1211 | 1212 |
| 1212 #endif | 1213 #endif |
| OLD | NEW |