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

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

Issue 1215643006: more threading of GrShaderDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@GrShaderDataManager3
Patch Set: tweaks Created 5 years, 5 months 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/SkXfermodeImageFilter.cpp ('k') | src/effects/gradients/SkGradientShaderPriv.h » ('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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 fsBuilder->appendTextureLookupAndModulate(inputColor, 1051 fsBuilder->appendTextureLookupAndModulate(inputColor,
1052 samplers[0], 1052 samplers[0],
1053 "coord"); 1053 "coord");
1054 fsBuilder->codeAppend(";\n"); 1054 fsBuilder->codeAppend(";\n");
1055 } 1055 }
1056 } 1056 }
1057 1057
1058 ///////////////////////////////////////////////////////////////////// 1058 /////////////////////////////////////////////////////////////////////
1059 1059
1060 GrGradientEffect::GrGradientEffect(GrContext* ctx, 1060 GrGradientEffect::GrGradientEffect(GrContext* ctx,
1061 GrShaderDataManager*,
1061 const SkGradientShaderBase& shader, 1062 const SkGradientShaderBase& shader,
1062 const SkMatrix& matrix, 1063 const SkMatrix& matrix,
1063 SkShader::TileMode tileMode) { 1064 SkShader::TileMode tileMode) {
1064 1065
1065 fIsOpaque = shader.isOpaque(); 1066 fIsOpaque = shader.isOpaque();
1066 1067
1067 fColorType = shader.getGpuColorType(&fColors[0]); 1068 fColorType = shader.getGpuColorType(&fColors[0]);
1068 1069
1069 // The two and three color specializations do not currently support tiling. 1070 // The two and three color specializations do not currently support tiling.
1070 if (SkGradientShaderBase::kTwo_GpuColorType == fColorType || 1071 if (SkGradientShaderBase::kTwo_GpuColorType == fColorType ||
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 (*stops)[i] = stop; 1178 (*stops)[i] = stop;
1178 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st op) : 1.f; 1179 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st op) : 1.f;
1179 } 1180 }
1180 } 1181 }
1181 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM odeCount)); 1182 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM odeCount));
1182 1183
1183 return outColors; 1184 return outColors;
1184 } 1185 }
1185 1186
1186 #endif 1187 #endif
OLDNEW
« no previous file with comments | « src/effects/SkXfermodeImageFilter.cpp ('k') | src/effects/gradients/SkGradientShaderPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698