Home
last modified time | relevance | path

Searched refs:SkShader (Results 1 – 25 of 494) sorted by relevance

12345678910>>...20

/external/skqp/bench/
DHardStopGradientBench_ScaleNumColors.cpp17 static const char* get_tilemode_name(SkShader::TileMode tilemode) { in get_tilemode_name()
19 case SkShader::kClamp_TileMode: in get_tilemode_name()
21 case SkShader::kRepeat_TileMode: in get_tilemode_name()
23 case SkShader::kMirror_TileMode: in get_tilemode_name()
33 HardStopGradientBench_ScaleNumColors(SkShader::TileMode tilemode, int count) { in HardStopGradientBench_ScaleNumColors()
106 SkShader::TileMode fTileMode;
115 DEF_BENCH(return new HardStopGradientBench_ScaleNumColors(SkShader::kClamp_TileMode, 3);)
116 DEF_BENCH(return new HardStopGradientBench_ScaleNumColors(SkShader::kClamp_TileMode, 4);)
117 DEF_BENCH(return new HardStopGradientBench_ScaleNumColors(SkShader::kClamp_TileMode, 5);)
118 DEF_BENCH(return new HardStopGradientBench_ScaleNumColors(SkShader::kClamp_TileMode, 10);)
[all …]
DTileBench.cpp39 ConstXTileBench(SkShader::TileMode xTile, in ConstXTileBench()
40 SkShader::TileMode yTile, in ConstXTileBench()
54 fPaint.setShader(SkShader::MakeBitmapShader(bm, xTile, yTile)); in ConstXTileBench()
58 static const char* gTileModeStr[SkShader::kTileModeCount] = { "C", "R", "M" }; in ConstXTileBench()
118 DEF_BENCH(return new ConstXTileBench(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode, false, f…
121 DEF_BENCH(return new ConstXTileBench(SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, true, …
123 DEF_BENCH(return new ConstXTileBench(SkShader::kMirror_TileMode, SkShader::kMirror_TileMode, true, …
126 DEF_BENCH(return new ConstXTileBench(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode, false, t…
129 DEF_BENCH(return new ConstXTileBench(SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, true, …
131 DEF_BENCH(return new ConstXTileBench(SkShader::kMirror_TileMode, SkShader::kMirror_TileMode, true, …
DGradientBench.cpp50 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear()
51 SkShader::TileMode tm, float scale) { in MakeLinear()
55 static sk_sp<SkShader> MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial()
56 SkShader::TileMode tm, float scale) { in MakeRadial()
65 static sk_sp<SkShader> MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep()
66 SkShader::TileMode tm, float scale) { in MakeSweep()
74 static sk_sp<SkShader> MakeConical(const SkPoint pts[2], const GradData& data, in MakeConical()
75 SkShader::TileMode tm, float scale) { in MakeConical()
87 static sk_sp<SkShader> MakeConicalZeroRad(const SkPoint pts[2], const GradData& data, in MakeConicalZeroRad()
88 SkShader::TileMode tm, float scale) { in MakeConicalZeroRad()
[all …]
/external/skqp/include/effects/
DSkGradientShader.h70 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2],
72 SkShader::TileMode mode,
74 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], in MakeLinear()
76 SkShader::TileMode mode) { in MakeLinear()
92 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2],
94 const SkScalar pos[], int count, SkShader::TileMode mode,
96 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], in MakeLinear()
98 const SkScalar pos[], int count, SkShader::TileMode mode) { in MakeLinear()
115 static sk_sp<SkShader> MakeRadial(const SkPoint& center, SkScalar radius,
117 SkShader::TileMode mode,
[all …]
/external/skqp/include/core/
DSkShader.h40 class SK_API SkShader : public SkFlattenable {
152 const SkShader* fShaderA;
153 const SkShader* fShaderB;
166 sk_sp<SkShader> makeWithLocalMatrix(const SkMatrix&) const;
172 sk_sp<SkShader> makeWithColorFilter(sk_sp<SkColorFilter>) const;
180 static sk_sp<SkShader> MakeEmptyShader();
186 static sk_sp<SkShader> MakeColorShader(SkColor);
194 static sk_sp<SkShader> MakeColorShader(const SkColor4f&, sk_sp<SkColorSpace>);
206 static sk_sp<SkShader> MakeCompose(sk_sp<SkShader> dst, sk_sp<SkShader> src,
212 static sk_sp<SkShader> MakeComposeShader(sk_sp<SkShader> dst, sk_sp<SkShader> src, in MakeComposeShader()
[all …]
/external/skqp/gm/
Dtilemodes.cpp34 SkShader::kClamp_TileMode)); in makebm()
39 SkShader::TileMode tmx, SkShader::TileMode tmy) { in setup()
40 paint->setShader(SkShader::MakeBitmapShader(bm, tmx, tmy)); in setup()
94 constexpr SkShader::TileMode gModes[] = { in onDraw()
95 SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode, SkShader::kMirror_TileMode }; in onDraw()
159 static sk_sp<SkShader> make_bm(SkShader::TileMode tx, SkShader::TileMode ty) { in make_bm()
162 return SkShader::MakeBitmapShader(bm, tx, ty); in make_bm()
165 static sk_sp<SkShader> make_grad(SkShader::TileMode tx, SkShader::TileMode ty) { in make_grad()
184 typedef sk_sp<SkShader> (*ShaderProc)(SkShader::TileMode, SkShader::TileMode);
209 constexpr SkShader::TileMode gModes[] = { in onDraw()
[all …]
Dgiantbitmap.cpp23 SkShader::TileMode fMode;
63 GiantBitmapGM(SkShader::TileMode mode, bool doFilter, bool doRotate) : fBM(nullptr) { in GiantBitmapGM()
76 case SkShader::kClamp_TileMode: in onShortName()
79 case SkShader::kRepeat_TileMode: in onShortName()
82 case SkShader::kMirror_TileMode: in onShortName()
107 paint.setShader(SkShader::MakeBitmapShader(getBitmap(), fMode, fMode, &m)); in onDraw()
123 DEF_GM( return new GiantBitmapGM(SkShader::kClamp_TileMode, false, false); )
124 DEF_GM( return new GiantBitmapGM(SkShader::kRepeat_TileMode, false, false); )
125 DEF_GM( return new GiantBitmapGM(SkShader::kMirror_TileMode, false, false); )
126 DEF_GM( return new GiantBitmapGM(SkShader::kClamp_TileMode, true, false); )
[all …]
Dgradients_degenerate.cpp20 static const SkShader::TileMode TILE_MODES[] = { SkShader::kDecal_TileMode,
21 SkShader::kRepeat_TileMode,
22 SkShader::kMirror_TileMode,
23 SkShader::kClamp_TileMode };
32 typedef sk_sp<SkShader> (*GradientFactory)(SkShader::TileMode tm);
75 static sk_sp<SkShader> make_linear(SkShader::TileMode mode) { in make_linear()
81 static sk_sp<SkShader> make_radial(SkShader::TileMode mode) { in make_radial()
86 static sk_sp<SkShader> make_sweep(SkShader::TileMode mode) { in make_sweep()
93 static sk_sp<SkShader> make_sweep_zero_ang(SkShader::TileMode mode) { in make_sweep_zero_ang()
99 static sk_sp<SkShader> make_2pt_conic(SkShader::TileMode mode) { in make_2pt_conic()
[all …]
Dcomposeshader.cpp19 static sk_sp<SkShader> make_shader(SkBlendMode mode) { in make_shader()
27 auto shaderA = SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in make_shader()
33 auto shaderB = SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in make_shader()
35 return SkShader::MakeComposeShader(std::move(shaderA), std::move(shaderB), mode); in make_shader()
62 sk_sp<SkShader> fShader;
83 sk_sp<SkShader> shaders[] = { in onDraw()
143 static sk_sp<SkShader> make_linear_gradient_shader(int length) { in make_linear_gradient_shader()
150 return SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in make_linear_gradient_shader()
164 fColorBitmapShader = SkShader::MakeBitmapShader(fColorBitmap, SkShader::kRepeat_TileMode, in onOnceBeforeDraw()
165 SkShader::kRepeat_TileMode, &s); in onOnceBeforeDraw()
[all …]
Dgradients_2pt_conical.cpp40 static sk_sp<SkShader> Make2ConicalOutside(const SkPoint pts[2], const GradData& data, in Make2ConicalOutside()
41 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalOutside()
51 static sk_sp<SkShader> Make2ConicalOutsideStrip(const SkPoint pts[2], const GradData& data, in Make2ConicalOutsideStrip()
52SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalOutsideStrip()
61 static sk_sp<SkShader> Make2ConicalOutsideFlip(const SkPoint pts[2], const GradData& data, in Make2ConicalOutsideFlip()
62 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalOutsideFlip()
72 static sk_sp<SkShader> Make2ConicalInside(const SkPoint pts[2], const GradData& data, in Make2ConicalInside()
73 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalInside()
85 static sk_sp<SkShader> Make2ConicalInsideFlip(const SkPoint pts[2], const GradData& data, in Make2ConicalInsideFlip()
86 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalInsideFlip()
[all …]
Dgradients.cpp55 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear()
56 SkShader::TileMode tm, const SkMatrix& localMatrix) { in MakeLinear()
61 static sk_sp<SkShader> MakeLinear4f(const SkPoint pts[2], const GradData& data, in MakeLinear4f()
62 SkShader::TileMode tm, const SkMatrix& localMatrix) { in MakeLinear4f()
68 static sk_sp<SkShader> MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial()
69 SkShader::TileMode tm, const SkMatrix& localMatrix) { in MakeRadial()
77 static sk_sp<SkShader> MakeRadial4f(const SkPoint pts[2], const GradData& data, in MakeRadial4f()
78 SkShader::TileMode tm, const SkMatrix& localMatrix) { in MakeRadial4f()
87 static sk_sp<SkShader> MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep()
88 SkShader::TileMode, const SkMatrix& localMatrix) { in MakeSweep()
[all …]
Dclippedbitmapshaders.cpp45 ClippedBitmapShadersGM(SkShader::TileMode mode, bool hq=false) in ClippedBitmapShadersGM()
50 SkShader::TileMode fMode;
56 case SkShader::kRepeat_TileMode: in onShortName()
59 case SkShader::kMirror_TileMode: in onShortName()
62 case SkShader::kClamp_TileMode: in onShortName()
86 paint.setShader(SkShader::MakeBitmapShader(bmp, fMode, fMode, &s)); in onDraw()
116 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kRepeat_TileMode); )
117 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kMirror_TileMode); )
118 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kClamp_TileMode); )
120 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kRepeat_TileMode, true); )
[all …]
Dtilemodes_scaled.cpp33 SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode)); in makebm()
38 SkShader::TileMode tmx, SkShader::TileMode tmy) { in setup()
39 paint->setShader(SkShader::MakeBitmapShader(bm, tmx, tmy)); in setup()
98 constexpr SkShader::TileMode gModes[] = { in onDraw()
99 SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode, SkShader::kMirror_TileMode }; in onDraw()
159 static sk_sp<SkShader> make_bm(SkShader::TileMode tx, SkShader::TileMode ty) { in make_bm()
162 return SkShader::MakeBitmapShader(bm, tx, ty); in make_bm()
165 static sk_sp<SkShader> make_grad(SkShader::TileMode tx, SkShader::TileMode ty) { in make_grad()
184 typedef sk_sp<SkShader> (*ShaderProc)(SkShader::TileMode, SkShader::TileMode);
209 constexpr SkShader::TileMode gModes[] = { in onDraw()
[all …]
Dxfermodes2.cpp98 fBG = SkShader::MakeBitmapShader(bg, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, in onOnceBeforeDraw()
112 fSrc = SkShader::MakeBitmapShader(srcBmp, SkShader::kClamp_TileMode, in onOnceBeforeDraw()
113 SkShader::kClamp_TileMode); in onOnceBeforeDraw()
125 fDst = SkShader::MakeBitmapShader(dstBmp, SkShader::kClamp_TileMode, in onOnceBeforeDraw()
126 SkShader::kClamp_TileMode); in onOnceBeforeDraw()
134 sk_sp<SkShader> fBG;
135 sk_sp<SkShader> fSrc;
136 sk_sp<SkShader> fDst;
/external/skia/include/core/
DSkShader.h38 class SK_API SkShader : public SkFlattenable {
120 sk_sp<SkShader> makeWithLocalMatrix(const SkMatrix&) const;
126 sk_sp<SkShader> makeWithColorFilter(sk_sp<SkColorFilter>) const;
129 SkShader() = default;
137 static sk_sp<SkShader> Empty();
138 static sk_sp<SkShader> Color(SkColor);
139 static sk_sp<SkShader> Color(const SkColor4f&, sk_sp<SkColorSpace>);
140 static sk_sp<SkShader> Blend(SkBlendMode mode, sk_sp<SkShader> dst, sk_sp<SkShader> src);
141 static sk_sp<SkShader> Lerp(float t, sk_sp<SkShader> dst, sk_sp<SkShader> src);
/external/skqp/tests/
DGradientTest.cpp26 SkShader::kClamp_TileMode)); in test_big_grad()
48 SkShader::TileMode fTileMode;
50 void gradCheck(skiatest::Reporter* reporter, const sk_sp<SkShader>& shader, in gradCheck()
51 SkShader::GradientInfo* info, in gradCheck()
52 SkShader::GradientType gt) const { in gradCheck()
72 sk_sp<SkShader> s(SkShader::MakeEmptyShader()); in none_gradproc()
73 REPORTER_ASSERT(reporter, SkShader::kNone_GradientType == s->asAGradient(nullptr)); in none_gradproc()
77 sk_sp<SkShader> s(new SkColorShader(rec.fColors[0])); in color_gradproc()
78 REPORTER_ASSERT(reporter, SkShader::kColor_GradientType == s->asAGradient(nullptr)); in color_gradproc()
80 SkShader::GradientInfo info; in color_gradproc()
[all …]
DShaderOpacityTest.cpp21 auto shader = SkShader::MakeBitmapShader(bmp, in test_bitmap()
22 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in test_bitmap()
30 shader = SkShader::MakeBitmapShader(bmp, in test_bitmap()
31 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in test_bitmap()
37 shader = SkShader::MakeBitmapShader(bmp, in test_bitmap()
38 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in test_bitmap()
44 shader = SkShader::MakeBitmapShader(bmp, in test_bitmap()
45 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in test_bitmap()
57 SkShader::TileMode mode = SkShader::kClamp_TileMode; in test_gradient()
DShaderTest.cpp18 static void check_isaimage(skiatest::Reporter* reporter, SkShader* shader, in check_isaimage()
20 SkShader::TileMode expectedX, SkShader::TileMode expectedY, in check_isaimage()
22 SkShader::TileMode tileModes[2]; in check_isaimage()
27 tileModes[0] = tileModes[1] = (SkShader::TileMode)99; in check_isaimage()
45 const SkShader::TileMode tmx = SkShader::kRepeat_TileMode; in DEF_TEST()
46 const SkShader::TileMode tmy = SkShader::kMirror_TileMode; in DEF_TEST()
48 auto shader0 = SkShader::MakeBitmapShader(bm, tmx, tmy, &localM); in DEF_TEST()
63 SkShader::MakeComposeShader( in DEF_TEST()
64 SkShader::MakeEmptyShader(), in DEF_TEST()
DPictureShaderTest.cpp27 paint.setShader(SkShader::MakePictureShader( in DEF_TEST()
28 nullptr, SkShader::kClamp_TileMode, SkShader::kClamp_TileMode, nullptr, nullptr)); in DEF_TEST()
36 paint.setShader(SkShader::MakePictureShader(factory.finishRecordingAsPicture(), in DEF_TEST()
37 SkShader::kClamp_TileMode, in DEF_TEST()
38 SkShader::kClamp_TileMode, nullptr, nullptr)); in DEF_TEST()
60 SkShader::kRepeat_TileMode, in DEF_TEST()
61 SkShader::kRepeat_TileMode, nullptr, nullptr)); in DEF_TEST()
72 SkShader::kRepeat_TileMode, in DEF_TEST()
73 SkShader::kRepeat_TileMode, nullptr, nullptr)); in DEF_TEST()
/external/skqp/src/shaders/
DSkImageShader.h18 static sk_sp<SkShader> Make(sk_sp<SkImage>,
19 SkShader::TileMode tx,
20 SkShader::TileMode ty,
34 SkShader::TileMode tx,
35 SkShader::TileMode ty,
43 SkImage* onIsAImage(SkMatrix*, SkShader::TileMode*) const override;
47 sk_sp<SkShader> onMakeColorSpace(SkColorSpaceXformer* xformer) const override { in onMakeColorSpace()
53 const SkShader::TileMode fTileModeX;
54 const SkShader::TileMode fTileModeY;
DSkShader.cpp112 const SkMatrix& SkShader::getLocalMatrix() const { in getLocalMatrix()
116 SkImage* SkShader::isAImage(SkMatrix* localMatrix, TileMode xy[2]) const { in isAImage()
120 SkShader::GradientType SkShader::asAGradient(GradientInfo* info) const { in asAGradient()
130 sk_sp<SkShader> SkShader::makeAsALocalMatrixShader(SkMatrix*) const { in makeAsALocalMatrixShader()
134 sk_sp<SkShader> SkShader::MakeEmptyShader() { return sk_make_sp<SkEmptyShader>(); } in MakeEmptyShader()
136 sk_sp<SkShader> SkShader::MakeColorShader(SkColor color) { return sk_make_sp<SkColorShader>(color);… in MakeColorShader()
138 sk_sp<SkShader> SkShader::MakeBitmapShader(const SkBitmap& src, TileMode tmx, TileMode tmy, in MakeBitmapShader()
146 sk_sp<SkShader> SkShader::MakePictureShader(sk_sp<SkPicture> src, TileMode tmx, TileMode tmy, in MakePictureShader()
170 sk_sp<SkShader> shader; in onAppendStages()
175 : sk_ref_sp((SkShader*)this); in onAppendStages()
[all …]
/external/skia/include/effects/
DSkGradientShader.h73 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2],
77 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], in MakeLinear()
97 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2],
101 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], in MakeLinear()
120 static sk_sp<SkShader> MakeRadial(const SkPoint& center, SkScalar radius,
124 static sk_sp<SkShader> MakeRadial(const SkPoint& center, SkScalar radius, in MakeRadial()
143 static sk_sp<SkShader> MakeRadial(const SkPoint& center, SkScalar radius,
147 static sk_sp<SkShader> MakeRadial(const SkPoint& center, SkScalar radius, in MakeRadial()
160 static sk_sp<SkShader> MakeTwoPointConical(const SkPoint& start, SkScalar startRadius,
165 static sk_sp<SkShader> MakeTwoPointConical(const SkPoint& start, SkScalar startRadius, in MakeTwoPointConical()
[all …]
/external/skqp/src/pdf/
DSkPDFShader.cpp64 SkShader::TileMode tileModes[2]; in make_image_shader()
67 if (tileModes[0] != SkShader::kClamp_TileMode || in make_image_shader()
68 tileModes[1] != SkShader::kClamp_TileMode) { in make_image_shader()
96 if (tileModes[0] == SkShader::kMirror_TileMode) { in make_image_shader()
103 if (tileModes[1] == SkShader::kMirror_TileMode) { in make_image_shader()
110 if (tileModes[0] == SkShader::kMirror_TileMode && in make_image_shader()
111 tileModes[1] == SkShader::kMirror_TileMode) { in make_image_shader()
122 if (tileModes[0] == SkShader::kClamp_TileMode || in make_image_shader()
123 tileModes[1] == SkShader::kClamp_TileMode) { in make_image_shader()
134 if (tileModes[0] == SkShader::kClamp_TileMode && in make_image_shader()
[all …]
/external/skia/src/shaders/
DSkComposeShader.cpp44 sk_sp<SkShader> SkShaders::Blend(SkBlendMode mode, sk_sp<SkShader> dst, sk_sp<SkShader> src) { in Blend()
51 return sk_sp<SkShader>(new SkShader_Blend(mode, std::move(dst), std::move(src))); in Blend()
54 sk_sp<SkShader> SkShaders::Lerp(float weight, sk_sp<SkShader> dst, sk_sp<SkShader> src) { in Lerp()
74 sk_sp<SkShader> inputs[] = {dst, src}; in Lerp()
84 static bool append_shader_or_paint(const SkStageRec& rec, SkShader* shader) { in append_shader_or_paint()
96 static float* append_two_shaders(const SkStageRec& rec, SkShader* s0, SkShader* s1) { in append_two_shaders()
116 sk_sp<SkShader> dst(buffer.readShader()); in CreateProc()
117 sk_sp<SkShader> src(buffer.readShader()); in CreateProc()
146 static skvm::Color program_or_paint(const sk_sp<SkShader>& sh, skvm::Builder* p, in program_or_paint()
175 static std::unique_ptr<GrFragmentProcessor> as_fp(const GrFPArgs& args, SkShader* shader) { in as_fp()
/external/skqp/samplecode/
DSampleShaders.cpp22 static sk_sp<SkShader> make_bitmapfade(const SkBitmap& bm) { in make_bitmapfade()
30 auto shaderA = SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in make_bitmapfade()
32 auto shaderB = SkShader::MakeBitmapShader(bm, in make_bitmapfade()
33 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in make_bitmapfade()
35 return SkShader::MakeComposeShader(std::move(shaderB), std::move(shaderA), SkBlendMode::kDstIn); in make_bitmapfade()
40 sk_sp<SkShader> fShader;
53 … auto shaderA = SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in ShaderView()
59 … auto shaderB = SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in ShaderView()
61 fShader = SkShader::MakeComposeShader(std::move(shaderA), std::move(shaderB), in ShaderView()

12345678910>>...20