Home | History | Annotate | Download | only in gpu

Lines Matching defs:proxy

41         // In DDL-mode a proxy provider can still have extant uniquely keyed proxies (since
48 bool GrProxyProvider::assignUniqueKeyToProxy(const GrUniqueKey& key, GrTextureProxy* proxy) {
51 if (this->isAbandoned() || !proxy) {
70 proxy->cacheAccess().setUniqueKey(this, key);
71 SkASSERT(proxy->getUniqueKey() == key);
72 fUniquelyKeyedProxies.add(proxy);
76 void GrProxyProvider::adoptUniqueKeyFromSurface(GrTextureProxy* proxy, const GrSurface* surf) {
78 proxy->cacheAccess().setUniqueKey(this, surf->getUniqueKey());
79 SkASSERT(proxy->getUniqueKey() == surf->getUniqueKey());
82 fUniquelyKeyedProxies.add(proxy);
85 void GrProxyProvider::removeUniqueKeyFromProxy(GrTextureProxy* proxy) {
87 SkASSERT(proxy);
88 SkASSERT(proxy->getUniqueKey().isValid());
94 this->processInvalidUniqueKey(proxy->getUniqueKey(), proxy, InvalidateGPUResource::kYes);
248 sk_sp<GrTextureProxy> proxy = this->createLazyProxy(
263 if (!proxy) {
271 // In order to reuse code we always create a lazy proxy. When we aren't in DDL mode however
272 // we're better off instantiating the proxy immediately here.
273 if (!proxy->priv().doLazyInstantiation(resourceProvider)) {
278 SkASSERT(proxy->width() == desc.fWidth);
279 SkASSERT(proxy->height() == desc.fHeight);
280 return proxy;
351 sk_sp<GrTextureProxy> proxy = this->createLazyProxy(
378 if (!proxy) {
385 // In order to reuse code we always create a lazy proxy. When we aren't in DDL mode however
386 // we're better off instantiating the proxy immediately here.
387 if (!proxy->priv().doLazyInstantiation(resourceProvider)) {
391 return proxy;
439 sk_sp<GrTextureProxy> proxy = this->createLazyProxy(
449 if (!proxy) {
456 // In order to reuse code we always create a lazy proxy. When we aren't in DDL mode however
457 // we're better off instantiating the proxy immediately here.
458 if (!proxy->priv().doLazyInstantiation(resourceProvider)) {
462 return proxy;
496 // Make sure we match how we created the proxy with SkBudgeted::kNo
534 // Make sure we match how we created the proxy with SkBudgeted::kNo
566 // Make sure we match how we created the proxy with SkBudgeted::kNo
593 // This proxy should be unbudgeted because we're just wrapping an external resource
621 // This proxy should be unbudgeted because we're just wrapping an external resource
650 // For non-ddl draws always make lazy proxy's single use.
713 // For non-ddl draws always make lazy proxy's single use.
762 bool GrProxyProvider::IsFunctionallyExact(GrSurfaceProxy* proxy) {
763 const bool isInstantiated = proxy->isInstantiated();
764 // A proxy is functionally exact if:
767 // it is already instantiated and the proxy covers the entire backing surface
768 return proxy->priv().isExact() ||
769 (!isInstantiated && SkIsPow2(proxy->width()) && SkIsPow2(proxy->height())) ||
770 (isInstantiated && proxy->worstCaseWidth() == proxy->width() &&
771 proxy->worstCaseHeight() == proxy->height());
774 void GrProxyProvider::processInvalidUniqueKey(const GrUniqueKey& key, GrTextureProxy* proxy,
778 if (!proxy) {
779 proxy = fUniquelyKeyedProxies.find(key);
781 SkASSERT(!proxy || proxy->getUniqueKey() == key);
784 // proxy's unique key. We must do it in this order because 'key' may alias the proxy's key.
787 if (proxy && proxy->isInstantiated()) {
788 invalidGpuResource = sk_ref_sp(proxy->peekSurface());
802 if (proxy) {
804 proxy->cacheAccess().clearUniqueKey();