Home
last modified time | relevance | path

Searched refs:SkImageFilter (Results 1 – 25 of 131) sorted by relevance

123456

/external/skia/gm/
Dtestimagefilters.cpp24 static SkImageFilter* make0() { return SkDownSampleImageFilter::Create(SK_Scalar1 / 5); } in make0()
25 static SkImageFilter* make1() { return SkOffsetImageFilter::Create(SkIntToScalar(16), SkIntToScalar… in make1()
26 static SkImageFilter* make2() { in make2()
32 static SkImageFilter* make3() { in make3()
36 static SkImageFilter* make4() { in make4()
37 SkImageFilter* outer = SkOffsetImageFilter::Create(SkIntToScalar(16), SkIntToScalar(16)); in make4()
38 SkImageFilter* inner = SkDownSampleImageFilter::Create(SK_Scalar1 / 5); in make4()
43 static SkImageFilter* make5() { in make5()
44 SkImageFilter* first = SkOffsetImageFilter::Create(SkIntToScalar(16), SkIntToScalar(16)); in make5()
45 SkImageFilter* second = SkDownSampleImageFilter::Create(SK_Scalar1 / 5); in make5()
[all …]
Dimagefiltersgraph.cpp28 class SimpleOffsetFilter : public SkImageFilter {
38 static SkImageFilter* Create(SkScalar dx, SkScalar dy, SkImageFilter* input) { in Create()
77 SimpleOffsetFilter(SkScalar dx, SkScalar dy, SkImageFilter* input) in SimpleOffsetFilter()
78 : SkImageFilter(1, &input), fDX(dx), fDY(dy) {} in SimpleOffsetFilter()
82 typedef SkImageFilter INHERITED;
121 SkAutoTUnref<SkImageFilter> bitmapSource(SkImageSource::Create(fImage)); in onDraw()
124 SkAutoTUnref<SkImageFilter> blur(SkBlurImageFilter::Create(4.0f, 4.0f, bitmapSource)); in onDraw()
125 SkAutoTUnref<SkImageFilter> erode(SkErodeImageFilter::Create(4, 4, blur)); in onDraw()
126 SkAutoTUnref<SkImageFilter> color(SkColorFilterImageFilter::Create(cf, erode)); in onDraw()
127 SkAutoTUnref<SkImageFilter> merge(SkMergeImageFilter::Create(blur, color)); in onDraw()
[all …]
Dcolorfilterimagefilter.cpp90 static SkImageFilter* make_blur(float amount, SkImageFilter* input = nullptr) { in make_blur()
94 static SkImageFilter* make_brightness(float amount, SkImageFilter* input = nullptr) { in make_brightness()
99 static SkImageFilter* make_grayscale(SkImageFilter* input = nullptr) { in make_grayscale()
104 static SkImageFilter* make_mode_blue(SkImageFilter* input = nullptr) { in make_mode_blue()
127 SkAutoTUnref<SkImageFilter> dim(make_brightness(-brightness));
128 SkAutoTUnref<SkImageFilter> bright(make_brightness(brightness, dim));
136 SkAutoTUnref<SkImageFilter> brightness(make_brightness(0.9f));
137 SkAutoTUnref<SkImageFilter> grayscale(make_grayscale(brightness));
143 SkAutoTUnref<SkImageFilter> grayscale(make_grayscale());
144 SkAutoTUnref<SkImageFilter> brightness(make_brightness(0.9f, grayscale));
[all …]
Dimagefilterscropped.cpp23 static void draw_paint(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { in draw_paint()
33 static void draw_path(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { in draw_path()
41 static void draw_text(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { in draw_text()
52 static void draw_bitmap(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { in draw_bitmap()
114 void (*drawProc[])(SkCanvas*, const SkRect&, SkImageFilter*) = { in onDraw()
120SkImageFilter::CropRect cropRect(SkRect::Make(SkIRect::MakeXYWH(10, 10, 44, 44)), SkImageFilter::C… in onDraw()
121SkImageFilter::CropRect bogusRect(SkRect::Make(SkIRect::MakeXYWH(-100, -100, 10, 10)), SkImageFilt… in onDraw()
123 SkAutoTUnref<SkImageFilter> offset(SkOffsetImageFilter::Create( in onDraw()
126 … SkAutoTUnref<SkImageFilter> cfOffset(SkColorFilterImageFilter::Create(cf.get(), offset.get())); in onDraw()
128 SkAutoTUnref<SkImageFilter> erodeX(SkErodeImageFilter::Create(8, 0, nullptr, &cropRect)); in onDraw()
[all …]
Ddropshadowimagefilter.cpp16 static void draw_paint(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { in draw_paint()
26 static void draw_path(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { in draw_path()
37 static void draw_text(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { in draw_text()
51 static void draw_bitmap(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { in draw_bitmap()
92 void (*drawProc[])(SkCanvas*, const SkRect&, SkImageFilter*) = { in onDraw()
98 SkAutoTUnref<SkImageFilter> cfif(SkColorFilterImageFilter::Create(cf.get())); in onDraw()
99 SkImageFilter::CropRect cropRect(SkRect::Make(SkIRect::MakeXYWH(10, 10, 44, 44)), in onDraw()
100 SkImageFilter::CropRect::kHasAll_CropEdge); in onDraw()
101 SkImageFilter::CropRect bogusRect(SkRect::Make(SkIRect::MakeXYWH(-100, -100, 10, 10)), in onDraw()
102 SkImageFilter::CropRect::kHasAll_CropEdge); in onDraw()
[all …]
Dimagefiltersbase.cpp19 class FailImageFilter : public SkImageFilter {
43 typedef SkImageFilter INHERITED;
60 class IdentityImageFilter : public SkImageFilter {
70 static IdentityImageFilter* Create(SkImageFilter* input = nullptr) { in Create()
77 IdentityImageFilter(SkImageFilter* input) : INHERITED(1, &input) {} in IdentityImageFilter()
87 typedef SkImageFilter INHERITED;
106 static void draw_paint(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { in draw_paint()
116 static void draw_line(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { in draw_line()
124 static void draw_rect(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { in draw_rect()
133 static void draw_path(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { in draw_path()
[all …]
/external/skia/src/core/
DSkImageFilter.cpp39 void SkImageFilter::CropRect::toString(SkString* str) const { in toString()
69 void SkImageFilter::CropRect::applyTo(const SkIRect& imageBounds, in applyTo()
107 SkImageFilter::Common::~Common() { in ~Common()
113 void SkImageFilter::Common::allocInputs(int count) { in allocInputs()
114 const size_t size = count * sizeof(SkImageFilter*); in allocInputs()
119 void SkImageFilter::Common::detachInputs(SkImageFilter** inputs) { in detachInputs()
120 const size_t size = fInputs.count() * sizeof(SkImageFilter*); in detachInputs()
125 bool SkImageFilter::Common::unflatten(SkReadBuffer& buffer, int expectedCount) { in unflatten()
160 SkImageFilter::SkImageFilter(int inputCount, SkImageFilter** inputs, const CropRect* cropRect) in SkImageFilter() function in SkImageFilter
162 fInputs(new SkImageFilter*[inputCount]), in SkImageFilter()
[all …]
DSkSpecialSurface.h56 static SkSpecialSurface* NewFromTexture(SkImageFilter::Proxy* proxy,
64 static SkSpecialSurface* NewRenderTarget(SkImageFilter::Proxy* proxy,
71 static SkSpecialSurface* NewFromBitmap(SkImageFilter::Proxy* proxy,
82 static SkSpecialSurface* NewRaster(SkImageFilter::Proxy* proxy,
86 SkSpecialSurface(SkImageFilter::Proxy*, const SkIRect& subset, const SkSurfaceProps*);
93 SkImageFilter::Proxy* proxy() const { return fProxy; } in proxy()
100 SkImageFilter::Proxy* fProxy;
DSkSpecialImage.h56 static SkSpecialImage* NewFromRaster(SkImageFilter::Proxy*,
59 static SkSpecialImage* NewFromGpu(SkImageFilter::Proxy*,
72 static SkSpecialImage* internal_fromBM(SkImageFilter::Proxy*, const SkBitmap&);
73 SkImageFilter::Proxy* internal_getProxy();
76 SkSpecialImage(SkImageFilter::Proxy* proxy, const SkIRect& subset, uint32_t uniqueID) in SkSpecialImage()
106 SkImageFilter::Proxy* proxy() const { return fProxy; } in proxy()
113 SkImageFilter::Proxy* fProxy;
DSkSpecialSurface.cpp16 SkSpecialSurface_Base(SkImageFilter::Proxy* proxy, in SkSpecialSurface_Base()
44 SkSpecialSurface::SkSpecialSurface(SkImageFilter::Proxy* proxy, in SkSpecialSurface()
69 SkSpecialSurface_Raster(SkImageFilter::Proxy* proxy, in SkSpecialSurface_Raster()
94 SkSpecialSurface* SkSpecialSurface::NewFromBitmap(SkImageFilter::Proxy* proxy, in NewFromBitmap()
100 SkSpecialSurface* SkSpecialSurface::NewRaster(SkImageFilter::Proxy* proxy, in NewRaster()
120 SkSpecialSurface_Gpu(SkImageFilter::Proxy* proxy, in SkSpecialSurface_Gpu()
151 SkSpecialSurface* SkSpecialSurface::NewFromTexture(SkImageFilter::Proxy* proxy, in NewFromTexture()
162 SkSpecialSurface* SkSpecialSurface::NewRenderTarget(SkImageFilter::Proxy* proxy, in NewRenderTarget()
182 SkSpecialSurface* SkSpecialSurface::NewFromTexture(SkImageFilter::Proxy* proxy, in NewFromTexture()
189 SkSpecialSurface* SkSpecialSurface::NewRenderTarget(SkImageFilter::Proxy* proxy, in NewRenderTarget()
DSkLocalMatrixImageFilter.h19 class SkLocalMatrixImageFilter : public SkImageFilter {
21 static SkImageFilter* Create(const SkMatrix& localM, SkImageFilter* input);
34 SkLocalMatrixImageFilter(const SkMatrix& localM, SkImageFilter* input);
38 typedef SkImageFilter INHERITED;
/external/skia/include/effects/
DSkLightingImageFilter.h18 class SK_API SkLightingImageFilter : public SkImageFilter {
20 static SkImageFilter* CreateDistantLitDiffuse(const SkPoint3& direction,
22 SkImageFilter* input = NULL, const CropRect* cropRect = NULL);
23 static SkImageFilter* CreatePointLitDiffuse(const SkPoint3& location,
25 SkImageFilter* input = NULL, const CropRect* cropRect = NULL);
26 static SkImageFilter* CreateSpotLitDiffuse(const SkPoint3& location,
29 SkImageFilter* input = NULL, const CropRect* cropRect = NULL);
30 static SkImageFilter* CreateDistantLitSpecular(const SkPoint3& direction,
32 SkScalar shininess, SkImageFilter* input = NULL, const CropRect* cropRect = NULL);
33 static SkImageFilter* CreatePointLitSpecular(const SkPoint3& location,
[all …]
DSkMergeImageFilter.h15 class SK_API SkMergeImageFilter : public SkImageFilter {
19 static SkImageFilter* Create(SkImageFilter* first, SkImageFilter* second,
22 SkImageFilter* inputs[2] = { first, second };
27 static SkImageFilter* Create(SkImageFilter* filters[], int count,
42 SkMergeImageFilter(SkImageFilter* filters[], int count, const SkXfermode::Mode modes[],
54 typedef SkImageFilter INHERITED;
DSkDisplacementMapEffect.h14 class SK_API SkDisplacementMapEffect : public SkImageFilter {
26 static SkImageFilter* Create(ChannelSelectorType xChannelSelector,
28 SkScalar scale, SkImageFilter* displacement,
29 SkImageFilter* color = NULL,
56 SkScalar scale, SkImageFilter* inputs[2],
64 typedef SkImageFilter INHERITED;
65 const SkImageFilter* getDisplacementInput() const { return getInput(0); } in getDisplacementInput()
66 const SkImageFilter* getColorInput() const { return getInput(1); } in getColorInput()
DSkComposeImageFilter.h13 class SK_API SkComposeImageFilter : public SkImageFilter {
17 static SkImageFilter* Create(SkImageFilter* outer, SkImageFilter* inner) { in Create()
24 SkImageFilter* inputs[2] = { outer, inner }; in Create()
33 explicit SkComposeImageFilter(SkImageFilter* inputs[2]) : INHERITED(2, inputs) { in SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS()
42 typedef SkImageFilter INHERITED;
DSkXfermodeImageFilter.h16 class SK_API SkXfermodeImageFilter : public SkImageFilter {
24 static SkImageFilter* Create(SkXfermode* mode, SkImageFilter* background,
25 SkImageFilter* foreground = NULL,
27 SkImageFilter* inputs[2] = { background, foreground };
46 SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* inputs[2],
52 typedef SkImageFilter INHERITED;
DSkMorphologyImageFilter.h16 class SK_API SkMorphologyImageFilter : public SkImageFilter {
33 SkMorphologyImageFilter(int radiusX, int radiusY, SkImageFilter* input,
50 typedef SkImageFilter INHERITED;
55 static SkImageFilter* Create(int radiusX, int radiusY, SkImageFilter* input = NULL,
75 SkDilateImageFilter(int radiusX, int radiusY, SkImageFilter* input, const CropRect* cropRect) in SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS()
83 static SkImageFilter* Create(int radiusX, int radiusY,
84 SkImageFilter* input = NULL,
104 SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input, const CropRect* cropRect) in SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS()
DSkMagnifierImageFilter.h15 class SK_API SkMagnifierImageFilter : public SkImageFilter {
17 static SkImageFilter* Create(const SkRect& src, SkScalar inset, SkImageFilter* input = NULL);
23 SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset, SkImageFilter* input);
36 typedef SkImageFilter INHERITED;
DSkColorFilterImageFilter.h15 class SK_API SkColorFilterImageFilter : public SkImageFilter {
17 static SkImageFilter* Create(SkColorFilter* cf, SkImageFilter* input = NULL,
32 SkImageFilter* input,
38 typedef SkImageFilter INHERITED;
DSkTestImageFilters.h15 class SK_API SkDownSampleImageFilter : public SkImageFilter {
17 static SkImageFilter* Create(SkScalar scale, SkImageFilter* input = NULL) {
37 SkDownSampleImageFilter(SkScalar scale, SkImageFilter* input) in SkDownSampleImageFilter()
42 typedef SkImageFilter INHERITED;
DSkOffsetImageFilter.h14 class SK_API SkOffsetImageFilter : public SkImageFilter {
16 static SkImageFilter* Create(SkScalar dx, SkScalar dy, SkImageFilter* input = NULL,
36 SkOffsetImageFilter(SkScalar dx, SkScalar dy, SkImageFilter* input, const CropRect*);
40 typedef SkImageFilter INHERITED;
/external/skia/tests/
DImageFilterTest.cpp50 class MatrixTestImageFilter : public SkImageFilter {
53 : SkImageFilter(0, nullptr), fReporter(reporter), fExpectedMatrix(expectedMatrix) { in MatrixTestImageFilter()
76 typedef SkImageFilter INHERITED;
131 static SkImageFilter* make_scale(float amount, SkImageFilter* input = nullptr) { in make_scale()
141 static SkImageFilter* make_grayscale(SkImageFilter* input, const SkImageFilter::CropRect* cropRect)… in make_grayscale()
152 static SkImageFilter* make_blue(SkImageFilter* input, const SkImageFilter::CropRect* cropRect) { in make_blue()
161 SkAutoTUnref<SkImageFilter> halfBrightness(make_scale(0.5f)); in DEF_TEST()
162 SkAutoTUnref<SkImageFilter> quarterBrightness(make_scale(0.5f, halfBrightness)); in DEF_TEST()
173 SkAutoTUnref<SkImageFilter> doubleBrightness(make_scale(2.0f)); in DEF_TEST()
174 SkAutoTUnref<SkImageFilter> halfBrightness(make_scale(0.5f, doubleBrightness)); in DEF_TEST()
[all …]
DImageFilterCacheTest.cpp33 SkAutoTUnref<SkImageFilter::Cache> cache(SkImageFilter::Cache::Create(kCacheSize)); in test_find_existing()
36 SkImageFilter::Cache::Key key1(0, SkMatrix::I(), clip, image->uniqueID(), image->subset()); in test_find_existing()
37 SkImageFilter::Cache::Key key2(0, SkMatrix::I(), clip, subset->uniqueID(), subset->subset()); in test_find_existing()
57 SkAutoTUnref<SkImageFilter::Cache> cache(SkImageFilter::Cache::Create(kCacheSize)); in test_dont_find_if_diff_key()
61 SkImageFilter::Cache::Key key0(0, SkMatrix::I(), clip1, image->uniqueID(), image->subset()); in test_dont_find_if_diff_key()
62 SkImageFilter::Cache::Key key1(1, SkMatrix::I(), clip1, image->uniqueID(), image->subset()); in test_dont_find_if_diff_key()
63 SkImageFilter::Cache::Key key2(0, SkMatrix::MakeTrans(5, 5), clip1, in test_dont_find_if_diff_key()
65 SkImageFilter::Cache::Key key3(0, SkMatrix::I(), clip2, image->uniqueID(), image->subset()); in test_dont_find_if_diff_key()
66 SkImageFilter::Cache::Key key4(0, SkMatrix::I(), clip1, subset->uniqueID(), subset->subset()); in test_dont_find_if_diff_key()
82 SkAutoTUnref<SkImageFilter::Cache> cache(SkImageFilter::Cache::Create(kCacheSize)); in test_internal_purge()
[all …]
/external/skia/include/core/
DSkImageFilter.h35 class SK_API SkImageFilter : public SkFlattenable {
117 virtual bool filterImage(const SkImageFilter*, const SkBitmap& src,
118 const SkImageFilter::Context&,
131 bool filterImage(const SkImageFilter*, const SkBitmap& src, const SkImageFilter::Context&,
227 SkImageFilter* getInput(int i) const { in getInput()
257 SkImageFilter* newWithLocalMatrix(const SkMatrix& matrix) const;
262 static SkImageFilter* CreateMatrixFilter(const SkMatrix& matrix,
264 SkImageFilter* input = NULL);
273 bool filterInputGPUDeprecated(int index, SkImageFilter::Proxy* proxy,
279 SK_DEFINE_FLATTENABLE_TYPE(SkImageFilter) in SK_DEFINE_FLATTENABLE_TYPE() argument
[all …]
/external/skia/bench/
DColorFilterBench.cpp31 static SkImageFilter* make_brightness(float amount, SkImageFilter* input = nullptr) { in make_brightness()
41 static SkImageFilter* make_grayscale(SkImageFilter* input = nullptr) { in make_grayscale()
52 static SkImageFilter* make_mode_blue(SkImageFilter* input = nullptr) { in make_mode_blue()
84 SkAutoTUnref<SkImageFilter> dim(make_brightness(-brightness)); in onDraw()
85 SkAutoTUnref<SkImageFilter> bright(make_brightness(brightness, dim)); in onDraw()
112 SkAutoTUnref<SkImageFilter> brightness(make_brightness(0.9f)); in onDraw()
113 SkAutoTUnref<SkImageFilter> grayscale(make_grayscale(brightness)); in onDraw()
139 SkAutoTUnref<SkImageFilter> grayscale(make_grayscale()); in onDraw()
140 SkAutoTUnref<SkImageFilter> brightness(make_brightness(0.9f, grayscale)); in onDraw()
166 SkAutoTUnref<SkImageFilter> blue(make_mode_blue()); in onDraw()
[all …]

123456