Home
last modified time | relevance | path

Searched refs:SkIRect (Results 1 – 25 of 646) sorted by relevance

12345678910>>...26

/external/skia/src/core/
DSkImageFilter.cpp58 SkIRect SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm, in filterBounds()
59 MapDirection direction, const SkIRect* inputRect) const { in filterBounds()
65 skif::LayerSpace<SkIRect> targetOutput(src); in filterBounds()
67 skif::LayerSpace<SkIRect> outputCrop = mapping.paramToLayer( in filterBounds()
73 return SkIRect::MakeEmpty(); in filterBounds()
76 skif::LayerSpace<SkIRect> content(inputRect ? *inputRect : src); in filterBounds()
77 return SkIRect(as_IFB(this)->onGetInputLayerBounds(mapping, targetOutput, content)); in filterBounds()
80 skif::LayerSpace<SkIRect> content(src); in filterBounds()
81 skif::LayerSpace<SkIRect> output = as_IFB(this)->onGetOutputLayerBounds(mapping, content); in filterBounds()
83 SkIRect dst; in filterBounds()
[all …]
DSkImageFilter_Base.h71 skif::LayerSpace<SkIRect> getInputBounds(
72 const skif::Mapping& mapping, const skif::DeviceSpace<SkIRect>& desiredOutput,
99 skif::DeviceSpace<SkIRect> getOutputBounds(
158 void applyTo(const SkIRect& imageBounds, const SkMatrix& matrix, bool embiggen,
159 SkIRect* cropped) const;
213 virtual SkIRect onFilterBounds(const SkIRect&, const SkMatrix& ctm,
214 MapDirection, const SkIRect* inputRect) const;
215 virtual SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix& ctm,
216 MapDirection, const SkIRect* inputRect) const;
226 skif::LayerSpace<SkIRect> visitInputLayerBounds(
[all …]
DSkRectPriv.h18 static SkIRect MakeILarge() { in MakeILarge()
25 static SkIRect MakeILargestInverted() { in MakeILargestInverted()
57 static bool Is16Bit(const SkIRect& r) { in Is16Bit()
75 static bool Subtract(const SkIRect& a, const SkIRect& b, SkIRect* out);
84 static SkIRect Subtract(const SkIRect& a, const SkIRect& b) { in Subtract()
85 SkIRect diff; in Subtract()
DSkSpecialImage.h67 const SkIRect& subset() const { return fSubset; } in subset()
92 const SkIRect& subset,
95 static sk_sp<SkSpecialImage> MakeFromRaster(const SkIRect& subset,
98 static sk_sp<SkSpecialImage> CopyFromRaster(const SkIRect& subset,
103 const SkIRect& subset,
112 const SkIRect& subset,
144 sk_sp<SkSpecialImage> makeSubset(const SkIRect& subset) const { in makeSubset()
145 SkIRect absolute = subset.makeOffset(this->subset().topLeft()); in makeSubset()
161 sk_sp<SkImage> asImage(const SkIRect* subset = nullptr) const;
207 SkSpecialImage(const SkIRect& subset,
[all …]
/external/skia/tests/
DRegionTest.cpp26 static void Union(SkRegion* rgn, const SkIRect& rect) { in Union()
38 Union(&r, SkIRect::MakeXYWH(0, 0, 1, 1)); in test_fromchrome()
39 TEST_NO_INTERSECT(r, SkIRect::MakeXYWH(0, 0, 0, 0)); in test_fromchrome()
40 TEST_INTERSECT(r, SkIRect::MakeXYWH(0, 0, 2, 2)); in test_fromchrome()
41 TEST_INTERSECT(r, SkIRect::MakeXYWH(-1, 0, 2, 2)); in test_fromchrome()
42 TEST_INTERSECT(r, SkIRect::MakeXYWH(-1, -1, 2, 2)); in test_fromchrome()
43 TEST_INTERSECT(r, SkIRect::MakeXYWH(0, -1, 2, 2)); in test_fromchrome()
44 TEST_INTERSECT(r, SkIRect::MakeXYWH(-1, -1, 3, 3)); in test_fromchrome()
46 Union(&r, SkIRect::MakeXYWH(0, 0, 3, 3)); in test_fromchrome()
47 Union(&r, SkIRect::MakeXYWH(10, 0, 3, 3)); in test_fromchrome()
[all …]
DImageFilterTest.cpp155 FilterList(sk_sp<SkImageFilter> input, const SkIRect* cropRect = nullptr) { in FilterList()
202 SkIRect leftSideCropRect = SkIRect::MakeXYWH(0, 0, 32, 64); in FilterList()
205 SkIRect rightSideCropRect = SkIRect::MakeXYWH(32, 0, 32, 64); in FilterList()
245 recordingCanvas->drawRect(SkRect::Make(SkIRect::MakeXYWH(10, 10, 30, 20)), greenPaint); in FilterList()
287 FixedBoundsImageFilter(const SkIRect& bounds) in FixedBoundsImageFilter()
298 SkIRect onFilterBounds(const SkIRect&, const SkMatrix&, in onFilterBounds() argument
299 MapDirection, const SkIRect*) const override { in onFilterBounds()
303 SkIRect fBounds;
355 const SkIRect* cropRect) { in make_grayscale()
366 static sk_sp<SkImageFilter> make_blue(sk_sp<SkImageFilter> input, const SkIRect* cropRect) { in make_blue()
[all …]
DImageFilterCacheTest.cpp76 SkIRect clip = SkIRect::MakeWH(100, 100); in test_find_existing()
87 SkIRect::MakeXYWH(offset.fX, offset.fY, image->width(), image->height()) == in test_find_existing()
88 SkIRect(foundImage.layerBounds())); in test_find_existing()
101 SkIRect clip1 = SkIRect::MakeWH(100, 100); in test_dont_find_if_diff_key()
102 SkIRect clip2 = SkIRect::MakeWH(200, 200); in test_dont_find_if_diff_key()
127 SkIRect clip = SkIRect::MakeWH(100, 100); in test_internal_purge()
154 SkIRect clip = SkIRect::MakeWH(100, 100); in test_explicit_purging()
187 const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize); in DEF_TEST()
191 const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize); in DEF_TEST()
207 const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize); in test_image_backed()
[all …]
DReadPixelsTest.cpp44 static const SkIRect DEV_RECT = SkIRect::MakeWH(DEV_W, DEV_H);
199 SkIRect srcRect = SkIRect::MakeXYWH(x, y, bw, bh); in check_read()
200 SkIRect clippedSrcRect = DEV_RECT; in check_read()
276 static void init_bitmap(SkBitmap* bitmap, const SkIRect& rect, TightRowBytes tightRB, in init_bitmap()
297 const SkIRect gReadPixelsTestRects[] = {
301 SkIRect::MakeLTRB(-10, -10, DEV_W + 10, DEV_H + 10),
303 SkIRect::MakeLTRB(DEV_W / 4, DEV_H / 4, 3 * DEV_W / 4, 3 * DEV_H / 4),
305 SkIRect::MakeLTRB(-10, -10, -1, -1),
307 SkIRect::MakeLTRB(-10, -10, 0, 0),
309 SkIRect::MakeLTRB(-10, -10, DEV_W / 4, DEV_H / 4),
[all …]
DRectTest.cpp183 SkIRect fA; in DEF_TEST()
184 SkIRect fB; in DEF_TEST()
185 SkIRect fExpected; in DEF_TEST()
189 SkIRect a = SkIRect::MakeLTRB(2, 3, 12, 15); in DEF_TEST()
192 {a, a.makeOutset(2, 2), SkIRect::MakeEmpty(), true}, in DEF_TEST()
196 {SkIRect::MakeEmpty(), a, SkIRect::MakeEmpty(), true}, in DEF_TEST()
198 {a, SkIRect::MakeEmpty(), a, true}, in DEF_TEST()
200 {SkIRect::MakeEmpty(), SkIRect::MakeEmpty(), SkIRect::MakeEmpty(), true}, in DEF_TEST()
234 SkIRect difference; in DEF_TEST()
257 SkIRect reallyBig = SkIRect::MakeLTRB(-INT_MAX + 1000, 0, INT_MAX - 1000, 100); in DEF_TEST()
[all …]
/external/skia/include/core/
DSkRegion.h60 explicit SkRegion(const SkIRect& rect);
159 const SkIRect& getBounds() const { return fBounds; } in getBounds()
202 bool setRect(const SkIRect& rect);
215 bool setRects(const SkIRect rects[], int count);
255 bool intersects(const SkIRect& rect) const;
286 bool contains(const SkIRect& other) const;
304 bool quickContains(const SkIRect& r) const { in quickContains()
321 bool quickReject(const SkIRect& rect) const { in quickReject()
323 !SkIRect::Intersects(fBounds, rect); in quickReject()
335 !SkIRect::Intersects(fBounds, rgn.fBounds); in quickReject()
[all …]
DSkRect.h31 struct SK_API SkIRect { struct
44 static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeEmpty() { in MakeEmpty() argument
45 return SkIRect{0, 0, 0, 0}; in MakeEmpty()
55 static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeWH(int32_t w, int32_t h) { in MakeWH() argument
56 return SkIRect{0, 0, w, h}; in MakeWH()
65 static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeSize(const SkISize& size) { in MakeSize() argument
66 return SkIRect{0, 0, size.fWidth, size.fHeight}; in MakeSize()
77 static constexpr SkIRect SK_WARN_UNUSED_RESULT MakePtSize(SkIPoint pt, SkISize size) { in MakePtSize() argument
90 static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeLTRB(int32_t l, int32_t t, in MakeLTRB() argument
92 return SkIRect{l, t, r, b}; in MakeLTRB()
[all …]
/external/skia/src/effects/imagefilters/
DSkCropImageFilter.cpp43 skif::LayerSpace<SkIRect> onGetInputLayerBounds(
45 const skif::LayerSpace<SkIRect>& desiredOutput,
46 const skif::LayerSpace<SkIRect>& contentBounds,
49 skif::LayerSpace<SkIRect> onGetOutputLayerBounds(
51 const skif::LayerSpace<SkIRect>& contentBounds) const override;
56 skif::LayerSpace<SkIRect> cropRect(const skif::Mapping& mapping) const { in cropRect()
93 skif::LayerSpace<SkIRect> cropBounds = this->cropRect(context.mapping()); in onFilterImage()
112 skif::LayerSpace<SkIRect> SkCropImageFilter::onGetInputLayerBounds( in onGetInputLayerBounds()
114 const skif::LayerSpace<SkIRect>& desiredOutput, in onGetInputLayerBounds()
115 const skif::LayerSpace<SkIRect>& contentBounds, in onGetInputLayerBounds()
[all …]
DSkMatrixConvolutionImageFilter.cpp82 SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix& ctm,
83 MapDirection, const SkIRect* inputRect) const override;
102 SkIRect rect,
103 const SkIRect& bounds) const;
108 const SkIRect& rect,
109 const SkIRect& bounds) const;
113 const SkIRect& rect,
114 const SkIRect& bounds) const;
118 const SkIRect& rect,
119 const SkIRect& bounds) const;
[all …]
DSkTileImageFilter.cpp43 SkIRect onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
44 MapDirection, const SkIRect* inputRect) const override;
45 SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix& ctm,
46 MapDirection, const SkIRect* inputRect) const override;
120 const SkIRect dstIRect = skif::RoundOut(dstRect); in onFilterImage()
127 SkIRect srcIRect = skif::RoundOut(srcRect); in onFilterImage()
129 const SkIRect inputBounds = SkIRect::MakeWH(input->width(), input->height()); in onFilterImage()
131 if (!SkIRect::Intersects(srcIRect, inputBounds)) { in onFilterImage()
183 SkIRect SkTileImageFilter::onFilterNodeBounds( in onFilterNodeBounds()
184 const SkIRect& src, const SkMatrix& ctm, MapDirection dir, const SkIRect* inputRect) const { in onFilterNodeBounds()
[all …]
DSkArithmeticImageFilter.cpp73 SkIRect onFilterBounds(const SkIRect&, const SkMatrix& ctm,
74 MapDirection, const SkIRect* inputRect) const override;
82 const SkIRect& bounds) const;
87 void drawForeground(SkCanvas* canvas, SkSpecialImage*, const SkIRect&) const;
199 SkIRect dstR = SkIRect::MakeWH(dst->width(), dst->height()); in intersect()
200 SkIRect srcR = SkIRect::MakeXYWH(srcDx, srcDy, src->width(), src->height()); in intersect()
201 SkIRect sect; in intersect()
222 SkIRect foregroundBounds = SkIRect::MakeEmpty(); in onFilterImage()
224 foregroundBounds = SkIRect::MakeXYWH(foregroundOffset.x(), foregroundOffset.y(), in onFilterImage()
228 SkIRect srcBounds = SkIRect::MakeEmpty(); in onFilterImage()
[all …]
DSkBlendImageFilter.cpp68 SkIRect onFilterBounds(const SkIRect&, const SkMatrix& ctm,
69 MapDirection, const SkIRect* inputRect) const override;
77 const SkIRect& bounds) const;
82 void drawForeground(SkCanvas* canvas, SkSpecialImage*, const SkIRect&) const;
159 SkIRect foregroundBounds = SkIRect::MakeEmpty(); in onFilterImage()
161 foregroundBounds = SkIRect::MakeXYWH(foregroundOffset.x(), foregroundOffset.y(), in onFilterImage()
165 SkIRect srcBounds = SkIRect::MakeEmpty(); in onFilterImage()
167 srcBounds = SkIRect::MakeXYWH(backgroundOffset.x(), backgroundOffset.y(), in onFilterImage()
176 SkIRect bounds; in onFilterImage()
215 SkIRect SkBlendImageFilter::onFilterBounds(const SkIRect& src, in onFilterBounds()
[all …]
DSkMatrixTransformImageFilter.cpp59 skif::LayerSpace<SkIRect> onGetInputLayerBounds(
61 const skif::LayerSpace<SkIRect>& desiredOutput,
62 const skif::LayerSpace<SkIRect>& contentBounds,
65 skif::LayerSpace<SkIRect> onGetOutputLayerBounds(
67 const skif::LayerSpace<SkIRect>& contentBounds) const override;
151 skif::LayerSpace<SkIRect> SkMatrixTransformImageFilter::onGetInputLayerBounds( in onGetInputLayerBounds()
153 const skif::LayerSpace<SkIRect>& desiredOutput, in onGetInputLayerBounds()
154 const skif::LayerSpace<SkIRect>& contentBounds, in onGetInputLayerBounds()
160 return skif::LayerSpace<SkIRect>::Empty(); in onGetInputLayerBounds()
162 skif::LayerSpace<SkIRect> requiredInput = inverse.mapRect(desiredOutput); in onGetInputLayerBounds()
[all …]
/external/skia/gm/
Dimagemakewithfilter.cpp40 static void show_bounds(SkCanvas* canvas, const SkIRect* clip, const SkIRect* inSubset, in show_bounds()
41 const SkIRect* outSubset) { in show_bounds()
42 const SkIRect* rects[] { clip, inSubset, outSubset }; in show_bounds()
60 typedef sk_sp<SkImageFilter> (*FilterFactory)(sk_sp<SkImage> auxImage, const SkIRect* cropRect);
62 static sk_sp<SkImageFilter> color_filter_factory(sk_sp<SkImage> auxImage, const SkIRect* cropRect) { in color_filter_factory()
69 static sk_sp<SkImageFilter> blur_filter_factory(sk_sp<SkImage> auxImage, const SkIRect* cropRect) { in blur_filter_factory()
73 static sk_sp<SkImageFilter> drop_shadow_factory(sk_sp<SkImage> auxImage, const SkIRect* cropRect) { in drop_shadow_factory()
77 static sk_sp<SkImageFilter> offset_factory(sk_sp<SkImage> auxImage, const SkIRect* cropRect) { in offset_factory()
81 static sk_sp<SkImageFilter> dilate_factory(sk_sp<SkImage> auxImage, const SkIRect* cropRect) { in dilate_factory()
85 static sk_sp<SkImageFilter> erode_factory(sk_sp<SkImage> auxImage, const SkIRect* cropRect) { in erode_factory()
[all …]
Dgpu_blur_utils.cpp27 SkIRect dstB, in blur()
28 SkIRect srcB, in blur()
52 SkIRect dstB, in slow_blur()
53 SkIRect srcB, in slow_blur()
58 SkIRect srcTileRect, in slow_blur()
84 dstB = SkIRect::MakePtSize(outset, dstB.size()); in slow_blur()
103 auto bounds = SkIRect::MakeSize(src.dimensions()); in slow_blur()
121 auto srcRect = SkIRect::MakeSize(src.dimensions()); in slow_blur()
130 const SkIRect* contentArea = nullptr) { in make_src_image()
200 SkIRect srcRect = SkIRect::MakeSize(src.dimensions()); in run()
[all …]
/external/skia/docs/examples/
DIRect_MakeWH.cpp7 SkIRect rect1 = SkIRect::MakeWH(25, 35); in draw()
8 SkIRect rect2 = SkIRect::MakeSize({25, 35}); in draw()
9 SkIRect rect3 = SkIRect::MakeXYWH(0, 0, 25, 35); in draw()
10 SkIRect rect4 = SkIRect::MakeLTRB(0, 0, 25, 35); in draw()
/external/skia/src/gpu/ganesh/
DGrWindowRectangles.h26 const SkIRect* data() const;
31 SkIRect& addWindow(const SkIRect& window) { return this->addWindow() = window; } in addWindow()
32 SkIRect& addWindow();
44 SkIRect fLocalWindow; // If fCount <= 1
50 Rec(const SkIRect* windows, int numWindows) { in Rec()
52 memcpy(fData, windows, sizeof(SkIRect) * numWindows); in Rec()
56 SkIRect fData[kMaxWindows];
59 inline const SkIRect* GrWindowRectangles::data() const { in data()
85 SkIRect* windows; in makeOffset()
98 inline SkIRect& GrWindowRectangles::addWindow() { in addWindow()
[all …]
DClipStack.h52 ClipStack(const SkIRect& deviceBounds, const SkMatrixProvider* matrixProvider, bool forceAA);
82 void replaceClip(const SkIRect& rect);
88 SkIRect getConservativeBounds() const override;
117 const SkIRect& outerBounds() const { return fOuterBounds; } in outerBounds()
127 const SkIRect& innerBounds() const { return fInnerBounds; } in innerBounds()
153 void simplify(const SkIRect& deviceBounds, bool forceAA);
162 SkIRect fInnerBounds;
163 SkIRect fOuterBounds;
180 Mask(const SaveRecord& current, const SkIRect& bounds);
188 const SkIRect& bounds() const { return fBounds; } in bounds()
[all …]
DGrBlurUtils.cpp34 static bool clip_bounds_quick_reject(const SkIRect& clipBounds, const SkIRect& rect) { in clip_bounds_quick_reject()
35 return clipBounds.isEmpty() || rect.isEmpty() || !SkIRect::Intersects(clipBounds, rect); in clip_bounds_quick_reject()
46 const SkIRect& maskBounds, in draw_mask()
77 static sk_sp<SkData> create_data(const SkIRect& drawRect, const SkIRect& origDevBounds) { in create_data()
86 static SkIRect extract_draw_rect_from_data(SkData* data, const SkIRect& origDevBounds) { in extract_draw_rect_from_data()
89 return SkIRect::MakeXYWH(origDevBounds.fLeft + drawRectData->fOffset.fX, in extract_draw_rect_from_data()
99 const SkIRect& unclippedDevShapeBounds, in sw_create_filtered_mask()
100 const SkIRect& clipBounds, in sw_create_filtered_mask()
101 SkIRect* drawRect, in sw_create_filtered_mask()
188 const SkIRect& maskRect, in create_mask_GPU()
[all …]
/external/skia/tools/viewer/
DFilterBoundsSlide.cpp29 static float print_size(SkCanvas* canvas, const char* prefix, const SkIRect& rect, in print_size()
40 const SkIRect& layerContentBounds, in print_info()
41 const SkIRect& outputBounds, in print_info()
42 const SkIRect& hintedOutputBounds, in print_info()
43 const SkIRect& unhintedLayerBounds) { in print_info()
189 SkIRect target = ctm.mapRect(localContentRect).roundOut(); in draw()
190 if (!target.intersect(SkIRect::MakeWH(canvas->imageInfo().width(), in draw()
194 skif::DeviceSpace<SkIRect> targetOutput(target); in draw()
219 skif::LayerSpace<SkIRect> targetOutputInLayer = mapping.deviceToLayer(targetOutput); in draw()
220 skif::LayerSpace<SkIRect> hintedLayerBounds = as_IFB(fBlur)->getInputBounds( in draw()
[all …]
/external/skia/tests/graphite/
DReadWritePixelsGraphiteTest.cpp95 std::vector<SkIRect> make_long_rect_array(int w, int h) { in make_long_rect_array()
98 SkIRect::MakeWH(w, h), in make_long_rect_array()
100 SkIRect::MakeLTRB(-10, -10, w + 10, h + 10), in make_long_rect_array()
102 SkIRect::MakeLTRB(w/4, h/4, 3*w/4, 3*h/4), in make_long_rect_array()
104 SkIRect::MakeLTRB(-10, -10, -1, -1), in make_long_rect_array()
106 SkIRect::MakeLTRB(-10, -10, 0, 0), in make_long_rect_array()
108 SkIRect::MakeLTRB(-10, -10, w/4, h/4), in make_long_rect_array()
110 SkIRect::MakeLTRB(-10, -10, w + 10, h/4), in make_long_rect_array()
112 SkIRect::MakeLTRB(-10, -10, w + 10, 0), in make_long_rect_array()
114 SkIRect::MakeLTRB(3*w/4, -10, w + 10, h/4), in make_long_rect_array()
[all …]

12345678910>>...26