Home
last modified time | relevance | path

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

1234567891011

/external/skia/bench/
DSkLinearBitmapPipelineBench.cpp22 SkShader::TileMode xTile, in CommonBitmapFPBenchmark()
23 SkShader::TileMode yTile) in CommonBitmapFPBenchmark()
32 static SkString tileName(const char* pre, SkShader::TileMode mode) { in tileName()
35 case SkShader::kClamp_TileMode: in tileName()
38 case SkShader::kRepeat_TileMode: in tileName()
41 case SkShader::kMirror_TileMode: in tileName()
106 SkShader::TileMode fXTile;
107 SkShader::TileMode fYTile;
118 SkShader::TileMode xTile, in SkBitmapFPGeneral()
119 SkShader::TileMode yTile) in SkBitmapFPGeneral()
[all …]
DGradientBench.cpp50 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear()
51 SkShader::TileMode tm, float scale, bool force4f) { in MakeLinear()
57 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial()
58 SkShader::TileMode tm, float scale, bool force4f) { in MakeRadial()
68 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep()
69 SkShader::TileMode tm, float scale, bool force4f) { in MakeSweep()
78 static SkShader* MakeConical(const SkPoint pts[2], const GradData& data, in MakeConical()
79 SkShader::TileMode tm, float scale, bool force4f) { in MakeConical()
91 static SkShader* MakeConicalZeroRad(const SkPoint pts[2], const GradData& data, in MakeConicalZeroRad()
92 SkShader::TileMode tm, float scale, bool force4f) { in MakeConicalZeroRad()
[all …]
DTileBench.cpp41 ConstXTileBench(SkShader::TileMode xTile, in ConstXTileBench()
42 SkShader::TileMode yTile, in ConstXTileBench()
56 SkShader* s = SkShader::CreateBitmapShader(bm, xTile, yTile); in ConstXTileBench()
61 static const char* gTileModeStr[SkShader::kTileModeCount] = { "C", "R", "M" }; in ConstXTileBench()
121 DEF_BENCH(return new ConstXTileBench(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode, false, f…
124 DEF_BENCH(return new ConstXTileBench(SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, true, …
126 DEF_BENCH(return new ConstXTileBench(SkShader::kMirror_TileMode, SkShader::kMirror_TileMode, true, …
129 DEF_BENCH(return new ConstXTileBench(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode, false, t…
132 DEF_BENCH(return new ConstXTileBench(SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, true, …
134 DEF_BENCH(return new ConstXTileBench(SkShader::kMirror_TileMode, SkShader::kMirror_TileMode, true, …
/external/skia/src/core/
DSkShader.cpp40 SkShader::SkShader(const SkMatrix* localMatrix) { in SkShader() function in SkShader
51 SkShader::~SkShader() { in ~SkShader()
55 void SkShader::flatten(SkWriteBuffer& buffer) const { in flatten()
64 bool SkShader::computeTotalInverse(const ContextRec& rec, SkMatrix* totalInverse) const { in computeTotalInverse()
76 bool SkShader::asLuminanceColor(SkColor* colorPtr) const { in asLuminanceColor()
88 SkShader::Context* SkShader::createContext(const ContextRec& rec, void* storage) const { in createContext()
95 SkShader::Context* SkShader::onCreateContext(const ContextRec& rec, void*) const { in onCreateContext()
99 size_t SkShader::contextSize(const ContextRec&) const { in contextSize()
103 SkShader::Context::Context(const SkShader& shader, const ContextRec& rec) in Context()
114 SkShader::Context::~Context() {} in ~Context()
[all …]
DSkComposeShader.h23 class SK_API SkComposeShader : public SkShader {
34 SkComposeShader(SkShader* sA, SkShader* sB, SkXfermode* mode = NULL);
46 class ComposeShaderContext : public SkShader::Context {
51 SkShader::Context* contextA, SkShader::Context* contextB);
53 SkShader::Context* getShaderContextA() const { return fShaderContextA; } in getShaderContextA()
54 SkShader::Context* getShaderContextB() const { return fShaderContextB; } in getShaderContextB()
61 SkShader::Context* fShaderContextA;
62 SkShader::Context* fShaderContextB;
64 typedef SkShader::Context INHERITED;
68 SkShader* getShaderA() { return fShaderA; } in getShaderA()
[all …]
DSkPictureShader.h23 class SkPictureShader : public SkShader {
25 static SkShader* Create(const SkPicture*, TileMode, TileMode, const SkMatrix*,
48SkShader* refBitmapShader(const SkMatrix&, const SkMatrix* localMatrix, const int maxTextureSize =…
54 class PictureShaderContext : public SkShader::Context {
57 SkShader* bitmapShader);
67 PictureShaderContext(const SkPictureShader&, const ContextRec&, SkShader* bitmapShader);
69 SkAutoTUnref<SkShader> fBitmapShader;
70 SkShader::Context* fBitmapShaderContext;
73 typedef SkShader::Context INHERITED;
76 typedef SkShader INHERITED;
DSkComposeShader.cpp19 SkComposeShader::SkComposeShader(SkShader* sA, SkShader* sB, SkXfermode* mode) { in SkComposeShader()
57 SkAutoTUnref<SkShader> shaderA(buffer.readShader()); in CreateProc()
58 SkAutoTUnref<SkShader> shaderB(buffer.readShader()); in CreateProc()
78 SkShader::Context* SkComposeShader::onCreateContext(const ContextRec& rec, void* storage) const { in onCreateContext()
97 SkShader::Context* contextA = fShaderA->createContext(newRec, aStorage); in onCreateContext()
98 SkShader::Context* contextB = fShaderB->createContext(newRec, bStorage); in onCreateContext()
110 SkShader::Context* contextA, SkShader::Context* contextB) in ComposeShaderContext()
135 SkShader::Context* shaderContextA = fShaderContextA; in shadeSpan()
136 SkShader::Context* shaderContextB = fShaderContextB; in shadeSpan()
258 SkShader* SkShader::CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode* xfer) { in CreateComposeShader()
[all …]
DSkBitmapProcShader.h19 class SkBitmapProcShader : public SkShader {
37 class BitmapProcShaderContext : public SkShader::Context {
41 BitmapProcShaderContext(const SkShader&, const ContextRec&, SkBitmapProcState*);
53 typedef SkShader::Context INHERITED;
67 static Context* MakeContext(const SkShader&, TileMode tmx, TileMode tmy,
70 typedef SkShader INHERITED;
82 SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader::TileMode,
/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 SkShader* s = SkShader::CreateBitmapShader(getBitmap(), fMode, fMode, &m); in onDraw()
125 DEF_GM( return new GiantBitmapGM(SkShader::kClamp_TileMode, false, false); )
126 DEF_GM( return new GiantBitmapGM(SkShader::kRepeat_TileMode, false, false); )
127 DEF_GM( return new GiantBitmapGM(SkShader::kMirror_TileMode, false, false); )
128 DEF_GM( return new GiantBitmapGM(SkShader::kClamp_TileMode, true, false); )
[all …]
Dcomposeshader.cpp18 static SkShader* make_shader(SkXfermode::Mode mode) { in make_shader()
26 SkAutoTUnref<SkShader> shaderA(SkGradientShader::CreateLinear(pts, colors, nullptr, 2, in make_shader()
27 SkShader::kClamp_TileMode)); in make_shader()
33 SkAutoTUnref<SkShader> shaderB(SkGradientShader::CreateLinear(pts, colors, nullptr, 2, in make_shader()
34 SkShader::kClamp_TileMode)); in make_shader()
38 return SkShader::CreateComposeShader(shaderA, shaderB, xfer); in make_shader()
71 SkShader* fShader;
91 SkAutoTUnref<SkShader> shader0(make_shader(SkXfermode::kDstIn_Mode)); in onDraw()
92 SkAutoTUnref<SkShader> shader1(make_shader(SkXfermode::kSrcOver_Mode)); in onDraw()
93 SkShader* shaders[] = { shader0.get(), shader1.get() }; in onDraw()
[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()
85 SkShader* shader = SkShader::CreateBitmapShader( in onDraw()
119 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kRepeat_TileMode); )
120 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kMirror_TileMode); )
121 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kClamp_TileMode); )
123 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kRepeat_TileMode, true); )
[all …]
Dgradients.cpp43 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, in MakeLinear()
44 SkShader::TileMode tm, const SkMatrix& localMatrix) { in MakeLinear()
49 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, in MakeRadial()
50 SkShader::TileMode tm, const SkMatrix& localMatrix) { in MakeRadial()
58 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, in MakeSweep()
59 SkShader::TileMode, const SkMatrix& localMatrix) { in MakeSweep()
67 static SkShader* Make2Radial(const SkPoint pts[2], const GradData& data, in Make2Radial()
68 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2Radial()
81 static SkShader* Make2Conical(const SkPoint pts[2], const GradData& data, in Make2Conical()
82 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2Conical()
[all …]
Dtilemodes.cpp31 SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode))->unref(); in makebm()
36 SkShader::TileMode tmx, SkShader::TileMode tmy) { in setup()
37 SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy); in setup()
90 …static const SkShader::TileMode gModes[] = { SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode… in onDraw()
159 static SkShader* make_bm(SkShader::TileMode tx, SkShader::TileMode ty) { in make_bm()
162 return SkShader::CreateBitmapShader(bm, tx, ty); in make_bm()
165 static SkShader* make_grad(SkShader::TileMode tx, SkShader::TileMode ty) { in make_grad()
184 typedef SkShader* (*ShaderProc)(SkShader::TileMode, SkShader::TileMode);
209 static const SkShader::TileMode gModes[] = { in onDraw()
210 SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode, SkShader::kMirror_TileMode in onDraw()
Dtilemodes_scaled.cpp31 SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode))->unref(); in makebm()
36 SkShader::TileMode tmx, SkShader::TileMode tmy) { in setup()
37 SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy); in setup()
94 …static const SkShader::TileMode gModes[] = { SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode… in onDraw()
163 static SkShader* make_bm(SkShader::TileMode tx, SkShader::TileMode ty) { in make_bm()
166 return SkShader::CreateBitmapShader(bm, tx, ty); in make_bm()
169 static SkShader* make_grad(SkShader::TileMode tx, SkShader::TileMode ty) { in make_grad()
188 typedef SkShader* (*ShaderProc)(SkShader::TileMode, SkShader::TileMode);
213 static const SkShader::TileMode gModes[] = { in onDraw()
214 SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode, SkShader::kMirror_TileMode in onDraw()
Dgradients_2pt_conical.cpp40 static SkShader* Make2ConicalOutside(const SkPoint pts[2], const GradData& data, in Make2ConicalOutside()
41 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalOutside()
53 static SkShader* Make2ConicalOutsideFlip(const SkPoint pts[2], const GradData& data, in Make2ConicalOutsideFlip()
54 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalOutsideFlip()
66 static SkShader* Make2ConicalInside(const SkPoint pts[2], const GradData& data, in Make2ConicalInside()
67 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalInside()
79 static SkShader* Make2ConicalInsideFlip(const SkPoint pts[2], const GradData& data, in Make2ConicalInsideFlip()
80 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalInsideFlip()
92 static SkShader* Make2ConicalInsideCenter(const SkPoint pts[2], const GradData& data, in Make2ConicalInsideCenter()
93 SkShader::TileMode tm, const SkMatrix& localMatrix) { in Make2ConicalInsideCenter()
[all …]
Dshadertext.cpp28 SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode))->unref(); in makebm()
49 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeLinear()
53 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeRadial()
61 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, SkShader::TileMode) { in MakeSweep()
68 static SkShader* Make2Conical(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in Make2Conical()
80 typedef SkShader* (*GradMaker)(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm);
116 SkShader::TileMode tileModes[] = { in onDraw()
117 SkShader::kClamp_TileMode, in onDraw()
118 SkShader::kRepeat_TileMode, in onDraw()
119 SkShader::kMirror_TileMode in onDraw()
[all …]
/external/skia/tests/
DGradientTest.cpp22SkShader* s = SkGradientShader::CreateLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in test_big_grad()
46 SkShader::TileMode fTileMode;
48 void gradCheck(skiatest::Reporter* reporter, SkShader* shader, in gradCheck()
49 SkShader::GradientInfo* info, in gradCheck()
50 SkShader::GradientType gt) const { in gradCheck()
70 SkAutoTUnref<SkShader> s(SkShader::CreateEmptyShader()); in none_gradproc()
71 REPORTER_ASSERT(reporter, SkShader::kNone_GradientType == s->asAGradient(nullptr)); in none_gradproc()
75 SkAutoTUnref<SkShader> s(new SkColorShader(rec.fColors[0])); in color_gradproc()
76 REPORTER_ASSERT(reporter, SkShader::kColor_GradientType == s->asAGradient(nullptr)); in color_gradproc()
78 SkShader::GradientInfo info; in color_gradproc()
[all …]
DShaderOpacityTest.cpp20 SkShader* shader = SkShader::CreateBitmapShader(bmp, in test_bitmap()
21 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in test_bitmap()
30 shader = SkShader::CreateBitmapShader(bmp, in test_bitmap()
31 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in test_bitmap()
38 shader = SkShader::CreateBitmapShader(bmp, in test_bitmap()
39 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in test_bitmap()
46 shader = SkShader::CreateBitmapShader(bmp, in test_bitmap()
47 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in test_bitmap()
62 SkShader::TileMode mode = SkShader::kClamp_TileMode; in test_gradient()
67 SkShader* grad = SkGradientShader::CreateLinear(pts, colors, pos, count, in test_gradient()
/external/skia/include/gpu/
DGrTextureParams.h24 static const GrTextureParams gParams(SkShader::kClamp_TileMode, kBilerp_FilterMode); in ClampBilerp()
38 GrTextureParams(SkShader::TileMode tileXAndY, FilterMode filterMode) { in GrTextureParams()
42 GrTextureParams(const SkShader::TileMode tileModes[2], FilterMode filterMode) { in GrTextureParams()
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/include/core/
DSkShader.h36 class SK_API SkShader : public SkFlattenable {
38 SkShader(const SkMatrix* localMatrix = NULL);
39 virtual ~SkShader();
123 Context(const SkShader& shader, const ContextRec&);
164 const SkShader& fShader;
276 const SkShader* fShaderA;
277 const SkShader* fShaderB;
327 SkShader* newWithLocalMatrix(const SkMatrix&) const;
333 SkShader* newWithColorFilter(SkColorFilter*) const;
341 static SkShader* CreateEmptyShader();
[all …]
/external/skia/include/effects/
DSkGradientShader.h45 static SkShader* CreateLinear(const SkPoint pts[2],
47 SkShader::TileMode mode,
50 static SkShader* CreateLinear(const SkPoint pts[2], in CreateLinear()
52 SkShader::TileMode mode) { in CreateLinear()
72 static SkShader* CreateRadial(const SkPoint& center, SkScalar radius,
74 SkShader::TileMode mode,
77 static SkShader* CreateRadial(const SkPoint& center, SkScalar radius, in CreateRadial()
79 SkShader::TileMode mode) { in CreateRadial()
89 static SkShader* CreateTwoPointConical(const SkPoint& start, SkScalar startRadius,
92 SkShader::TileMode mode,
[all …]
/external/skia/samplecode/
DSampleShaders.cpp24 static SkShader* make_bitmapfade(const SkBitmap& bm) in make_bitmapfade()
33SkShader* shaderA = SkGradientShader::CreateLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileM… in make_bitmapfade()
35 SkShader* shaderB = SkShader::CreateBitmapShader(bm, in make_bitmapfade()
36 SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); in make_bitmapfade()
40 SkShader* shader = SkShader::CreateComposeShader(shaderB, shaderA, mode); in make_bitmapfade()
50 SkShader* fShader;
63SkShader* shaderA = SkGradientShader::CreateLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileM… in ShaderView()
69SkShader* shaderB = SkGradientShader::CreateLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileM… in ShaderView()
73 fShader = SkShader::CreateComposeShader(shaderA, shaderB, mode); in ShaderView()
DSampleShaderText.cpp27 SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode))->unref(); in makebm()
31 static SkShader* MakeBitmapShader(SkShader::TileMode tx, SkShader::TileMode ty, in MakeBitmapShader()
37 return SkShader::CreateBitmapShader(bmp, tx, ty); in MakeBitmapShader()
57 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeLinear()
61 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeRadial()
69 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeSweep()
76 static SkShader* Make2Conical(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in Make2Conical()
88 typedef SkShader* (*GradMaker)(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm);
126 SkShader::TileMode tileModes[] = { in onDrawContent()
127 SkShader::kClamp_TileMode, in onDrawContent()
[all …]
DSampleGradients.cpp13 static SkShader* setgrad(const SkRect& r, SkColor c0, SkColor c1) { in setgrad()
16 return SkGradientShader::CreateLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); in setgrad()
66 static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeLinear()
70 static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeRadial()
78 static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in MakeSweep()
85 static SkShader* Make2Conical(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm) { in Make2Conical()
97 static SkShader* Make2ConicalConcentric(const SkPoint pts[2], const GradData& data, in Make2ConicalConcentric()
98 SkShader::TileMode tm) { in Make2ConicalConcentric()
108 typedef SkShader* (*GradMaker)(const SkPoint pts[2], const GradData& data, SkShader::TileMode tm);
144 for (int tm = 0; tm < SkShader::kTileModeCount; ++tm) { in onDrawContent()
[all …]
/external/skia/src/pdf/
DSkPDFShader.cpp126 static void gradientFunctionCode(const SkShader::GradientInfo& info, in gradientFunctionCode()
188 static void tileModeCode(SkShader::TileMode mode, SkString* result) { in tileModeCode()
189 if (mode == SkShader::kRepeat_TileMode) { in tileModeCode()
195 if (mode == SkShader::kMirror_TileMode) { in tileModeCode()
260 static SkString linearCode(const SkShader::GradientInfo& info, in linearCode()
273 static SkString radialCode(const SkShader::GradientInfo& info, in radialCode()
297 static SkString twoPointConicalCode(const SkShader::GradientInfo& info, in twoPointConicalCode()
410 static SkString sweepCode(const SkShader::GradientInfo& info, in sweepCode()
427 SkShader::GradientType fType;
428 SkShader::GradientInfo fInfo;
[all …]

1234567891011