Lines Matching defs:proxy
51 bool GrProxyProvider::assignUniqueKeyToProxy(const GrUniqueKey& key, GrTextureProxy* proxy) {
54 if (this->isAbandoned() || !proxy) {
67 if (SkBudgeted::kNo == proxy->isBudgeted() &&
68 (!proxy->priv().isInstantiated() ||
69 !proxy->priv().peekSurface()->resourcePriv().refsWrappedObjects())) {
75 proxy->cacheAccess().setUniqueKey(this, key);
76 SkASSERT(proxy->getUniqueKey() == key);
77 fUniquelyKeyedProxies.add(proxy);
81 void GrProxyProvider::adoptUniqueKeyFromSurface(GrTextureProxy* proxy, const GrSurface* surf) {
83 proxy->cacheAccess().setUniqueKey(this, surf->getUniqueKey());
84 SkASSERT(proxy->getUniqueKey() == surf->getUniqueKey());
87 fUniquelyKeyedProxies.add(proxy);
90 void GrProxyProvider::removeUniqueKeyFromProxy(const GrUniqueKey& key, GrTextureProxy* proxy) {
92 if (this->isAbandoned() || !proxy) {
95 this->processInvalidProxyUniqueKey(key, proxy, true);
246 sk_sp<GrTextureProxy> proxy = this->createLazyProxy(
250 // Nothing to clean up here. Once the proxy (and thus lambda) is deleted the ref
262 // In order to reuse code we always create a lazy proxy. When we aren't in DDL mode however
263 // we're better off instantiating the proxy immediately here.
264 if (!proxy->priv().doLazyInstantiation(fResourceProvider)) {
268 return proxy;
326 sk_sp<GrTextureProxy> proxy = this->createLazyProxy(
357 // In order to reuse code we always create a lazy proxy. When we aren't in DDL mode however
358 // we're better off instantiating the proxy immediately here.
359 if (!proxy->priv().doLazyInstantiation(fResourceProvider)) {
363 return proxy;
424 sk_sp<GrTextureProxy> proxy = this->createLazyProxy(
444 // Make sure we match how we created the proxy with SkBudgeted::kNo
451 // In order to reuse code we always create a lazy proxy. When we aren't in DDL mode however,
452 // we're better off instantiating the proxy immediately here.
453 if (!proxy->priv().doLazyInstantiation(fResourceProvider)) {
457 return proxy;
489 sk_sp<GrTextureProxy> proxy = this->createLazyProxy(
501 // Make sure we match how we created the proxy with SkBudgeted::kNo
508 // In order to reuse code we always create a lazy proxy. When we aren't in DDL mode however,
509 // we're better off instantiating the proxy immediately here.
510 if (!proxy->priv().doLazyInstantiation(fResourceProvider)) {
514 return proxy;
540 sk_sp<GrRenderTargetProxy> proxy = this->createLazyRenderTargetProxy(
552 // Make sure we match how we created the proxy with SkBudgeted::kNo
560 // In order to reuse code we always create a lazy proxy. When we aren't in DDL mode however,
561 // we're better off instantiating the proxy immediately here.
562 if (!proxy->priv().doLazyInstantiation(fResourceProvider)) {
566 return proxy;
598 sk_sp<GrRenderTargetProxy> proxy = this->createLazyRenderTargetProxy(
611 // Make sure we match how we created the proxy with SkBudgeted::kNo
619 // In order to reuse code we always create a lazy proxy. When we aren't in DDL mode however,
620 // we're better off instantiating the proxy immediately here.
621 if (!proxy->priv().doLazyInstantiation(fResourceProvider)) {
625 return proxy;
657 // For non-ddl draws always make lazy proxy's single use.
691 // For non-ddl draws always make lazy proxy's single use.
730 bool GrProxyProvider::IsFunctionallyExact(GrSurfaceProxy* proxy) {
731 return proxy->priv().isExact() || (SkIsPow2(proxy->width()) && SkIsPow2(proxy->height()));
737 GrTextureProxy* proxy = fUniquelyKeyedProxies.find(key);
738 if (proxy) {
739 this->processInvalidProxyUniqueKey(key, proxy, false);
743 void GrProxyProvider::processInvalidProxyUniqueKey(const GrUniqueKey& key, GrTextureProxy* proxy,
745 SkASSERT(proxy);
746 SkASSERT(proxy->getUniqueKey().isValid());
747 SkASSERT(proxy->getUniqueKey() == key);
750 proxy->cacheAccess().clearUniqueKey();
752 if (invalidateSurface && proxy->priv().isInstantiated()) {
753 GrSurface* surface = proxy->priv().peekSurface();