Home | History | Annotate | Download | only in image

Lines Matching defs:proxy

107     // Returns the texture proxy. If the cacherator is generating the texture and wants to cache it,
264 // works, so we require that the formats we choose are renderable (as a proxy for being readable).
701 GrTextureProxy* proxy, GrTextureProxy* originalProxy,
704 SkASSERT(proxy->origin() == kTopLeft_GrSurfaceOrigin);
706 SkASSERT(GrMipMapped::kYes == proxy->mipMapped() &&
708 // If we had an originalProxy, that means there already is a proxy in the cache which
710 // remove the unique key from that proxy.
713 proxyProvider->assignUniqueKeyToProxy(key, proxy);
766 sk_sp<GrTextureProxy> proxy;
770 proxy = proxyProvider->findOrCreateProxyByUniqueKey(key, kTopLeft_GrSurfaceOrigin);
771 if (proxy) {
774 if (!willBeMipped || GrMipMapped::kYes == proxy->mipMapped()) {
775 return proxy;
788 if (!proxy) {
794 if ((proxy = generator->generateTexture(ctx, genPixelsInfo, fOrigin, behavior,
798 set_key_on_proxy(proxyProvider, proxy.get(), nullptr, key);
799 if (!willBeMipped || GrMipMapped::kYes == proxy->mipMapped()) {
800 return proxy;
807 if (!proxy && !willBeMipped && !ctx->contextPriv().disableGpuYUVConversion()) {
821 proxy = provider.refAsTextureProxy(ctx, desc, generatorColorSpace, thisColorSpace);
822 if (proxy) {
825 set_key_on_proxy(proxyProvider, proxy.get(), nullptr, key);
826 return proxy;
832 if (!proxy && this->lockAsBitmap(&bitmap, chint, format, genPixelsInfo, behavior)) {
834 proxy = GrGenerateMipMapsAndUploadToTextureProxy(proxyProvider, bitmap, dstColorSpace);
836 if (!proxy) {
837 proxy = GrUploadBitmapToTextureProxy(proxyProvider, bitmap, dstColorSpace);
839 if (proxy && (!willBeMipped || GrMipMapped::kYes == proxy->mipMapped())) {
842 set_key_on_proxy(proxyProvider, proxy.get(), nullptr, key);
843 return proxy;
847 if (proxy) {
848 // We need a mipped proxy, but we either found a proxy earlier that wasn't mipped, generated
849 // a native non mipped proxy, or generated a non-mipped yuv proxy. Thus we generate a new
850 // mipped surface and copy the original proxy into the base layer. We will then let the gpu
853 SkASSERT(GrMipMapped::kNo == proxy->mipMapped());
854 if (auto mippedProxy = GrCopyBaseMipMapToTextureProxy(ctx, proxy.get())) {
855 set_key_on_proxy(proxyProvider, mippedProxy.get(), proxy.get(), key);
858 // We failed to make a mipped proxy with the base copied into it. This could have
859 // been from failure to make the proxy or failure to do the copy. Thus we will fall
860 // back to just using the non mipped proxy; See skbug.com/7094.
861 return proxy;