Lines Matching refs:texture
49 bool GrTexture::StealBackendTexture(sk_sp<GrTexture> texture,
52 if (!texture->surfacePriv().hasUniqueRef() || texture->surfacePriv().hasPendingIO()) {
56 if (!texture->onStealBackendTexture(backendTexture, releaseProc)) {
60 GrResourceCache* cache = texture->getContext()->contextPriv().getResourceCache();
63 // Ensure that the texture will be released by the cache when we drop the last ref.
64 // A texture that has no refs and no keys should be immediately removed.
65 if (texture->getUniqueKey().isValid()) {
66 texture->resourcePriv().removeUniqueKey();
68 if (texture->resourcePriv().getScratchKey().isValid()) {
69 texture->resourcePriv().removeScratchKey();
72 texture.reset();