Home
last modified time | relevance | path

Searched refs:fColorCount (Results 1 – 25 of 40) sorted by relevance

12

/third_party/skia/bench/
DHardStopGradientBench_ScaleNumHardStops.cpp26 fColorCount = colorCount; in HardStopGradientBench_ScaleNumHardStops()
54 SkAutoTArray<SkColor> colors(fColorCount); in onPreDraw()
55 for (int i = 0; i < fColorCount; i++) { in onPreDraw()
61 SkAutoTArray<SkScalar> positions(fColorCount); in onPreDraw()
65 positions[k++] = val / fColorCount; in onPreDraw()
66 positions[k++] = val / fColorCount; in onPreDraw()
68 for (int i = k; i < fColorCount; i++) { in onPreDraw()
69 positions[i] = i / (fColorCount - 1.0f); in onPreDraw()
75 fColorCount, in onPreDraw()
94 int fColorCount; member in HardStopGradientBench_ScaleNumHardStops
DHardStopGradientBench_ScaleNumColors.cpp26 fColorCount = count; in HardStopGradientBench_ScaleNumColors()
61 for (int i = 0; i < fColorCount; i++) { in onPreDraw()
69 for (int i = 2; i < fColorCount; i++) { in onPreDraw()
71 positions[i] = i / (fColorCount - 1.0f); in onPreDraw()
77 fColorCount, in onPreDraw()
97 int fColorCount; member in HardStopGradientBench_ScaleNumColors
/third_party/flutter/skia/bench/
DHardStopGradientBench_ScaleNumHardStops.cpp25 fColorCount = colorCount; in HardStopGradientBench_ScaleNumHardStops()
53 SkAutoTArray<SkColor> colors(fColorCount); in onPreDraw()
54 for (int i = 0; i < fColorCount; i++) { in onPreDraw()
60 SkAutoTArray<SkScalar> positions(fColorCount); in onPreDraw()
64 positions[k++] = val / fColorCount; in onPreDraw()
65 positions[k++] = val / fColorCount; in onPreDraw()
67 for (int i = k; i < fColorCount; i++) { in onPreDraw()
68 positions[i] = i / (fColorCount - 1.0f); in onPreDraw()
74 fColorCount, in onPreDraw()
93 int fColorCount; member in HardStopGradientBench_ScaleNumHardStops
DHardStopGradientBench_ScaleNumColors.cpp26 fColorCount = count; in HardStopGradientBench_ScaleNumColors()
61 for (int i = 0; i < fColorCount; i++) { in onPreDraw()
69 for (int i = 2; i < fColorCount; i++) { in onPreDraw()
71 positions[i] = i / (fColorCount - 1.0f); in onPreDraw()
77 fColorCount, in onPreDraw()
97 int fColorCount; member in HardStopGradientBench_ScaleNumColors
/third_party/flutter/skia/src/gpu/gradients/
DGrGradientShader.cpp168 SkAutoSTMalloc<4, SkPMColor4f> colors(shader.fColorCount); in make_gradient()
169 SkColor4fXformer xformedColors(shader.fOrigColors4f, shader.fColorCount, in make_gradient()
171 for (int i = 0; i < shader.fColorCount; i++) { in make_gradient()
188 implicitPos.reserve(shader.fColorCount); in make_gradient()
189 SkScalar posScale = SK_Scalar1 / (shader.fColorCount - 1); in make_gradient()
190 for (int i = 0 ; i < shader.fColorCount; i++) { in make_gradient()
198 colors.get(), positions, shader.fColorCount, inputPremul, args); in make_gradient()
227 colors[0], colors[shader.fColorCount - 1], makePremul, allOpaque); in make_gradient()
274 fColorCount = random->nextRangeU(2, kMaxRandomGradientColors); in RandomParams()
278 if (fColorCount == 1 || (fColorCount >= 2 && random->nextBool())) { in RandomParams()
[all …]
DGrRadialGradientLayout.fp62 params.fColorCount, params.fTileMode)
64 params.fStops, params.fColorCount,
DGrLinearGradientLayout.fp67 params.fColorCount, params.fTileMode) :
69 params.fColorCount, params.fTileMode);
/third_party/skia/tests/
DGradientTest.cpp45 int fColorCount; member
55 SkAutoTMalloc<SkColor> colorStorage(fColorCount); in gradCheck()
56 SkAutoTMalloc<SkScalar> posStorage(fColorCount); in gradCheck()
58 info->fColorCount = fColorCount; in gradCheck()
63 REPORTER_ASSERT(reporter, info->fColorCount == fColorCount); in gradCheck()
65 !memcmp(info->fColors, fColors, fColorCount * sizeof(SkColor))); in gradCheck()
67 !memcmp(info->fColorOffsets, fPos, fColorCount * sizeof(SkScalar))); in gradCheck()
84 info.fColorCount = 0; in color_gradproc()
86 REPORTER_ASSERT(reporter, 1 == info.fColorCount); in color_gradproc()
92 buildRec.fColorCount, buildRec.fTileMode)); in linear_gradproc()
[all …]
/third_party/flutter/skia/tests/
DGradientTest.cpp42 int fColorCount; member
52 SkAutoTMalloc<SkColor> colorStorage(fColorCount); in gradCheck()
53 SkAutoTMalloc<SkScalar> posStorage(fColorCount); in gradCheck()
55 info->fColorCount = fColorCount; in gradCheck()
60 REPORTER_ASSERT(reporter, info->fColorCount == fColorCount); in gradCheck()
62 !memcmp(info->fColors, fColors, fColorCount * sizeof(SkColor))); in gradCheck()
64 !memcmp(info->fColorOffsets, fPos, fColorCount * sizeof(SkScalar))); in gradCheck()
81 info.fColorCount = 0; in color_gradproc()
83 REPORTER_ASSERT(reporter, 1 == info.fColorCount); in color_gradproc()
89 buildRec.fColorCount, buildRec.fTileMode)); in linear_gradproc()
[all …]
/third_party/skia/src/shaders/gradients/
DSkGradientShader.cpp151 fColorCount = desc.fCount; in SkGradientShaderBase()
158 fColorCount += needsFirst + needsLast; in SkGradientShaderBase()
161 size_t storageSize = fColorCount * (sizeof(SkColor4f) + (desc.fPos ? sizeof(SkScalar) : 0)); in SkGradientShaderBase()
163 fOrigPos = desc.fPos ? reinterpret_cast<SkScalar*>(fOrigColors4f + fColorCount) in SkGradientShaderBase()
212 desc.fCount = fColorCount; in flatten()
319 SkColor4fXformer xformedColors(fOrigColors4f, fColorCount, fColorSpace.get(), rec.fDstCS); in onAppendStages()
328 if (fColorCount == 2 && fOrigPos == nullptr) { in onAppendStages()
347 ctx->fs[i] = alloc->makeArray<float>(std::max(fColorCount+1, 8)); in onAppendStages()
348 ctx->bs[i] = alloc->makeArray<float>(std::max(fColorCount+1, 8)); in onAppendStages()
354 size_t stopCount = fColorCount; in onAppendStages()
[all …]
DSk4fGradientBase.cpp34 , fBegin(reverse ? shader.fColorCount - 1 : 0) in IntervalIterator()
36 SkASSERT(shader.fColorCount > 0); in IntervalIterator()
47 const int end = fBegin + fAdvance * (fShader.fColorCount - 1); in iterate()
53 SkASSERT(curr >= 0 && curr < fShader.fColorCount); in iterate()
73 const SkScalar dt = fAdvance * SK_Scalar1 / (fShader.fColorCount - 1); in iterateImplicitPos()
74 const int end = fBegin + fAdvance * (fShader.fColorCount - 2); in iterateImplicitPos()
80 SkASSERT(curr >= 0 && curr < fShader.fColorCount); in iterateImplicitPos()
184 const auto count = shader.fColorCount; in init()
DSkGradientShaderPriv.h108 SkASSERT(i < fColorCount); in getPos()
109 return fOrigPos ? fOrigPos[i] : SkIntToScalar(i) / (fColorCount - 1); in getPos()
113 SkASSERT(i < fColorCount); in getLegacyColor()
119 for (int i = 0; i < fColorCount; ++i) { in colorsCanConvertToSkColor()
127 int fColorCount; variable
/third_party/skia/experimental/graphite/src/
DContextUtils.cpp191 gradInfo.fColorCount = kMaxStops; in ExtractCombo()
196 if (gradInfo.fColorCount > kMaxStops) { in ExtractCombo()
202 to_color4fs(gradInfo.fColorCount, colors, color4fs); in ExtractCombo()
203 expand_stops(gradInfo.fColorCount, offsets); in ExtractCombo()
214 to_color4fs(gradInfo.fColorCount, colors, color4fs); in ExtractCombo()
215 expand_stops(gradInfo.fColorCount, offsets); in ExtractCombo()
226 to_color4fs(gradInfo.fColorCount, colors, color4fs); in ExtractCombo()
227 expand_stops(gradInfo.fColorCount, offsets); in ExtractCombo()
237 to_color4fs(gradInfo.fColorCount, colors, color4fs); in ExtractCombo()
238 expand_stops(gradInfo.fColorCount, offsets); in ExtractCombo()
/third_party/flutter/skia/src/shaders/gradients/
DSkGradientShader.cpp147 fColorCount = desc.fCount; in SkGradientShaderBase()
154 fColorCount += dummyFirst + dummyLast; in SkGradientShaderBase()
157 size_t storageSize = fColorCount * (sizeof(SkColor4f) + (desc.fPos ? sizeof(SkScalar) : 0)); in SkGradientShaderBase()
159 fOrigPos = desc.fPos ? reinterpret_cast<SkScalar*>(fOrigColors4f + fColorCount) in SkGradientShaderBase()
208 desc.fCount = fColorCount; in flatten()
313 SkColor4fXformer xformedColors(fOrigColors4f, fColorCount, fColorSpace.get(), rec.fDstCS); in onAppendStages()
322 if (fColorCount == 2 && fOrigPos == nullptr) { in onAppendStages()
341 ctx->fs[i] = alloc->makeArray<float>(std::max(fColorCount+1, 8)); in onAppendStages()
342 ctx->bs[i] = alloc->makeArray<float>(std::max(fColorCount+1, 8)); in onAppendStages()
348 size_t stopCount = fColorCount; in onAppendStages()
[all …]
DSkGradientShaderPriv.h99 SkASSERT(i < fColorCount); in getPos()
100 return fOrigPos ? fOrigPos[i] : SkIntToScalar(i) / (fColorCount - 1); in getPos()
104 SkASSERT(i < fColorCount); in getLegacyColor()
110 for (int i = 0; i < fColorCount; ++i) { in colorsCanConvertToSkColor()
118 int fColorCount; variable
DSk4fGradientBase.cpp34 , fBegin(reverse ? shader.fColorCount - 1 : 0) in IntervalIterator()
36 SkASSERT(shader.fColorCount > 0); in IntervalIterator()
47 const int end = fBegin + fAdvance * (fShader.fColorCount - 1); in iterate()
53 SkASSERT(curr >= 0 && curr < fShader.fColorCount); in iterate()
73 const SkScalar dt = fAdvance * SK_Scalar1 / (fShader.fColorCount - 1); in iterateImplicitPos()
74 const int end = fBegin + fAdvance * (fShader.fColorCount - 2); in iterateImplicitPos()
80 SkASSERT(curr >= 0 && curr < fShader.fColorCount); in iterateImplicitPos()
184 const auto count = shader.fColorCount; in init()
/third_party/skia/src/pdf/
DSkPDFGradientShader.cpp21 (uint32_t)v.fColorCount, in hash()
22 SkOpts::hash(v.fColors, v.fColorCount * sizeof(SkColor)), in hash()
23 SkOpts::hash(v.fColorOffsets, v.fColorCount * sizeof(SkScalar)), in hash()
147 SkAutoSTMalloc<4, ColorTuple> colorDataAlloc(info.fColorCount); in gradient_function_code()
149 for (int i = 0; i < info.fColorCount; i++) { in gradient_function_code()
166 for (int i = 1 ; i < info.fColorCount; i++) { in gradient_function_code()
187 SkPDFUtils::AppendColorComponent(colorData[info.fColorCount - 1][0], result); in gradient_function_code()
189 SkPDFUtils::AppendColorComponent(colorData[info.fColorCount - 1][1], result); in gradient_function_code()
191 SkPDFUtils::AppendColorComponent(colorData[info.fColorCount - 1][2], result); in gradient_function_code()
226 int colorCount = info.fColorCount; in gradientStitchCode()
[all …]
DSkPDFGradientShader.h41 return u.fColorCount == v.fColorCount
48 && SkPackedArrayEqual(u.fColors, v.fColors, u.fColorCount)
49 && SkPackedArrayEqual(u.fColorOffsets, v.fColorOffsets, u.fColorCount);
/third_party/flutter/skia/src/pdf/
DSkPDFGradientShader.cpp21 (uint32_t)v.fColorCount, in hash()
22 SkOpts::hash(v.fColors, v.fColorCount * sizeof(SkColor)), in hash()
23 SkOpts::hash(v.fColorOffsets, v.fColorCount * sizeof(SkScalar)), in hash()
147 SkAutoSTMalloc<4, ColorTuple> colorDataAlloc(info.fColorCount); in gradient_function_code()
149 for (int i = 0; i < info.fColorCount; i++) { in gradient_function_code()
166 for (int i = 1 ; i < info.fColorCount; i++) { in gradient_function_code()
187 SkPDFUtils::AppendColorComponent(colorData[info.fColorCount - 1][0], result); in gradient_function_code()
189 SkPDFUtils::AppendColorComponent(colorData[info.fColorCount - 1][1], result); in gradient_function_code()
191 SkPDFUtils::AppendColorComponent(colorData[info.fColorCount - 1][2], result); in gradient_function_code()
226 int colorCount = info.fColorCount; in gradientStitchCode()
[all …]
DSkPDFGradientShader.h41 return u.fColorCount == v.fColorCount
48 && SkPackedArrayEqual(u.fColors, v.fColors, u.fColorCount)
49 && SkPackedArrayEqual(u.fColorOffsets, v.fColorOffsets, u.fColorCount);
/third_party/skia/src/gpu/gradients/
DGrGradientShader.cpp696 SkAutoSTMalloc<4, SkPMColor4f> colors(shader.fColorCount); in make_gradient()
697 SkColor4fXformer xformedColors(shader.fOrigColors4f, shader.fColorCount, in make_gradient()
699 for (int i = 0; i < shader.fColorCount; i++) { in make_gradient()
716 implicitPos.reserve_back(shader.fColorCount); in make_gradient()
717 SkScalar posScale = SK_Scalar1 / (shader.fColorCount - 1); in make_gradient()
718 for (int i = 0 ; i < shader.fColorCount; i++) { in make_gradient()
726 colors.get(), positions, shader.fColorCount, inputPremul, args); in make_gradient()
756 colors[0], colors[shader.fColorCount - 1], in make_gradient()
991 fColorCount = random->nextRangeU(2, kMaxRandomGradientColors); in RandomParams()
995 if (fColorCount == 1 || (fColorCount >= 2 && random->nextBool())) { in RandomParams()
[all …]
/third_party/flutter/skia/src/gpu/gradients/generated/
DGrLinearGradientLayout.cpp70 params.fColorCount, params.fTileMode) in TestCreate()
72 params.fColorCount, params.fTileMode); in TestCreate()
DGrRadialGradientLayout.cpp72 params.fColorCount, params.fTileMode) in TestCreate()
74 params.fStops, params.fColorCount, in TestCreate()
DGrSweepGradientLayout.cpp104 params.fColorCount) in TestCreate()
106 params.fStops, params.fColorCount); in TestCreate()
/third_party/flutter/skia/src/shaders/
DSkColorShader.cpp33 if (info->fColors && info->fColorCount >= 1) { in asAGradient()
36 info->fColorCount = 1; in asAGradient()

12