Lines Matching refs:dContext
163 SkImage_Gpu::SkImage_Gpu(sk_sp<GrDirectContext> dContext, in SkImage_Gpu() argument
169 : INHERITED(std::move(dContext), in SkImage_Gpu()
233 GrSemaphoresSubmitted SkImage_Gpu::onFlush(GrDirectContext* dContext, in onFlush() argument
235 if (!fContext->priv().matches(dContext) || dContext->abandoned()) { in onFlush()
245 sk_sp<GrSurfaceProxy> proxy = fChooser.chooseProxy(dContext); in onFlush()
246 return dContext->priv().flushSurface(proxy.get(), in onFlush()
291 GrDirectContext* dContext) const { in onMakeColorTypeAndColorSpace()
293 if (!fContext->priv().matches(dContext)) { in onMakeColorTypeAndColorSpace()
297 auto sfc = dContext->priv().makeSFCWithFallback(GrImageInfo(info, this->dimensions()), in onMakeColorTypeAndColorSpace()
307 auto [view, _] = this->asView(dContext, GrMipmapped(this->hasMipmaps())); in onMakeColorTypeAndColorSpace()
314 return sk_make_sp<SkImage_Gpu>(sk_ref_sp(dContext), in onMakeColorTypeAndColorSpace()
336 auto dContext = fContext->asDirectContext(); in onAsyncRescaleAndReadPixels() local
337 if (!dContext) { in onAsyncRescaleAndReadPixels()
342 auto ctx = dContext->priv().makeSC(this->makeView(dContext), this->imageInfo().colorInfo()); in onAsyncRescaleAndReadPixels()
347 ctx->asyncRescaleAndReadPixels(dContext, info, srcRect, rescaleGamma, rescaleMode, in onAsyncRescaleAndReadPixels()
359 auto dContext = fContext->asDirectContext(); in onAsyncRescaleAndReadPixelsYUV420() local
360 if (!dContext) { in onAsyncRescaleAndReadPixelsYUV420()
365 auto ctx = dContext->priv().makeSC(this->makeView(dContext), this->imageInfo().colorInfo()); in onAsyncRescaleAndReadPixelsYUV420()
370 ctx->asyncRescaleAndReadPixelsYUV420(dContext, in onAsyncRescaleAndReadPixelsYUV420()
478 auto dContext = GrAsDirectContext(rContext); in MakeFromAdoptedTexture() local
479 if (!dContext) { in MakeFromAdoptedTexture()
484 const GrCaps* caps = dContext->priv().caps(); in MakeFromAdoptedTexture()
495 return new_wrapped_texture_common(dContext, tex, grColorType, origin, at, std::move(cs), in MakeFromAdoptedTexture()
532 sk_sp<SkImage> SkImage::makeTextureImage(GrDirectContext* dContext, in makeTextureImage() argument
535 if (!dContext) { in makeTextureImage()
538 if (!dContext->priv().caps()->mipmapSupport() || this->dimensions().area() <= 1) { in makeTextureImage()
543 if (!as_IB(this)->context()->priv().matches(dContext)) { in makeTextureImage()
555 auto [view, ct] = as_IB(this)->asView(dContext, mipmapped, policy); in makeTextureImage()
563 return sk_make_sp<SkImage_Gpu>(sk_ref_sp(dContext), in makeTextureImage()
629 sk_sp<SkImage> SkImage::MakeCrossContextFromPixmap(GrDirectContext* dContext, in MakeCrossContextFromPixmap() argument
633 if (!dContext || !dContext->priv().caps()->crossContextTextureSupport()) { in MakeCrossContextFromPixmap()
638 if (!dContext->priv().caps()->mipmapSupport()) { in MakeCrossContextFromPixmap()
644 int maxTextureSize = dContext->priv().caps()->maxTextureSize(); in MakeCrossContextFromPixmap()
661 auto [view, ct] = GrMakeUncachedBitmapProxyView(dContext, bmp, mipmapped); in MakeCrossContextFromPixmap()
669 dContext->priv().flushSurface(view.proxy()); in MakeCrossContextFromPixmap()
670 GrGpu* gpu = dContext->priv().getGpu(); in MakeCrossContextFromPixmap()
690 sk_sp<SkImage> SkImage::MakeFromAHardwareBufferWithData(GrDirectContext* dContext, in MakeFromAHardwareBufferWithData() argument
702 GrBackendFormat backendFormat = GrAHardwareBufferUtils::GetBackendFormat(dContext, in MakeFromAHardwareBufferWithData()
718 GrAHardwareBufferUtils::MakeBackendTexture(dContext, hardwareBuffer, in MakeFromAHardwareBufferWithData()
735 GrProxyProvider* proxyProvider = dContext->priv().proxyProvider(); in MakeFromAHardwareBufferWithData()
747 GrSwizzle swizzle = dContext->priv().caps()->getReadSwizzle(backendFormat, grColorType); in MakeFromAHardwareBufferWithData()
750 sk_sp<SkImage> image = sk_make_sp<SkImage_Gpu>(sk_ref_sp(dContext), in MakeFromAHardwareBufferWithData()
758 GrDrawingManager* drawingManager = dContext->priv().drawingManager(); in MakeFromAHardwareBufferWithData()
764 dContext, std::move(framebufferView),image->imageInfo().colorInfo()); in MakeFromAHardwareBufferWithData()
766 surfaceContext.writePixels(dContext, pixmap, {0, 0}); in MakeFromAHardwareBufferWithData()