Lines Matching refs:subset
40 SkSpecialImage::SkSpecialImage(const SkIRect& subset, in SkSpecialImage() argument
44 : fSubset(subset) in SkSpecialImage()
65 sk_sp<SkImage> SkSpecialImage::asImage(const SkIRect* subset) const { in asImage()
66 if (subset) { in asImage()
67 SkIRect absolute = subset->makeOffset(this->subset().topLeft()); in asImage()
125 const SkIRect& subset, in MakeFromImage() argument
128 SkASSERT(RectFits(subset, image->width(), image->height())); in MakeFromImage()
134 subset, in MakeFromImage()
145 return MakeFromRaster(subset, bm, props); in MakeFromImage()
154 SkSpecialImage_Raster(const SkIRect& subset, const SkBitmap& bm, const SkSurfaceProps& props) in SkSpecialImage_Raster() argument
155 : SkSpecialImage(subset, bm.getGenerationID(), bm.info().colorInfo(), props) in SkSpecialImage_Raster()
166 this->subset().width(), this->subset().height()); in onDraw()
168 canvas->drawImageRect(fBitmap.asImage(), SkRect::Make(this->subset()), dst, in onDraw()
173 return fBitmap.extractSubset(bm, this->subset()); in onGetROPixels()
196 sk_sp<SkSpecialImage> onMakeSubset(const SkIRect& subset) const override { in onMakeSubset()
198 return SkSpecialImage::MakeFromRaster(subset, fBitmap, this->props()); in onMakeSubset()
201 sk_sp<SkImage> onAsImage(const SkIRect* subset) const override { in onAsImage()
202 if (subset) { in onAsImage()
205 if (!fBitmap.extractSubset(&subsetBM, *subset)) { in onAsImage()
239 sk_sp<SkSpecialImage> SkSpecialImage::MakeFromRaster(const SkIRect& subset, in MakeFromRaster() argument
242 SkASSERT(RectFits(subset, bm.width(), bm.height())); in MakeFromRaster()
259 return sk_make_sp<SkSpecialImage_Raster>(subset, *srcBM, props); in MakeFromRaster()
262 sk_sp<SkSpecialImage> SkSpecialImage::CopyFromRaster(const SkIRect& subset, in CopyFromRaster() argument
265 SkASSERT(RectFits(subset, bm.width(), bm.height())); in CopyFromRaster()
272 SkImageInfo info = bm.info().makeDimensions(subset.size()); in CopyFromRaster()
280 if (!bm.readPixels(tmp.info(), tmp.getPixels(), tmp.rowBytes(), subset.x(), subset.y())) { in CopyFromRaster()
288 SkIRect::MakeWH(subset.width(), subset.height()), tmp, props); in CopyFromRaster()
306 const SkIRect& subset, in SkSpecialImage_Gpu() argument
311 : SkSpecialImage(subset, uniqueID, colorInfo, props) in SkSpecialImage_Gpu()
323 this->subset().width(), this->subset().height()); in onDraw()
337 canvas->drawImageRect(img, SkRect::Make(this->subset()), dst, in onDraw()
364 sk_sp<SkSpecialImage> onMakeSubset(const SkIRect& subset) const override { in onMakeSubset()
366 subset, in onMakeSubset()
373 sk_sp<SkImage> onAsImage(const SkIRect* subset) const override { in onAsImage()
375 if (subset) { in onAsImage()
376 if (proxy->isFunctionallyExact() && *subset == SkIRect::MakeSize(proxy->dimensions())) { in onAsImage()
385 *subset, in onAsImage()
410 SkMatrix subsetOrigin = SkMatrix::Translate(-this->subset().topLeft()); in onAsShader()
414 const SkRect subset = SkRect::Make(this->subset()); in onAsShader() local
419 this->asImage(), subset, tileMode, tileMode, sampling, &subsetOrigin); in onAsShader()
440 const SkIRect& subset, in MakeDeferredFromGpu() argument
451 SkASSERT(RectFits(subset, view.proxy()->width(), view.proxy()->height())); in MakeDeferredFromGpu()
452 return sk_make_sp<SkSpecialImage_Gpu>(context, subset, uniqueID, std::move(view), in MakeDeferredFromGpu()