Lines Matching refs:subset

39     SkSpecialImage_Base(const SkIRect& subset, uint32_t uniqueID, const SkSurfaceProps* props)  in SkSpecialImage_Base()  argument
40 : INHERITED(subset, uniqueID, props) { in SkSpecialImage_Base()
56 virtual sk_sp<SkSpecialImage> onMakeSubset(const SkIRect& subset) const = 0;
62 virtual sk_sp<SkImage> onAsImage(const SkIRect* subset) const = 0;
76 SkSpecialImage::SkSpecialImage(const SkIRect& subset, in SkSpecialImage() argument
80 , fSubset(subset) in SkSpecialImage()
167 sk_sp<SkSpecialImage> SkSpecialImage::makeSubset(const SkIRect& subset) const { in makeSubset()
168 return as_SIB(this)->onMakeSubset(subset); in makeSubset()
171 sk_sp<SkImage> SkSpecialImage::asImage(const SkIRect* subset) const { in asImage()
172 return as_SIB(this)->onAsImage(subset); in asImage()
190 const SkIRect& subset, in MakeFromImage() argument
193 SkASSERT(rect_fits(subset, image->width(), image->height())); in MakeFromImage()
201 return MakeDeferredFromGpu(context, subset, image->uniqueID(), std::move(proxy), in MakeFromImage()
208 return MakeFromRaster(subset, bm, props); in MakeFromImage()
218 SkSpecialImage_Raster(const SkIRect& subset, const SkBitmap& bm, const SkSurfaceProps* props) in SkSpecialImage_Raster() argument
219 : INHERITED(subset, bm.getGenerationID(), props) in SkSpecialImage_Raster()
232 this->subset().width(), this->subset().height()); in onDraw()
234 canvas->drawBitmapRect(fBitmap, this->subset(), in onDraw()
273 sk_sp<SkSpecialImage> onMakeSubset(const SkIRect& subset) const override { in onMakeSubset()
276 if (!fBitmap.extractSubset(&subsetBM, subset)) { in onMakeSubset()
280 return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(subset.width(), subset.height()), in onMakeSubset()
285 sk_sp<SkImage> onAsImage(const SkIRect* subset) const override { in onAsImage()
286 if (subset) { in onAsImage()
289 if (!fBitmap.extractSubset(&subsetBM, *subset)) { in onAsImage()
320 sk_sp<SkSpecialImage> SkSpecialImage::MakeFromRaster(const SkIRect& subset, in MakeFromRaster() argument
323 SkASSERT(rect_fits(subset, bm.width(), bm.height())); in MakeFromRaster()
340 return sk_make_sp<SkSpecialImage_Raster>(subset, *srcBM, props); in MakeFromRaster()
343 sk_sp<SkSpecialImage> SkSpecialImage::CopyFromRaster(const SkIRect& subset, in CopyFromRaster() argument
346 SkASSERT(rect_fits(subset, bm.width(), bm.height())); in CopyFromRaster()
353 if (!tmp.tryAllocPixels(bm.info().makeWH(subset.width(), subset.height()))) { in CopyFromRaster()
356 if (!bm.readPixels(tmp.info(), tmp.getPixels(), tmp.rowBytes(), subset.x(), subset.y())) { in CopyFromRaster()
359 return sk_make_sp<SkSpecialImage_Raster>(subset, tmp, props); in CopyFromRaster()
374 SkSpecialImage_Gpu(GrRecordingContext* context, const SkIRect& subset, in SkSpecialImage_Gpu() argument
377 : INHERITED(subset, uniqueID, props) in SkSpecialImage_Gpu()
397 this->subset().width(), this->subset().height()); in onDraw()
409 canvas->drawImageRect(img, this->subset(), in onDraw()
420 const auto desc = SkBitmapCacheDesc::Make(this->uniqueID(), this->subset()); in onGetROPixels()
442 this->subset().left(), this->subset().top())) { in onGetROPixels()
471 sk_sp<SkSpecialImage> onMakeSubset(const SkIRect& subset) const override { in onMakeSubset()
473 subset, in onMakeSubset()
482 sk_sp<SkImage> onAsImage(const SkIRect* subset) const override { in onAsImage()
483 if (subset) { in onAsImage()
487 0 == subset->fLeft && 0 == subset->fTop && in onAsImage()
488 fTextureProxy->width() == subset->width() && in onAsImage()
489 fTextureProxy->height() == subset->height()) { in onAsImage()
496 GrSurfaceProxy::Copy(fContext, fTextureProxy.get(), GrMipMapped::kNo, *subset, in onAsImage()
535 const SkIRect& subset, in MakeDeferredFromGpu() argument
544 SkASSERT_RELEASE(rect_fits(subset, proxy->width(), proxy->height())); in MakeDeferredFromGpu()
545 return sk_make_sp<SkSpecialImage_Gpu>(context, subset, uniqueID, std::move(proxy), at, in MakeDeferredFromGpu()