Lines Matching defs:image

30 #include "src/image/SkImage_Base.h"
31 #include "src/image/SkImage_Gpu.h"
179 // If the image would only produce 4 tiles of the smaller size, don't bother tiling it.
191 // Instead, we will just upload the entire image to be on the safe side and not tile.
249 // Helper functions for drawing an image with v1::SurfaceDrawContext
252 // Src and dst have been restricted to the image content. May need to clamp, no need to decal.
257 // Src or dst are empty, or do not intersect the image content so don't draw anything.
262 * Optimize the src rect sampling area within an image (sized 'width' x 'height') such that
263 * 'outSrcRect' will be completely contained in the image's bounds. The corresponding rect
267 * If 'origSrcRect' is null, implicitly use the image bounds. If 'origDstRect' is null, use the
270 ImageDrawMode optimize_sample_area(const SkISize& image, const SkRect* origSrcRect,
274 SkRect srcBounds = SkRect::MakeIWH(image.fWidth, image.fHeight);
311 // The original src and dst were fully contained in the image, or there was no dst clip to
418 const SkImage_Base& image,
430 !image.isYUVA() &&
434 auto [view, ct] = image.asView(rContext, GrMipmapped::kNo);
438 GrColorInfo info(image.imageInfo().colorInfo());
461 bool canUseTextureCoordsAsLocalCoords = !use_shader(image.isAlphaOnly(), paint) && !mf;
479 // TODO: Just rely on image to handle this.
485 !image.isYUVA()) {
504 std::unique_ptr<GrFragmentProcessor> fp = image.asFragmentProcessor(rContext,
511 image.imageInfo().colorInfo(),
513 if (image.isAlphaOnly()) {
535 // Can draw the image directly (any mask filter on the paint was converted to an FP already)
629 auto image = SkMakeImageFromRasterBitmap(subsetBmp, kNever_SkCopyPixelsMode);
631 SkASSERT(image->width() <= rContext->priv().caps()->maxTextureSize() &&
632 image->height() <= rContext->priv().caps()->maxTextureSize());
660 *as_IB(image.get()),
728 SkImage_Gpu image(sk_ref_sp(special->getContext()),
740 image,
751 void Device::drawImageQuad(const SkImage* image,
764 ImageDrawMode mode = optimize_sample_area(SkISize::Make(image->width(), image->height()),
775 if (src.contains(image->bounds())) {
778 // Depending on the nature of image, it can flow through more or less optimal pipelines
793 if (!image->isTextureBacked() && !as_IB(image)->isPinnedOnContext(fContext.get())) {
808 image->unique(),
809 image->dimensions(),
818 if (SkBitmap bm; as_IB(image)->getROPixels(nullptr, &bm)) {
844 *as_IB(image),
934 const SkImage_Base* image = as_IB(set[i].fImage.get());
935 // Extract view from image, but skip YUV images so they get processed through
937 if (!image->isYUVA()) {
938 std::tie(view, std::ignore) = image->asView(this->recordingContext(), GrMipmapped::kNo);
939 if (image->isAlphaOnly()) {
946 // This image can't go through the texture op, send through general image pipeline
955 image, &set[i].fSrcRect, &set[i].fDstRect, clip, GrAA::kYes,
963 textures[i].fSrcAlphaType = image->alphaType();
970 SkColorTypeToGrColorType(image->colorType()),