Lines Matching defs:proxy
125 auto proxy = src.refProxy();
126 return {GrCopyBaseMipMapToTextureProxy(context, proxy, origin, budgeted), origin, swizzle};
163 auto proxy = proxyProvider->createProxyFromBitmap(bmpToUpload, mipmapped, fit, budgeted);
164 SkASSERT(!proxy || mipmapped == GrMipmapped::kNo || proxy->mipmapped() == GrMipmapped::kYes);
165 return proxy;
187 auto installKey = [&](GrTextureProxy* proxy) {
190 proxyProvider->assignUniqueKeyToProxy(key, proxy);
193 sk_sp<GrTextureProxy> proxy = proxyProvider->findOrCreateProxyByUniqueKey(key);
194 if (!proxy) {
195 proxy = make_bmp_proxy(proxyProvider,
201 if (!proxy) {
204 SkASSERT(mipmapped == GrMipmapped::kNo || proxy->mipmapped() == GrMipmapped::kYes);
205 installKey(proxy.get());
208 GrSwizzle swizzle = caps->getReadSwizzle(proxy->backendFormat(), ct);
209 if (mipmapped == GrMipmapped::kNo || proxy->mipmapped() == GrMipmapped::kYes) {
210 return {{std::move(proxy), kTopLeft_GrSurfaceOrigin, swizzle}, ct};
213 // We need a mipped proxy, but we found a proxy earlier that wasn't mipped. Thus we generate
214 // a new mipped surface and copy the original proxy into the base layer. We will then let
216 auto mippedProxy = GrCopyBaseMipMapToTextureProxy(rContext, proxy, kTopLeft_GrSurfaceOrigin);
218 // We failed to make a mipped proxy with the base copied into it. This could have
219 // been from failure to make the proxy or failure to do the copy. Thus we will fall
220 // back to just using the non mipped proxy; See skbug.com/7094.
221 return {{std::move(proxy), kTopLeft_GrSurfaceOrigin, swizzle}, ct};
223 // In this case we are stealing the key from the original proxy which should only happen
224 // when we have just generated mipmaps for an originally unmipped proxy/texture. This
227 // proxy referencing it is deleted at which time it too will be deleted or recycled.
228 SkASSERT(proxy->getUniqueKey() == key);
229 proxyProvider->removeUniqueKeyFromProxy(proxy.get());
246 if (auto proxy = make_bmp_proxy(proxyProvider, bitmap, ct, mipmapped, fit, budgeted)) {
247 GrSwizzle swizzle = caps->getReadSwizzle(proxy->backendFormat(), ct);
248 SkASSERT(mipmapped == GrMipmapped::kNo || proxy->mipmapped() == GrMipmapped::kYes);
249 return {{std::move(proxy), kTopLeft_GrSurfaceOrigin, swizzle}, ct};