Home
last modified time | relevance | path

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

12345678910>>...12

/external/skia/bench/
DSkLinearBitmapPipelineBench.cpp26 SkShader::TileMode xTile, in CommonBitmapFPBenchmark()
27 SkShader::TileMode yTile) in CommonBitmapFPBenchmark()
36 static SkString tileName(const char* pre, SkShader::TileMode mode) { in tileName()
39 case SkShader::kClamp_TileMode: in tileName()
42 case SkShader::kRepeat_TileMode: in tileName()
45 case SkShader::kMirror_TileMode: in tileName()
111 SkShader::TileMode fXTile;
112 SkShader::TileMode fYTile;
123 SkShader::TileMode xTile, in SkBitmapFPGeneral()
124 SkShader::TileMode yTile) in SkBitmapFPGeneral()
[all …]
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 …]
DGradientBench.cpp49 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear()
50 SkShader::TileMode tm, float scale, bool force4f) { in MakeLinear()
56 static sk_sp<SkShader> MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial()
57 SkShader::TileMode tm, float scale, bool force4f) { in MakeRadial()
66 static sk_sp<SkShader> MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep()
67 SkShader::TileMode tm, float scale, bool force4f) { in MakeSweep()
75 static sk_sp<SkShader> MakeConical(const SkPoint pts[2], const GradData& data, in MakeConical()
76 SkShader::TileMode tm, float scale, bool force4f) { in MakeConical()
88 static sk_sp<SkShader> MakeConicalZeroRad(const SkPoint pts[2], const GradData& data, in MakeConicalZeroRad()
89 SkShader::TileMode tm, float scale, bool force4f) { in MakeConicalZeroRad()
[all …]
DTileBench.cpp40 ConstXTileBench(SkShader::TileMode xTile, in ConstXTileBench()
41 SkShader::TileMode yTile, in ConstXTileBench()
55 fPaint.setShader(SkShader::MakeBitmapShader(bm, xTile, yTile)); in ConstXTileBench()
59 static const char* gTileModeStr[SkShader::kTileModeCount] = { "C", "R", "M" }; in ConstXTileBench()
119 DEF_BENCH(return new ConstXTileBench(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode, false, f…
122 DEF_BENCH(return new ConstXTileBench(SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, true, …
124 DEF_BENCH(return new ConstXTileBench(SkShader::kMirror_TileMode, SkShader::kMirror_TileMode, true, …
127 DEF_BENCH(return new ConstXTileBench(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode, false, t…
130 DEF_BENCH(return new ConstXTileBench(SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, true, …
132 DEF_BENCH(return new ConstXTileBench(SkShader::kMirror_TileMode, SkShader::kMirror_TileMode, true, …
/external/skia/src/core/
DSkShader.cpp48 SkShader::SkShader(const SkMatrix* localMatrix) { in SkShader() function in SkShader
59 SkShader::~SkShader() { in ~SkShader()
63 void SkShader::flatten(SkWriteBuffer& buffer) const { in flatten()
72 bool SkShader::computeTotalInverse(const ContextRec& rec, SkMatrix* totalInverse) const { in computeTotalInverse()
81 bool SkShader::asLuminanceColor(SkColor* colorPtr) const { in asLuminanceColor()
93 SkShader::Context* SkShader::makeContext(const ContextRec& rec, SkArenaAlloc* alloc) const { in makeContext()
100 SkShader::Context::Context(const SkShader& shader, const ContextRec& rec) in Context()
111 SkShader::Context::~Context() {} in ~Context()
113 SkShader::Context::ShadeProc SkShader::Context::asAShadeProc(void** ctx) { in asAShadeProc()
117 void SkShader::Context::shadeSpan4f(int x, int y, SkPM4f dst[], int count) { in shadeSpan4f()
[all …]
DSkComposeShader.h20 class SK_API SkComposeShader : public SkShader {
31 SkComposeShader(sk_sp<SkShader> sA, sk_sp<SkShader> sB, SkBlendMode mode) in SkComposeShader()
41 class ComposeShaderContext : public SkShader::Context {
46 SkShader::Context* contextA, SkShader::Context* contextB);
51 SkShader::Context* fShaderContextA;
52 SkShader::Context* fShaderContextB;
54 typedef SkShader::Context INHERITED;
58 SkShader* getShaderA() { return fShaderA.get(); } in getShaderA()
59 SkShader* getShaderB() { return fShaderB.get(); } in getShaderB()
73 sk_sp<SkShader> fShaderA;
[all …]
DSkPictureShader.h23 class SkPictureShader : public SkShader {
25 static sk_sp<SkShader> Make(sk_sp<SkPicture>, TileMode, TileMode, const SkMatrix*,
45 sk_sp<SkShader> refBitmapShader(const SkMatrix&, const SkMatrix* localMatrix,
53 class PictureShaderContext : public SkShader::Context {
56 const SkPictureShader&, const ContextRec&, sk_sp<SkShader> bitmapShader, SkArenaAlloc*);
63 sk_sp<SkShader> fBitmapShader;
64 SkShader::Context* fBitmapShaderContext;
67 typedef SkShader::Context INHERITED;
70 typedef SkShader INHERITED;
DSkColorFilterShader.h16 class SkColorFilterShader : public SkShader {
18 SkColorFilterShader(sk_sp<SkShader> shader, sk_sp<SkColorFilter> filter);
24 class FilterShaderContext : public SkShader::Context {
27 FilterShaderContext(const SkColorFilterShader&, SkShader::Context*, const ContextRec&);
40 SkShader::Context* fShaderContext;
42 typedef SkShader::Context INHERITED;
53 sk_sp<SkShader> fShader;
56 typedef SkShader INHERITED;
DSkColorSpaceXformer.cpp59 sk_sp<SkShader> SkColorSpaceXformer::apply(const SkShader* shader) { in apply()
62 return SkShader::MakeColorShader(this->apply(color)) in apply()
66 SkShader::TileMode xy[2]; in apply()
72 SkShader::ComposeRec compose; in apply()
77 return SkShader::MakeComposeShader(std::move(A), std::move(B), compose.fBlendMode) in apply()
82 SkShader::GradientInfo gradient; in apply()
96 case SkShader::kNone_GradientType: in apply()
97 case SkShader::kColor_GradientType: in apply()
101 case SkShader::kLinear_GradientType: in apply()
109 case SkShader::kRadial_GradientType: in apply()
[all …]
/external/skia/include/effects/
DSkGradientShader.h41 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2],
43 SkShader::TileMode mode,
45 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], in MakeLinear()
47 SkShader::TileMode mode) { in MakeLinear()
63 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2],
65 const SkScalar pos[], int count, SkShader::TileMode mode,
67 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], in MakeLinear()
69 const SkScalar pos[], int count, SkShader::TileMode mode) { in MakeLinear()
86 static sk_sp<SkShader> MakeRadial(const SkPoint& center, SkScalar radius,
88 SkShader::TileMode mode,
[all …]
/external/skia/gm/
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 …]
Dcomposeshader.cpp17 static sk_sp<SkShader> make_shader(SkBlendMode mode) { in make_shader()
25 auto shaderA = SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in make_shader()
31 auto shaderB = SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in make_shader()
33 return SkShader::MakeComposeShader(std::move(shaderA), std::move(shaderB), mode); in make_shader()
60 sk_sp<SkShader> fShader;
80 sk_sp<SkShader> shaders[] = { in onDraw()
140 static sk_sp<SkShader> make_linear_gradient_shader(int length) { in make_linear_gradient_shader()
147 return SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in make_linear_gradient_shader()
161 fColorBitmapShader = SkShader::MakeBitmapShader(fColorBitmap, SkShader::kRepeat_TileMode, in onOnceBeforeDraw()
162 SkShader::kRepeat_TileMode, &s); in onOnceBeforeDraw()
[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.cpp32 SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode)); in makebm()
37 SkShader::TileMode tmx, SkShader::TileMode tmy) { in setup()
38 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()
164 static sk_sp<SkShader> make_bm(SkShader::TileMode tx, SkShader::TileMode ty) { in make_bm()
167 return SkShader::MakeBitmapShader(bm, tx, ty); in make_bm()
170 static sk_sp<SkShader> make_grad(SkShader::TileMode tx, SkShader::TileMode ty) { in make_grad()
189 typedef sk_sp<SkShader> (*ShaderProc)(SkShader::TileMode, SkShader::TileMode);
214 constexpr SkShader::TileMode gModes[] = { in onDraw()
[all …]
Dtilemodes.cpp33 SkShader::kClamp_TileMode)); in makebm()
38 SkShader::TileMode tmx, SkShader::TileMode tmy) { in setup()
39 paint->setShader(SkShader::MakeBitmapShader(bm, tmx, tmy)); in setup()
91 constexpr SkShader::TileMode gModes[] = { in onDraw()
92 SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode, SkShader::kMirror_TileMode }; in onDraw()
161 static sk_sp<SkShader> make_bm(SkShader::TileMode tx, SkShader::TileMode ty) { in make_bm()
164 return SkShader::MakeBitmapShader(bm, tx, ty); in make_bm()
167 static sk_sp<SkShader> make_grad(SkShader::TileMode tx, SkShader::TileMode ty) { in make_grad()
185 typedef sk_sp<SkShader> (*ShaderProc)(SkShader::TileMode, SkShader::TileMode);
210 constexpr SkShader::TileMode gModes[] = { in onDraw()
[all …]
Dgradients_2pt_conical.cpp41 static sk_sp<SkShader> Make2ConicalOutside(const SkPoint pts[2], const GradData& data, in Make2ConicalOutside()
42 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalOutside()
52 static sk_sp<SkShader> Make2ConicalOutsideFlip(const SkPoint pts[2], const GradData& data, in Make2ConicalOutsideFlip()
53 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalOutsideFlip()
63 static sk_sp<SkShader> Make2ConicalInside(const SkPoint pts[2], const GradData& data, in Make2ConicalInside()
64 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalInside()
76 static sk_sp<SkShader> Make2ConicalInsideFlip(const SkPoint pts[2], const GradData& data, in Make2ConicalInsideFlip()
77 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalInsideFlip()
89 static sk_sp<SkShader> Make2ConicalInsideCenter(const SkPoint pts[2], const GradData& data, in Make2ConicalInsideCenter()
90 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalInsideCenter()
[all …]
Dshadertext.cpp29 SkShader::kClamp_TileMode)); in makebm()
50 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm… in MakeLinear()
54 static sk_sp<SkShader> MakeRadial(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm… in MakeRadial()
62 static sk_sp<SkShader> MakeSweep(const SkPoint pts[2], const GradData& data, SkShader::TileMode) { in MakeSweep()
69 static sk_sp<SkShader> Make2Conical(const SkPoint pts[2], const GradData& data, SkShader::TileMode … in Make2Conical()
81 typedef sk_sp<SkShader> (*GradMaker)(const SkPoint pts[2], const GradData& data, SkShader::TileMode…
117 SkShader::TileMode tileModes[] = { in onDraw()
118 SkShader::kClamp_TileMode, in onDraw()
119 SkShader::kRepeat_TileMode, in onDraw()
120 SkShader::kMirror_TileMode in onDraw()
[all …]
Dgradients.cpp57 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear()
58 SkShader::TileMode tm, const SkMatrix& localMatrix) { in MakeLinear()
63 static sk_sp<SkShader> MakeLinear4f(const SkPoint pts[2], const GradData& data, in MakeLinear4f()
64 SkShader::TileMode tm, const SkMatrix& localMatrix) { in MakeLinear4f()
70 static sk_sp<SkShader> MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial()
71 SkShader::TileMode tm, const SkMatrix& localMatrix) { in MakeRadial()
79 static sk_sp<SkShader> MakeRadial4f(const SkPoint pts[2], const GradData& data, in MakeRadial4f()
80 SkShader::TileMode tm, const SkMatrix& localMatrix) { in MakeRadial4f()
89 static sk_sp<SkShader> MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep()
90 SkShader::TileMode, const SkMatrix& localMatrix) { in MakeSweep()
[all …]
/external/skia/include/gpu/
DGrSamplerParams.h24 static const GrSamplerParams gParams(SkShader::kClamp_TileMode, kBilerp_FilterMode); in ClampBilerp()
38 GrSamplerParams(SkShader::TileMode tileXAndY, FilterMode filterMode) { in GrSamplerParams()
42 GrSamplerParams(const SkShader::TileMode tileModes[2], FilterMode filterMode) { in GrSamplerParams()
58 this->reset(SkShader::kClamp_TileMode, kNone_FilterMode); in reset()
61 void reset(SkShader::TileMode tileXAndY, FilterMode filterMode) { in reset()
66 void reset(const SkShader::TileMode tileModes[2], FilterMode filterMode) { in reset()
73 fTileModes[0] = fTileModes[1] = SkShader::kClamp_TileMode; in setClampNoFilter()
78 fTileModes[0] = fTileModes[1] = SkShader::kClamp_TileMode; in setClamp()
83 void setTileModeX(const SkShader::TileMode tm) { fTileModes[0] = tm; } in setTileModeX()
84 void setTileModeY(const SkShader::TileMode tm) { fTileModes[1] = tm; } in setTileModeY()
[all …]
/external/skia/tests/
DGradientTest.cpp27 SkShader::kClamp_TileMode)); in test_big_grad()
49 SkShader::TileMode fTileMode;
51 void gradCheck(skiatest::Reporter* reporter, const sk_sp<SkShader>& shader, in gradCheck()
52 SkShader::GradientInfo* info, in gradCheck()
53 SkShader::GradientType gt) const { in gradCheck()
73 sk_sp<SkShader> s(SkShader::MakeEmptyShader()); in none_gradproc()
74 REPORTER_ASSERT(reporter, SkShader::kNone_GradientType == s->asAGradient(nullptr)); in none_gradproc()
78 sk_sp<SkShader> s(new SkColorShader(rec.fColors[0])); in color_gradproc()
79 REPORTER_ASSERT(reporter, SkShader::kColor_GradientType == s->asAGradient(nullptr)); in color_gradproc()
81 SkShader::GradientInfo info; in color_gradproc()
[all …]
DShaderOpacityTest.cpp20 auto shader = SkShader::MakeBitmapShader(bmp, in test_bitmap()
21 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in test_bitmap()
29 shader = SkShader::MakeBitmapShader(bmp, in test_bitmap()
30 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in test_bitmap()
36 shader = SkShader::MakeBitmapShader(bmp, in test_bitmap()
37 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in test_bitmap()
43 shader = SkShader::MakeBitmapShader(bmp, in test_bitmap()
44 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in test_bitmap()
56 SkShader::TileMode mode = SkShader::kClamp_TileMode; in test_gradient()
DShaderTest.cpp18 static void check_isabitmap(skiatest::Reporter* reporter, SkShader* shader, in check_isabitmap()
20 SkShader::TileMode expectedX, SkShader::TileMode expectedY, in check_isabitmap()
22 SkShader::TileMode tileModes[2]; in check_isabitmap()
37 tileModes[0] = tileModes[1] = (SkShader::TileMode)99; in check_isabitmap()
55 const SkShader::TileMode tmx = SkShader::kRepeat_TileMode; in DEF_TEST()
56 const SkShader::TileMode tmy = SkShader::kMirror_TileMode; in DEF_TEST()
58 auto shader0 = SkShader::MakeBitmapShader(bm, tmx, tmy, &localM); in DEF_TEST()
73 SkShader::MakeComposeShader( in DEF_TEST()
74 SkShader::MakeEmptyShader(), in DEF_TEST()
/external/skia/samplecode/
DSampleShaderText.cpp27 SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode)); in makebm()
31 static sk_sp<SkShader> MakeBitmapShader(SkShader::TileMode tx, SkShader::TileMode ty, in MakeBitmapShader()
37 return SkShader::MakeBitmapShader(bmp, tx, ty); in MakeBitmapShader()
57 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm… in MakeLinear()
61 static sk_sp<SkShader> MakeRadial(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm… in MakeRadial()
69 static sk_sp<SkShader> MakeSweep(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm)… in MakeSweep()
76 static sk_sp<SkShader> Make2Conical(const SkPoint pts[2], const GradData& data, SkShader::TileMode … in Make2Conical()
88 typedef sk_sp<SkShader> (*GradMaker)(const SkPoint pts[2], const GradData& data, SkShader::TileMode…
126 SkShader::TileMode tileModes[] = { in onDrawContent()
127 SkShader::kClamp_TileMode, in onDrawContent()
[all …]
DSampleGradients.cpp12 static sk_sp<SkShader> setgrad(const SkRect& r, SkColor c0, SkColor c1) { in setgrad()
15 return SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in setgrad()
65 static sk_sp<SkShader> MakeLinear(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm… in MakeLinear()
69 static sk_sp<SkShader> MakeRadial(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm… in MakeRadial()
77 static sk_sp<SkShader> MakeSweep(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm)… in MakeSweep()
84 static sk_sp<SkShader> Make2Conical(const SkPoint pts[2], const GradData& data, SkShader::TileMode … in Make2Conical()
96 static sk_sp<SkShader> Make2ConicalConcentric(const SkPoint pts[2], const GradData& data, in Make2ConicalConcentric()
97 SkShader::TileMode tm) { in Make2ConicalConcentric()
107 typedef sk_sp<SkShader> (*GradMaker)(const SkPoint pts[2], const GradData& data, SkShader::TileMode…
142 for (int tm = 0; tm < SkShader::kTileModeCount; ++tm) { in onDrawContent()
[all …]
/external/skia/include/core/
DSkShader.h40 class SK_API SkShader : public SkFlattenable {
42 SkShader(const SkMatrix* localMatrix = NULL);
43 ~SkShader() override;
135 Context(const SkShader& shader, const ContextRec&);
205 const SkShader& fShader;
327 const SkShader* fShaderA;
328 const SkShader* fShaderB;
388 sk_sp<SkShader> makeWithLocalMatrix(const SkMatrix&) const;
394 sk_sp<SkShader> makeWithColorFilter(sk_sp<SkColorFilter>) const;
402 static sk_sp<SkShader> MakeEmptyShader();
[all …]

12345678910>>...12