| 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 "Sk4fLinearGradient.h" |
| 9 #include "SkGradientShaderPriv.h" | 9 #include "SkGradientShaderPriv.h" |
| 10 #include "SkLinearGradient.h" | 10 #include "SkLinearGradient.h" |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLinearGradient) | 936 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLinearGradient) |
| 937 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRadialGradient) | 937 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRadialGradient) |
| 938 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSweepGradient) | 938 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSweepGradient) |
| 939 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTwoPointConicalGradient) | 939 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTwoPointConicalGradient) |
| 940 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 940 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| 941 | 941 |
| 942 /////////////////////////////////////////////////////////////////////////////// | 942 /////////////////////////////////////////////////////////////////////////////// |
| 943 | 943 |
| 944 #if SK_SUPPORT_GPU | 944 #if SK_SUPPORT_GPU |
| 945 | 945 |
| 946 #include "effects/GrTextureStripAtlas.h" | |
| 947 #include "GrContext.h" | 946 #include "GrContext.h" |
| 948 #include "GrInvariantOutput.h" | 947 #include "GrInvariantOutput.h" |
| 948 #include "GrTextureStripAtlas.h" |
| 949 #include "gl/GrGLContext.h" | 949 #include "gl/GrGLContext.h" |
| 950 #include "glsl/GrGLSLFragmentShaderBuilder.h" | 950 #include "glsl/GrGLSLFragmentShaderBuilder.h" |
| 951 #include "glsl/GrGLSLProgramDataManager.h" | 951 #include "glsl/GrGLSLProgramDataManager.h" |
| 952 #include "glsl/GrGLSLUniformHandler.h" | 952 #include "glsl/GrGLSLUniformHandler.h" |
| 953 #include "SkGr.h" | 953 #include "SkGr.h" |
| 954 | 954 |
| 955 static inline bool close_to_one_half(const SkFixed& val) { | 955 static inline bool close_to_one_half(const SkFixed& val) { |
| 956 return SkScalarNearlyEqual(SkFixedToScalar(val), SK_ScalarHalf); | 956 return SkScalarNearlyEqual(SkFixedToScalar(val), SK_ScalarHalf); |
| 957 } | 957 } |
| 958 | 958 |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1485 (*stops)[i] = stop; | 1485 (*stops)[i] = stop; |
| 1486 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st
op) : 1.f; | 1486 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st
op) : 1.f; |
| 1487 } | 1487 } |
| 1488 } | 1488 } |
| 1489 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM
odeCount)); | 1489 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM
odeCount)); |
| 1490 | 1490 |
| 1491 return outColors; | 1491 return outColors; |
| 1492 } | 1492 } |
| 1493 | 1493 |
| 1494 #endif | 1494 #endif |
| OLD | NEW |