Lines Matching refs:desc
15 SkGradientShaderBase::SkGradientShaderBase(const Descriptor& desc) {
16 SkASSERT(desc.fCount > 1);
20 fMapper = desc.fMapper;
22 fGradFlags = SkToU8(desc.fFlags);
24 SkASSERT((unsigned)desc.fTileMode < SkShader::kTileModeCount);
26 fTileMode = desc.fTileMode;
27 fTileProc = gTileProcs[desc.fTileMode];
44 fColorCount = desc.fCount;
48 if (desc.fPos) {
49 dummyFirst = desc.fPos[0] != 0;
50 dummyLast = desc.fPos[desc.fCount - 1] != SK_Scalar1;
67 *origColors++ = desc.fColors[0];
69 memcpy(origColors, desc.fColors, desc.fCount * sizeof(SkColor));
71 origColors += desc.fCount;
72 *origColors = desc.fColors[desc.fCount - 1];
82 if (desc.fPos) {
92 int count = desc.fCount + dummyLast;
96 if (i == desc.fCount) { // we're really at the dummyLast
99 curr = SkScalarToFixed(desc.fPos[i]);
118 SkFixed dp = SK_Fixed1 / (desc.fCount - 1);
120 SkFixed scale = (desc.fCount - 1) << 8; // (1 << 24) / dp
121 for (int i = 1; i < desc.fCount; i++) {
705 static void desc_init(SkGradientShaderBase::Descriptor* desc,
710 desc->fColors = colors;
711 desc->fPos = pos;
712 desc->fCount = colorCount;
713 desc->fTileMode = mode;
714 desc->fMapper = mapper;
715 desc->fFlags = flags;
729 SkGradientShaderBase::Descriptor desc;
730 desc_init(&desc, colors, pos, colorCount, mode, mapper, flags);
731 return SkNEW_ARGS(SkLinearGradient, (pts, desc));
745 SkGradientShaderBase::Descriptor desc;
746 desc_init(&desc, colors, pos, colorCount, mode, mapper, flags);
747 return SkNEW_ARGS(SkRadialGradient, (center, radius, desc));
765 SkGradientShaderBase::Descriptor desc;
766 desc_init(&desc, colors, pos, colorCount, mode, mapper, flags);
768 (start, startRadius, end, endRadius, desc));
789 SkGradientShaderBase::Descriptor desc;
790 desc_init(&desc, colors, pos, colorCount, mode, mapper, flags);
792 (start, startRadius, end, endRadius, desc));
805 SkGradientShaderBase::Descriptor desc;
806 desc_init(&desc, colors, pos, colorCount, SkShader::kClamp_TileMode, mapper, flags);
807 return SkNEW_ARGS(SkSweepGradient, (cx, cy, desc));
1036 GrTextureStripAtlas::Desc desc;
1037 desc.fWidth = bitmap.width();
1038 desc.fHeight = 32;
1039 desc.fRowHeight = bitmap.height();
1040 desc.fContext = ctx;
1041 desc.fConfig = SkBitmapConfig2GrPixelConfig(bitmap.config());
1042 fAtlas = GrTextureStripAtlas::GetAtlas(desc);