| 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 "SkGradientShaderPriv.h" | 8 #include "SkGradientShaderPriv.h" |
| 9 #include "SkLinearGradient.h" | 9 #include "SkLinearGradient.h" |
| 10 #include "SkRadialGradient.h" | 10 #include "SkRadialGradient.h" |
| (...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 } | 1198 } |
| 1199 } else { | 1199 } else { |
| 1200 if (fYCoord != s.getYCoord()) { | 1200 if (fYCoord != s.getYCoord()) { |
| 1201 return false; | 1201 return false; |
| 1202 } | 1202 } |
| 1203 } | 1203 } |
| 1204 | 1204 |
| 1205 return fTextureAccess.getTexture() == s.fTextureAccess.getTexture() && | 1205 return fTextureAccess.getTexture() == s.fTextureAccess.getTexture() && |
| 1206 fTextureAccess.getParams().getTileModeX() == | 1206 fTextureAccess.getParams().getTileModeX() == |
| 1207 s.fTextureAccess.getParams().getTileModeX() && | 1207 s.fTextureAccess.getParams().getTileModeX() && |
| 1208 this->useAtlas() == s.useAtlas() && | 1208 this->useAtlas() == s.useAtlas(); |
| 1209 fCoordTransform.getMatrix().cheapEqualTo(s.fCoordTransform.getMatrix
()); | |
| 1210 } | 1209 } |
| 1211 | 1210 |
| 1212 return false; | 1211 return false; |
| 1213 } | 1212 } |
| 1214 | 1213 |
| 1215 void GrGradientEffect::onComputeInvariantOutput(InvariantOutput* inout) const { | 1214 void GrGradientEffect::onComputeInvariantOutput(InvariantOutput* inout) const { |
| 1216 if (fIsOpaque) { | 1215 if (fIsOpaque) { |
| 1217 inout->mulByUnknownOpaqueColor(); | 1216 inout->mulByUnknownOpaqueColor(); |
| 1218 } else { | 1217 } else { |
| 1219 inout->mulByUnknownColor(); | 1218 inout->mulByUnknownColor(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1238 (*stops)[i] = stop; | 1237 (*stops)[i] = stop; |
| 1239 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st
op) : 1.f; | 1238 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st
op) : 1.f; |
| 1240 } | 1239 } |
| 1241 } | 1240 } |
| 1242 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM
odeCount)); | 1241 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM
odeCount)); |
| 1243 | 1242 |
| 1244 return outColors; | 1243 return outColors; |
| 1245 } | 1244 } |
| 1246 | 1245 |
| 1247 #endif | 1246 #endif |
| OLD | NEW |