Lines Matching refs:proxy
41 sk_sp<GrTextureProxy> proxy;
44 proxy = proxyProvider->findOrCreateProxyByUniqueKey(fOriginalKey, kTopLeft_GrSurfaceOrigin);
45 if (proxy && (!willBeMipped || GrMipMapped::kYes == proxy->mipMapped())) {
46 return proxy;
50 if (!proxy) {
52 proxy = GrGenerateMipMapsAndUploadToTextureProxy(proxyProvider, fBitmap, dstColorSpace);
54 if (!proxy) {
55 proxy = GrUploadBitmapToTextureProxy(proxyProvider, fBitmap, dstColorSpace);
57 if (proxy) {
59 proxyProvider->assignUniqueKeyToProxy(fOriginalKey, proxy.get());
61 if (!willBeMipped || GrMipMapped::kYes == proxy->mipMapped()) {
62 SkASSERT(proxy->origin() == kTopLeft_GrSurfaceOrigin);
66 return proxy;
71 if (proxy) {
73 SkASSERT(GrMipMapped::kNo == proxy->mipMapped());
74 // We need a mipped proxy, but we either found a proxy earlier that wasn't mipped or
75 // generated a non mipped proxy. Thus we generate a new mipped surface and copy the original
76 // proxy into the base layer. We will then let the gpu generate the rest of the mips.
77 if (auto mippedProxy = GrCopyBaseMipMapToTextureProxy(this->context(), proxy.get())) {
80 // In this case we are stealing the key from the original proxy which should only
82 // proxy/texture. This means that all future uses of the key will access the
84 // resource cache until the last texture proxy referencing it is deleted at which
86 proxyProvider->removeUniqueKeyFromProxy(fOriginalKey, proxy.get());
92 // We failed to make a mipped proxy with the base copied into it. This could have
93 // been from failure to make the proxy or failure to do the copy. Thus we will fall
94 // back to just using the non mipped proxy; See skbug.com/7094.
95 return proxy;