Home
last modified time | relevance | path

Searched refs:srcRect (Results 1 – 25 of 143) sorted by relevance

123456

/third_party/skia/gm/
Dgpu_blur_utils.cpp120 auto srcRect = SkIRect::MakeSize(src.dimensions()); in slow_blur() local
121 return tileInto(std::move(src), srcRect, dstB.size(), -outset, SkTileMode::kClamp); in slow_blur()
199 SkIRect srcRect = SkIRect::MakeSize(src.dimensions()); in run() local
201 srcRect = SkIRect::MakeXYWH(2.f*srcRect.width() /8.f, in run()
202 1.f*srcRect.height()/8.f, in run()
203 5.f*srcRect.width() /8.f, in run()
204 6.f*srcRect.height()/8.f); in run()
206 int srcW = srcRect.width(); in run()
207 int srcH = srcRect.height(); in run()
213 srcRect.makeOutset(srcW/5, srcH/5) in run()
[all …]
Dpictureimagefilter.cpp93 SkRect srcRect = SkRect::MakeXYWH(20, 20, 30, 30); in onDraw() local
97 sk_sp<SkImageFilter> pictureSourceSrcRect(SkImageFilters::Picture(fPicture, srcRect)); in onDraw()
127 canvas->translate(-0.9f*srcRect.fLeft, -2.45f*srcRect.fTop); in onDraw()
137 canvas->scale(200 / srcRect.width(), 200 / srcRect.height()); in onDraw()
138 canvas->translate(-srcRect.fLeft, -srcRect.fTop); in onDraw()
139 fill_rect_filtered(canvas, srcRect, pictureSource); in onDraw()
142 canvas->translate(srcRect.width(), 0); in onDraw()
143 fill_rect_filtered(canvas, srcRect, pictureSourceResampled); in onDraw()
146 canvas->translate(srcRect.width(), 0); in onDraw()
147 fill_rect_filtered(canvas, srcRect, pictureSourcePixelated); in onDraw()
Dresizeimagefilter.cpp81 const SkRect srcRect = SkRect::MakeWH(96, 96); in onDraw() local
84 this->draw(canvas, srcRect, deviceSize, samplings[0], nullptr); in onDraw()
86 canvas->translate(srcRect.width() + SkIntToScalar(10), 0); in onDraw()
87 this->draw(canvas, srcRect, deviceSize, samplings[1], nullptr); in onDraw()
89 canvas->translate(srcRect.width() + SkIntToScalar(10), 0); in onDraw()
90 this->draw(canvas, srcRect, deviceSize, samplings[2], nullptr); in onDraw()
92 canvas->translate(srcRect.width() + SkIntToScalar(10), 0); in onDraw()
93 this->draw(canvas, srcRect, deviceSize, samplings[3], nullptr); in onDraw()
112 canvas->translate(srcRect.width() + SkIntToScalar(10), 0); in onDraw()
113 this->draw(canvas, srcRect, deviceSize, samplings[3], std::move(source)); in onDraw()
Dtileimagefilter.cpp69 SkRect srcRect = SkRect::MakeXYWH(SkIntToScalar(image->width()/4), in onDraw() local
78 sk_sp<SkImageFilter> filter(SkImageFilters::Tile(srcRect, dstRect, in onDraw()
85 canvas->drawRect(srcRect, red); in onDraw()
102 SkRect srcRect = SkRect::MakeWH(SkIntToScalar(fBitmap->width()), in onDraw() local
106 sk_sp<SkImageFilter> tile(SkImageFilters::Tile(srcRect, dstRect, nullptr)); in onDraw()
117 canvas->drawRect(srcRect, red); in onDraw()
126 SkRect srcRect = SkRect::MakeXYWH(0, 0, 50, 50); in onDraw() local
135 paint.setImageFilter(SkImageFilters::Tile(srcRect, dstRect, std::move(green))); in onDraw()
Dasyncrescaleandread.cpp46 const SkIRect& srcRect, in do_read_and_scale() argument
51 src->asyncRescaleAndReadPixels(ii, srcRect, rescaleGamma, rescaleMode, async_callback, in do_read_and_scale()
73 const SkIRect& srcRect, in do_read_and_scale_yuv() argument
85 src->asyncRescaleAndReadPixelsYUV420(yuvCS, SkColorSpace::MakeSRGB(), srcRect, size, in do_read_and_scale_yuv()
120 const SkIRect& srcRect, in do_rescale_grid() argument
146 result = do_read_and_scale_yuv(src, direct, yuvColorSpace, srcRect, newSize, gamma, in do_rescale_grid()
155 result = do_read_and_scale(src, direct, srcRect, ii, gamma, mode); in do_rescale_grid()
173 const SkIRect& srcRect, in do_rescale_image_grid() argument
213 return do_rescale_grid(canvas, surface.get(), dContext, srcRect, newSize, in do_rescale_image_grid()
226 return do_rescale_grid(canvas, image.get(), dContext, srcRect, newSize, doYUV420, in do_rescale_image_grid()
[all …]
Dmatriximagefilter.cpp55 SkRect srcRect = SkRect::MakeWH(96, 96); variable
58 draw(canvas, srcRect, checkerboard, matrix, SkSamplingOptions());
60 canvas->translate(srcRect.width() + margin, 0);
61 draw(canvas, srcRect, checkerboard, matrix, SkSamplingOptions(SkFilterMode::kLinear));
Dimagesource.cpp56 const SkRect srcRect = SkRect::MakeXYWH(20, 20, 30, 30); in onDraw() local
71 SkImageFilters::Image(fImage, srcRect, srcRect, sampling)); in onDraw()
78 SkImageFilters::Image(fImage, srcRect, dstRect, sampling)); in onDraw()
/third_party/skia/third_party/externals/angle2/src/libANGLE/renderer/d3d/d3d9/
DFramebuffer9.cpp262 RECT srcRect; in blitImpl() local
263 srcRect.left = sourceArea.x; in blitImpl()
264 srcRect.right = sourceArea.x + sourceArea.width; in blitImpl()
265 srcRect.top = sourceArea.y; in blitImpl()
266 srcRect.bottom = sourceArea.y + sourceArea.height; in blitImpl()
279 srcRect.left += (scissor->x - dstRect.left); in blitImpl()
284 srcRect.top += (scissor->y - dstRect.top); in blitImpl()
289 srcRect.right -= (dstRect.right - (scissor->x + scissor->width)); in blitImpl()
294 srcRect.bottom -= (dstRect.bottom - (scissor->y + scissor->height)); in blitImpl()
302 srcRect.left += -dstRect.left; in blitImpl()
[all …]
/third_party/skia/tests/
DCopySurfaceTest.cpp77 for (const SkIRect& srcRect : kSrcRects) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
113 srcRect, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
118 std::move(srcView), srcRect, dstPoint); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
122 SkIPoint dstOffset = { dstPoint.fX - srcRect.fLeft, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
123 dstPoint.fY - srcRect.fTop }; in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
126 srcRect.width(), in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
127 srcRect.height()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
130 if (!copiedSrcRect.intersect(srcRect, SkIRect::MakeWH(kW, kH))) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
135 copiedDstRect.fLeft += copiedSrcRect.fLeft - srcRect.fLeft; in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
136 copiedDstRect.fTop += copiedSrcRect.fTop - srcRect.fTop; in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
[all …]
DGrOpListFlushTest.cpp50 SkRect srcRect = SkRect::MakeWH(1, 1); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
57 srcRect.fLeft = i; in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
58 srcRect.fRight = srcRect.fLeft + 1; in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
61 canvas2->drawImageRect(image.get(), srcRect, dstRect, SkSamplingOptions(), nullptr, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
67 canvas1->drawImageRect(image.get(), srcRect, dstRect, SkSamplingOptions(), nullptr, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
DReadPixelsTest.cpp175 SkIRect srcRect = SkIRect::MakeXYWH(x, y, bw, bh); in check_read() local
177 if (!clippedSrcRect.intersect(srcRect)) { in check_read()
183 int devx = bx + srcRect.fLeft; in check_read()
184 int devy = by + srcRect.fTop; in check_read()
213 int devx = bx + srcRect.fLeft; in check_read()
214 int devy = by + srcRect.fTop; in check_read()
320 bool read_should_succeed(const SkIRect& srcRect, const SkImageInfo& dstInfo, in read_should_succeed() argument
322 return SkIRect::Intersects(srcRect, DEV_RECT) && SkImageInfoValidConversion(dstInfo, srcInfo); in read_should_succeed()
330 const SkIRect& srcRect = gReadPixelsTestRects[rect]; in test_readpixels() local
334 init_bitmap(&bmp, srcRect, tightRB, gReadPixelsConfigs[c].fColorType, in test_readpixels()
[all …]
/third_party/skia/src/gpu/
DGrCopyRenderTask.cpp17 SkIRect srcRect, in Make() argument
26 srcRect, in Make()
28 &srcRect, in Make()
35 srcRect, in Make()
43 SkIRect srcRect, in GrCopyRenderTask() argument
47 : fSrc(std::move(src)), fSrcRect(srcRect), fDstPoint(dstPoint), fOrigin(origin) { in GrCopyRenderTask()
88 SkIRect srcRect = GrNativeRect::MakeIRectRelativeTo(fOrigin, srcSurface->height(), fSrcRect); in onExecute() local
91 dstPoint.fY = dstSurface->height() - dstPoint.fY - srcRect.height(); in onExecute()
93 return flushState->gpu()->copySurface(dstSurface, srcSurface, srcRect, dstPoint); in onExecute()
DSurfaceContext.cpp194 auto srcRect = SkIRect::MakePtSize(pt, dst.dimensions()); in readPixels() local
199 srcRect, in readPixels()
469 SkIRect srcRect = SkIRect::MakeSize(srcBase.dimensions()); in internalWritePixels() local
471 if (!this->copy(std::move(tempProxy), srcRect, dstPoint)) { in internalWritePixels()
545 const SkIRect& srcRect, in asyncRescaleAndReadPixels() argument
568 bool needsRescale = srcRect.size() != info.dimensions() || in asyncRescaleAndReadPixels()
598 int x = srcRect.fLeft; in asyncRescaleAndReadPixels()
599 int y = srcRect.fTop; in asyncRescaleAndReadPixels()
601 tempFC = this->rescale(info, kTopLeft_GrSurfaceOrigin, srcRect, rescaleGamma, rescaleMode); in asyncRescaleAndReadPixels()
792 const SkIRect& srcRect, in asyncRescaleAndReadPixelsYUV420() argument
[all …]
DSurfaceContext.h96 const SkIRect& srcRect,
106 const SkIRect& srcRect,
161 SkIRect srcRect,
171 SkIRect srcRect,
176 bool testCopy(sk_sp<GrSurfaceProxy> src, const SkIRect& srcRect, const SkIPoint& dstPoint) { in testCopy() argument
177 return this->copy(std::move(src), srcRect, dstPoint) != nullptr; in testCopy()
214 const SkIRect& srcRect,
240 sk_sp<GrRenderTask> copy(sk_sp<GrSurfaceProxy> src, SkIRect srcRect, SkIPoint dstPoint);
DSurfaceFillContext.h64 void fillRectToRectWithFP(const SkRect& srcRect, in fillRectToRectWithFP() argument
67 SkMatrix lm = SkMatrix::RectToRect(SkRect::Make(dstRect), srcRect); in fillRectToRectWithFP()
72 void fillRectToRectWithFP(const SkIRect& srcRect, in fillRectToRectWithFP() argument
75 this->fillRectToRectWithFP(SkRect::Make(srcRect), dstRect, std::move(fp)); in fillRectToRectWithFP()
99 const SkIRect& srcRect,
/third_party/skia/src/effects/imagefilters/
DSkMagnifierImageFilter.cpp30 SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset, sk_sp<SkImageFilter> input, in SkMagnifierImageFilter() argument
33 , fSrcRect(srcRect) in SkMagnifierImageFilter()
35 SkASSERT(srcRect.left() >= 0 && srcRect.top() >= 0 && inset >= 0); in SkMagnifierImageFilter()
56 const SkRect& srcRect, SkScalar inset, sk_sp<SkImageFilter> input, in Magnifier() argument
58 if (!SkScalarIsFinite(inset) || !SkIsValidRect(srcRect)) { in Magnifier()
65 if (srcRect.fLeft < 0 || srcRect.fTop < 0) { in Magnifier()
68 return sk_sp<SkImageFilter>(new SkMagnifierImageFilter(srcRect, inset, std::move(input), in Magnifier()
98 SkRect srcRect, in make_magnifier_fp() argument
145 "offset", SkV2{srcRect.x(), srcRect.y()}); in make_magnifier_fp()
187 SkRect srcRect = fSrcRect.makeOffset((1.f - invXZoom) * input->subset().x(), in onFilterImage() local
[all …]
DSkMorphologyImageFilter.cpp360 const SkIRect& srcRect, in apply_morphology_rect() argument
373 sfc->fillRectToRectWithFP(srcRect, dstRect, std::move(fp)); in apply_morphology_rect()
379 const SkIRect& srcRect, in apply_morphology_rect_no_bounds() argument
386 sfc->fillRectToRectWithFP(srcRect, dstRect, std::move(fp)); in apply_morphology_rect_no_bounds()
392 const SkIRect& srcRect, in apply_morphology_pass() argument
398 SkIRect lowerSrcRect = srcRect, lowerDstRect = dstRect; in apply_morphology_pass()
399 SkIRect middleSrcRect = srcRect, middleDstRect = dstRect; in apply_morphology_pass()
400 SkIRect upperSrcRect = srcRect, upperDstRect = dstRect; in apply_morphology_pass()
402 bounds[0] = SkIntToScalar(srcRect.left()) + 0.5f; in apply_morphology_pass()
403 bounds[1] = SkIntToScalar(srcRect.right()) - 0.5f; in apply_morphology_pass()
[all …]
DSkImageImageFilter.cpp23 SkImageImageFilter(sk_sp<SkImage> image, const SkRect& srcRect, const SkRect& dstRect, in SkImageImageFilter() argument
27 , fSrcRect(srcRect) in SkImageImageFilter()
57 const SkRect& srcRect, in Image() argument
60 if (!image || srcRect.width() <= 0.0f || srcRect.height() <= 0.0f) { in Image()
65 std::move(image), srcRect, dstRect, sampling)); in Image()
/third_party/skia/experimental/graphite/src/mtl/
DMtlBlitCommandEncoder.h44 SkIRect srcRect, in copyFromTexture() argument
51 sourceOrigin: MTLOriginMake(srcRect.left(), srcRect.top(), 0) in copyFromTexture()
52 sourceSize: MTLSizeMake(srcRect.width(), srcRect.height(), 1) in copyFromTexture()
56 destinationBytesPerImage: bufferRowBytes * srcRect.height()]; in copyFromTexture()
/third_party/skia/third_party/externals/swiftshader/src/OpenGL/libGLESv2/
DDevice.cpp903 …bool Device::ClipDstRect(sw::RectF &srcRect, sw::Rect &dstRect, sw::Rect &clipRect, bool flipX, bo… in ClipDstRect() argument
907 …tic_cast<float>(clipRect.x0 - dstRect.x0) / static_cast<float>(dstRect.width())) * srcRect.width(); in ClipDstRect()
914 srcRect.x1 -= offset; in ClipDstRect()
918 srcRect.x0 += offset; in ClipDstRect()
924 …tic_cast<float>(dstRect.x1 - clipRect.x1) / static_cast<float>(dstRect.width())) * srcRect.width(); in ClipDstRect()
931 srcRect.x0 += offset; in ClipDstRect()
935 srcRect.x1 -= offset; in ClipDstRect()
941 …c_cast<float>(clipRect.y0 - dstRect.y0) / static_cast<float>(dstRect.height())) * srcRect.height(); in ClipDstRect()
948 srcRect.y1 -= offset; in ClipDstRect()
952 srcRect.y0 += offset; in ClipDstRect()
[all …]
/third_party/vk-gl-cts/framework/platform/raspi/
DtcuRaspiPlatform.cpp127 VC_RECT_T dstRect, srcRect; in Window() local
134 srcRect.x = 0; in Window()
135 srcRect.y = 0; in Window()
136 srcRect.width = width << 16; in Window()
137 srcRect.height = height << 16; in Window()
145 …nt_add(dispmanUpdate, m_dispmanDisplay, 0/*layer*/, &dstRect, 0/*src*/, &srcRect, DISPMANX_PROTECT… in Window()
/third_party/skia/src/gpu/v1/
DDevice_drawTexture.cpp44 bool has_aligned_samples(const SkRect& srcRect, const SkRect& transformedRect) { in has_aligned_samples() argument
48 SkScalarAbs(transformedRect.width() - srcRect.width()) < kColorBleedTolerance && in has_aligned_samples()
49 SkScalarAbs(transformedRect.height() - srcRect.height()) < kColorBleedTolerance) { in has_aligned_samples()
55 bool may_color_bleed(const SkRect& srcRect, in may_color_bleed() argument
61 SkASSERT(!has_aligned_samples(srcRect, transformedRect)); in may_color_bleed()
62 SkRect innerSrcRect(srcRect), innerTransformedRect, outerTransformedRect(transformedRect); in may_color_bleed()
105 inline int get_tile_count(const SkIRect& srcRect, int tileSize) { in get_tile_count() argument
106 int tilesX = (srcRect.fRight / tileSize) - (srcRect.fLeft / tileSize) + 1; in get_tile_count()
107 int tilesY = (srcRect.fBottom / tileSize) - (srcRect.fTop / tileSize) + 1; in get_tile_count()
345 const SkRect& srcRect, in draw_texture() argument
[all …]
/third_party/skia/experimental/graphite/src/
DCopyTask.cpp17 SkIRect srcRect, in Make() argument
22 srcRect, in Make()
29 SkIRect srcRect, in CopyTextureToBufferTask() argument
34 , fSrcRect(srcRect) in CopyTextureToBufferTask()
/third_party/skia/src/image/
DSkSurface.cpp94 SkIRect srcRect; in onAsyncRescaleAndReadPixels() local
97 srcRect = origSrcRect; in onAsyncRescaleAndReadPixels()
105 srcRect = SkIRect::MakeSize(src.dimensions()); in onAsyncRescaleAndReadPixels()
107 return SkRescaleAndReadPixels(src, info, srcRect, rescaleGamma, rescaleMode, callback, in onAsyncRescaleAndReadPixels()
112 SkYUVColorSpace yuvColorSpace, sk_sp<SkColorSpace> dstColorSpace, const SkIRect& srcRect, in onAsyncRescaleAndReadPixelsYUV420() argument
258 const SkIRect& srcRect, in asyncRescaleAndReadPixels() argument
263 if (!SkIRect::MakeWH(this->width(), this->height()).contains(srcRect) || in asyncRescaleAndReadPixels()
269 info, srcRect, rescaleGamma, rescaleMode, callback, context); in asyncRescaleAndReadPixels()
274 const SkIRect& srcRect, in asyncRescaleAndReadPixelsYUV420() argument
280 if (!SkIRect::MakeWH(this->width(), this->height()).contains(srcRect) || dstSize.isZero() || in asyncRescaleAndReadPixelsYUV420()
[all …]
DSkRescaleAndReadPixels.cpp19 const SkIRect& srcRect, in SkRescaleAndReadPixels() argument
24 int srcW = srcRect.width(); in SkRescaleAndReadPixels()
25 int srcH = srcRect.height(); in SkRescaleAndReadPixels()
67 int srcX = srcRect.fLeft; in SkRescaleAndReadPixels()
68 int srcY = srcRect.fTop; in SkRescaleAndReadPixels()

123456