Home | History | Annotate | Download | only in gpu

Lines Matching defs: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 = proxyProvider->createMipMapProxyFromBitmap(fBitmap);
54 if (!proxy) {
55 proxy = GrUploadBitmapToTextureProxy(proxyProvider, fBitmap);
57 if (proxy) {
59 proxyProvider->assignUniqueKeyToProxy(fOriginalKey, proxy.get());
61 if (!willBeMipped || GrMipMapped::kYes == proxy->mipMapped()) {
62 SkASSERT(proxy->origin() == kTopLeft_GrSurfaceOrigin);
67 return proxy;
72 if (proxy) {
74 SkASSERT(GrMipMapped::kNo == proxy->mipMapped());
75 // We need a mipped proxy, but we either found a proxy earlier that wasn't mipped or
76 // generated a non mipped proxy. Thus we generate a new mipped surface and copy the original
77 // proxy into the base layer. We will then let the gpu generate the rest of the mips.
78 if (auto mippedProxy = GrCopyBaseMipMapToTextureProxy(this->context(), proxy.get())) {
81 // In this case we are stealing the key from the original proxy which should only
83 // proxy/texture. This means that all future uses of the key will access the
85 // resource cache until the last texture proxy referencing it is deleted at which
87 SkASSERT(proxy->getUniqueKey() == fOriginalKey);
88 proxyProvider->removeUniqueKeyFromProxy(proxy.get());
95 // We failed to make a mipped proxy with the base copied into it. This could have
96 // been from failure to make the proxy or failure to do the copy. Thus we will fall
97 // back to just using the non mipped proxy; See skbug.com/7094.
98 return proxy;