Home
last modified time | relevance | path

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

12345678910>>...26

/third_party/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()
/third_party/skia/tests/
DRegionTest.cpp14 static void Union(SkRegion* rgn, const SkIRect& rect) { in Union()
26 Union(&r, SkIRect::MakeXYWH(0, 0, 1, 1)); in test_fromchrome()
27 TEST_NO_INTERSECT(r, SkIRect::MakeXYWH(0, 0, 0, 0)); in test_fromchrome()
28 TEST_INTERSECT(r, SkIRect::MakeXYWH(0, 0, 2, 2)); in test_fromchrome()
29 TEST_INTERSECT(r, SkIRect::MakeXYWH(-1, 0, 2, 2)); in test_fromchrome()
30 TEST_INTERSECT(r, SkIRect::MakeXYWH(-1, -1, 2, 2)); in test_fromchrome()
31 TEST_INTERSECT(r, SkIRect::MakeXYWH(0, -1, 2, 2)); in test_fromchrome()
32 TEST_INTERSECT(r, SkIRect::MakeXYWH(-1, -1, 3, 3)); in test_fromchrome()
34 Union(&r, SkIRect::MakeXYWH(0, 0, 3, 3)); in test_fromchrome()
35 Union(&r, SkIRect::MakeXYWH(10, 0, 3, 3)); in test_fromchrome()
[all …]
DImageFilterTest.cpp116 FilterList(sk_sp<SkImageFilter> input, const SkIRect* cropRect = nullptr) { in FilterList()
163 SkIRect leftSideCropRect = SkIRect::MakeXYWH(0, 0, 32, 64); in FilterList()
166 SkIRect rightSideCropRect = SkIRect::MakeXYWH(32, 0, 32, 64); in FilterList()
206 recordingCanvas->drawRect(SkRect::Make(SkIRect::MakeXYWH(10, 10, 30, 20)), greenPaint); in FilterList()
248 FixedBoundsImageFilter(const SkIRect& bounds) in FixedBoundsImageFilter()
259 SkIRect onFilterBounds(const SkIRect&, const SkMatrix&, in onFilterBounds() argument
260 MapDirection, const SkIRect*) const override { in onFilterBounds()
264 SkIRect fBounds;
316 const SkIRect* cropRect) { in make_grayscale()
327 static sk_sp<SkImageFilter> make_blue(sk_sp<SkImageFilter> input, const SkIRect* cropRect) { in make_blue()
[all …]
DReadPixelsTest.cpp20 static const SkIRect DEV_RECT = SkIRect::MakeWH(DEV_W, DEV_H);
175 SkIRect srcRect = SkIRect::MakeXYWH(x, y, bw, bh); in check_read()
176 SkIRect clippedSrcRect = DEV_RECT; in check_read()
252 static void init_bitmap(SkBitmap* bitmap, const SkIRect& rect, TightRowBytes tightRB, in init_bitmap()
273 const SkIRect gReadPixelsTestRects[] = {
277 SkIRect::MakeLTRB(-10, -10, DEV_W + 10, DEV_H + 10),
279 SkIRect::MakeLTRB(DEV_W / 4, DEV_H / 4, 3 * DEV_W / 4, 3 * DEV_H / 4),
281 SkIRect::MakeLTRB(-10, -10, -1, -1),
283 SkIRect::MakeLTRB(-10, -10, 0, 0),
285 SkIRect::MakeLTRB(-10, -10, DEV_W / 4, DEV_H / 4),
[all …]
DRectTest.cpp174 SkIRect fA; in DEF_TEST()
175 SkIRect fB; in DEF_TEST()
176 SkIRect fExpected; in DEF_TEST()
180 SkIRect a = SkIRect::MakeLTRB(2, 3, 12, 15); in DEF_TEST()
183 {a, a.makeOutset(2, 2), SkIRect::MakeEmpty(), true}, in DEF_TEST()
187 {SkIRect::MakeEmpty(), a, SkIRect::MakeEmpty(), true}, in DEF_TEST()
189 {a, SkIRect::MakeEmpty(), a, true}, in DEF_TEST()
191 {SkIRect::MakeEmpty(), SkIRect::MakeEmpty(), SkIRect::MakeEmpty(), true}, in DEF_TEST()
225 SkIRect difference; in DEF_TEST()
248 SkIRect reallyBig = SkIRect::MakeLTRB(-INT_MAX + 1000, 0, INT_MAX - 1000, 100); in DEF_TEST()
[all …]
DClearTest.cpp39 const SkIRect& rect, in check_rect()
80 SkIRect fullRect = SkIRect::MakeWH(kW, kH); in clear_op_test()
85 SkIRect mid1Rect = SkIRect::MakeXYWH(1, 1, kW-2, kH-2); in clear_op_test()
86 SkIRect outerLeftEdge = SkIRect::MakeXYWH(0, 0, 1, kH); in clear_op_test()
87 SkIRect outerTopEdge = SkIRect::MakeXYWH(0, 0, kW, 1); in clear_op_test()
88 SkIRect outerRightEdge = SkIRect::MakeXYWH(kW-1, 0, 1, kH); in clear_op_test()
89 SkIRect outerBottomEdge = SkIRect::MakeXYWH(0, kH-1, kW, 1); in clear_op_test()
93 SkIRect mid2Rect = SkIRect::MakeXYWH(2, 2, kW-4, kH-4); in clear_op_test()
94 SkIRect innerLeftEdge = SkIRect::MakeXYWH(1, 1, 1, kH-2); in clear_op_test()
95 SkIRect innerTopEdge = SkIRect::MakeXYWH(1, 1, kW-2, 1); in clear_op_test()
[all …]
DWritePixelsTest.cpp25 static const SkIRect DEV_RECT = SkIRect::MakeWH(DEV_W, DEV_H);
230 SkIRect writeRect = SkIRect::MakeXYWH(writeX, writeY, bitmap.width(), bitmap.height()); in check_write()
326 const SkIRect testRects[] = { in test_write_pixels()
330 SkIRect::MakeLTRB(-10, -10, DEV_W + 10, DEV_H + 10), in test_write_pixels()
332 SkIRect::MakeLTRB(DEV_W / 4, DEV_H / 4, 3 * DEV_W / 4, 3 * DEV_H / 4), in test_write_pixels()
334 SkIRect::MakeLTRB(-10, -10, -1, -1), in test_write_pixels()
336 SkIRect::MakeLTRB(-10, -10, 0, 0), in test_write_pixels()
338 SkIRect::MakeLTRB(-10, -10, DEV_W / 4, DEV_H / 4), in test_write_pixels()
340 SkIRect::MakeLTRB(-10, -10, DEV_W + 10, DEV_H / 4), in test_write_pixels()
342 SkIRect::MakeLTRB(-10, -10, DEV_W + 10, 0), in test_write_pixels()
[all …]
DImageFilterCacheTest.cpp46 SkIRect clip = SkIRect::MakeWH(100, 100); in test_find_existing()
69 SkIRect clip1 = SkIRect::MakeWH(100, 100); in test_dont_find_if_diff_key()
70 SkIRect clip2 = SkIRect::MakeWH(200, 200); in test_dont_find_if_diff_key()
95 SkIRect clip = SkIRect::MakeWH(100, 100); in test_internal_purge()
122 SkIRect clip = SkIRect::MakeWH(100, 100); in test_explicit_purging()
155 const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize); in DEF_TEST()
159 const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize); in DEF_TEST()
175 const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize); in test_image_backed()
180 const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize); in test_image_backed()
262 const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
[all …]
/third_party/skia/include/core/
DSkRegion.h59 explicit SkRegion(const SkIRect& rect);
158 const SkIRect& getBounds() const { return fBounds; } in getBounds()
201 bool setRect(const SkIRect& rect);
214 bool setRects(const SkIRect rects[], int count);
254 bool intersects(const SkIRect& rect) const;
285 bool contains(const SkIRect& other) const;
303 bool quickContains(const SkIRect& r) const { in quickContains()
320 bool quickReject(const SkIRect& rect) const { in quickReject()
322 !SkIRect::Intersects(fBounds, rect); in quickReject()
334 !SkIRect::Intersects(fBounds, rgn.fBounds); in quickReject()
[all …]
DSkRect.h28 struct SK_API SkIRect { struct
47 static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeEmpty() { in MakeEmpty() argument
48 return SkIRect{0, 0, 0, 0}; in MakeEmpty()
58 static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeWH(int32_t w, int32_t h) { in MakeWH() argument
59 return SkIRect{0, 0, w, h}; in MakeWH()
68 static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeSize(const SkISize& size) { in MakeSize() argument
69 return SkIRect{0, 0, size.fWidth, size.fHeight}; in MakeSize()
80 static constexpr SkIRect SK_WARN_UNUSED_RESULT MakePtSize(SkIPoint pt, SkISize size) { in MakePtSize() argument
93 static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeLTRB(int32_t l, int32_t t, in MakeLTRB() argument
95 return SkIRect{l, t, r, b}; in MakeLTRB()
[all …]
/third_party/skia/src/effects/imagefilters/
DSkMatrixConvolutionImageFilter.cpp59 SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix& ctm,
60 MapDirection, const SkIRect* inputRect) const override;
79 SkIRect rect,
80 const SkIRect& bounds) const;
85 const SkIRect& rect,
86 const SkIRect& bounds) const;
90 const SkIRect& rect,
91 const SkIRect& bounds) const;
95 const SkIRect& rect,
96 const SkIRect& bounds) const;
[all …]
DSkCropImageFilter.cpp37 skif::LayerSpace<SkIRect> onGetInputLayerBounds(
39 const skif::LayerSpace<SkIRect>& desiredOutput,
40 const skif::LayerSpace<SkIRect>& contentBounds,
43 skif::LayerSpace<SkIRect> onGetOutputLayerBounds(
45 const skif::LayerSpace<SkIRect>& contentBounds) const override;
50 skif::LayerSpace<SkIRect> cropRect(const skif::Mapping& mapping) const { in cropRect()
89 skif::LayerSpace<SkIRect> cropBounds = this->cropRect(context.mapping()); in onFilterImage()
113 skif::LayerSpace<SkIRect> SkCropImageFilter::onGetInputLayerBounds( in onGetInputLayerBounds()
115 const skif::LayerSpace<SkIRect>& desiredOutput, in onGetInputLayerBounds()
116 const skif::LayerSpace<SkIRect>& contentBounds, in onGetInputLayerBounds()
[all …]
DSkTileImageFilter.cpp31 SkIRect onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
32 MapDirection, const SkIRect* inputRect) const override;
33 SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix& ctm,
34 MapDirection, const SkIRect* inputRect) const override;
109 const SkIRect dstIRect = dstRect.makeInset(kRoundOutInset, kRoundOutInset).roundOut(); in onFilterImage()
116 SkIRect srcIRect = srcRect.makeInset(kRoundOutInset, kRoundOutInset).roundOut(); in onFilterImage()
118 const SkIRect inputBounds = SkIRect::MakeWH(input->width(), input->height()); in onFilterImage()
120 if (!SkIRect::Intersects(srcIRect, inputBounds)) { in onFilterImage()
172 SkIRect SkTileImageFilter::onFilterNodeBounds( in onFilterNodeBounds()
173 const SkIRect& src, const SkMatrix& ctm, MapDirection dir, const SkIRect* inputRect) const { in onFilterNodeBounds()
[all …]
DSkArithmeticImageFilter.cpp43 SkIRect onFilterBounds(const SkIRect&, const SkMatrix& ctm,
44 MapDirection, const SkIRect* inputRect) const override;
52 const SkIRect& bounds) const;
57 void drawForeground(SkCanvas* canvas, SkSpecialImage*, const SkIRect&) const;
173 SkIRect dstR = SkIRect::MakeWH(dst->width(), dst->height()); in intersect()
174 SkIRect srcR = SkIRect::MakeXYWH(srcDx, srcDy, src->width(), src->height()); in intersect()
175 SkIRect sect; in intersect()
196 SkIRect foregroundBounds = SkIRect::MakeEmpty(); in onFilterImage()
198 foregroundBounds = SkIRect::MakeXYWH(foregroundOffset.x(), foregroundOffset.y(), in onFilterImage()
202 SkIRect srcBounds = SkIRect::MakeEmpty(); in onFilterImage()
[all …]
DSkBlendImageFilter.cpp46 SkIRect onFilterBounds(const SkIRect&, const SkMatrix& ctm,
47 MapDirection, const SkIRect* inputRect) const override;
55 const SkIRect& bounds) const;
60 void drawForeground(SkCanvas* canvas, SkSpecialImage*, const SkIRect&) const;
137 SkIRect foregroundBounds = SkIRect::MakeEmpty(); in onFilterImage()
139 foregroundBounds = SkIRect::MakeXYWH(foregroundOffset.x(), foregroundOffset.y(), in onFilterImage()
143 SkIRect srcBounds = SkIRect::MakeEmpty(); in onFilterImage()
145 srcBounds = SkIRect::MakeXYWH(backgroundOffset.x(), backgroundOffset.y(), in onFilterImage()
154 SkIRect bounds; in onFilterImage()
193 SkIRect SkBlendImageFilter::onFilterBounds(const SkIRect& src, in onFilterBounds()
[all …]
DSkComposeImageFilter.cpp28 SkIRect onFilterBounds(const SkIRect&, const SkMatrix& ctm,
29 MapDirection, const SkIRect* inputRect) const override;
78 SkIRect innerClipBounds; in onFilterImage()
81 Context innerContext = ctx.withNewDesiredOutput(skif::LayerSpace<SkIRect>(innerClipBounds)); in onFilterImage()
93 SkIRect clipBounds = ctx.clipBounds(); in onFilterImage()
113 SkIRect SkComposeImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm, in onFilterBounds()
114 MapDirection dir, const SkIRect* inputRect) const { in onFilterBounds()
122 const SkIRect outerRect = outer->filterBounds(src, ctm, dir, inputRect); in onFilterBounds()
127 const SkIRect innerRect = inner->filterBounds(src, ctm, dir); in onFilterBounds()
/third_party/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.cpp26 SkIRect dstB, in blur()
27 SkIRect srcB, in blur()
51 SkIRect dstB, in slow_blur()
52 SkIRect srcB, in slow_blur()
57 SkIRect srcTileRect, in slow_blur()
83 dstB = SkIRect::MakePtSize(outset, dstB.size()); in slow_blur()
102 auto bounds = SkIRect::MakeSize(src.dimensions()); in slow_blur()
120 auto srcRect = SkIRect::MakeSize(src.dimensions()); in slow_blur()
129 const SkIRect* contentArea = nullptr) { in make_src_image()
199 SkIRect srcRect = SkIRect::MakeSize(src.dimensions()); in run()
[all …]
/third_party/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()
/third_party/skia/src/gpu/v1/
DClipStack.h44 ClipStack(const SkIRect& deviceBounds, const SkMatrixProvider* matrixProvider, bool forceAA);
74 void replaceClip(const SkIRect& rect);
80 SkIRect getConservativeBounds() const override;
109 const SkIRect& outerBounds() const { return fOuterBounds; } in outerBounds()
119 const SkIRect& innerBounds() const { return fInnerBounds; } in innerBounds()
145 void simplify(const SkIRect& deviceBounds, bool forceAA);
154 SkIRect fInnerBounds;
155 SkIRect fOuterBounds;
172 Mask(const SaveRecord& current, const SkIRect& bounds);
180 const SkIRect& bounds() const { return fBounds; } in bounds()
[all …]
/third_party/skia/src/gpu/
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 …]
DGrBlurUtils.cpp36 static bool clip_bounds_quick_reject(const SkIRect& clipBounds, const SkIRect& rect) { in clip_bounds_quick_reject()
37 return clipBounds.isEmpty() || rect.isEmpty() || !SkIRect::Intersects(clipBounds, rect); in clip_bounds_quick_reject()
48 const SkIRect& maskBounds, in draw_mask()
79 static sk_sp<SkData> create_data(const SkIRect& drawRect, const SkIRect& origDevBounds) { in create_data()
88 static SkIRect extract_draw_rect_from_data(SkData* data, const SkIRect& origDevBounds) { in extract_draw_rect_from_data()
91 return SkIRect::MakeXYWH(origDevBounds.fLeft + drawRectData->fOffset.fX, in extract_draw_rect_from_data()
101 const SkIRect& unclippedDevShapeBounds, in sw_create_filtered_mask()
102 const SkIRect& clipBounds, in sw_create_filtered_mask()
103 SkIRect* drawRect, in sw_create_filtered_mask()
190 const SkIRect& maskRect, in create_mask_GPU()
[all …]
/third_party/skia/samplecode/
DSampleFilterBounds.cpp31 static float print_size(SkCanvas* canvas, const char* prefix, const SkIRect& rect, in print_size()
42 const SkIRect& layerContentBounds, in print_info()
43 const SkIRect& outputBounds, in print_info()
44 const SkIRect& hintedOutputBounds, in print_info()
45 const SkIRect& unhintedLayerBounds) { in print_info()
191 SkIRect target = ctm.mapRect(localContentRect).roundOut(); in onDrawContent()
192 if (!target.intersect(SkIRect::MakeWH(canvas->imageInfo().width(), in onDrawContent()
196 skif::DeviceSpace<SkIRect> targetOutput(target); in onDrawContent()
221 skif::LayerSpace<SkIRect> targetOutputInLayer = mapping.deviceToLayer(targetOutput); in onDrawContent()
222 skif::LayerSpace<SkIRect> hintedLayerBounds = as_IFB(fBlur)->getInputBounds( in onDrawContent()
[all …]

12345678910>>...26