Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: src/effects/gradients/SkGradientShader.cpp

Issue 755363002: remove proc key (Closed) Base URL: https://skia.googlesource.com/skia.git@fixkey
Patch Set: address nit Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/effects/SkTableColorFilter.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 } 1039 }
1040 1040
1041 1041
1042 uint32_t GrGLGradientEffect::GenBaseGradientKey(const GrProcessor& processor) { 1042 uint32_t GrGLGradientEffect::GenBaseGradientKey(const GrProcessor& processor) {
1043 const GrGradientEffect& e = processor.cast<GrGradientEffect>(); 1043 const GrGradientEffect& e = processor.cast<GrGradientEffect>();
1044 1044
1045 uint32_t key = 0; 1045 uint32_t key = 0;
1046 1046
1047 if (SkGradientShaderBase::kTwo_GpuColorType == e.getColorType()) { 1047 if (SkGradientShaderBase::kTwo_GpuColorType == e.getColorType()) {
1048 key |= kTwoColorKey; 1048 key |= kTwoColorKey;
1049 } else if (SkGradientShaderBase::kThree_GpuColorType == e.getColorType()){ 1049 } else if (SkGradientShaderBase::kThree_GpuColorType == e.getColorType()) {
1050 key |= kThreeColorKey; 1050 key |= kThreeColorKey;
1051 } 1051 }
1052 1052
1053 if (GrGradientEffect::kBeforeInterp_PremulType == e.getPremulType()) { 1053 if (GrGradientEffect::kBeforeInterp_PremulType == e.getPremulType()) {
1054 key |= kPremulBeforeInterpKey; 1054 key |= kPremulBeforeInterpKey;
1055 } 1055 }
1056 1056
1057 return key; 1057 return key;
1058 } 1058 }
1059 1059
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 (*stops)[i] = stop; 1235 (*stops)[i] = stop;
1236 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st op) : 1.f; 1236 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st op) : 1.f;
1237 } 1237 }
1238 } 1238 }
1239 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM odeCount)); 1239 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM odeCount));
1240 1240
1241 return outColors; 1241 return outColors;
1242 } 1242 }
1243 1243
1244 #endif 1244 #endif
OLDNEW
« no previous file with comments | « src/effects/SkTableColorFilter.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698