Project import generated by Copybara.
GitOrigin-RevId: 6e5aa035cd1f6a9333962df5d3ab97a05bd5744e
This commit is contained in:
committed by
Sebastian Schmidt
parent
4a20e9909d
commit
c688862570
@@ -8,14 +8,14 @@ using StorageConverter = GpuBufferStorageRegistry::StorageConverter;
|
||||
using RegistryToken = GpuBufferStorageRegistry::RegistryToken;
|
||||
|
||||
StorageFactory GpuBufferStorageRegistry::StorageFactoryForViewProvider(
|
||||
TypeRef view_provider_type) {
|
||||
TypeId view_provider_type) {
|
||||
auto it = factory_for_view_provider_.find(view_provider_type);
|
||||
if (it == factory_for_view_provider_.end()) return nullptr;
|
||||
return it->second;
|
||||
}
|
||||
|
||||
StorageConverter GpuBufferStorageRegistry::StorageConverterForViewProvider(
|
||||
TypeRef view_provider_type, TypeRef existing_storage_type) {
|
||||
TypeId view_provider_type, TypeId existing_storage_type) {
|
||||
auto it = converter_for_view_provider_and_existing_storage_.find(
|
||||
{view_provider_type, existing_storage_type});
|
||||
if (it == converter_for_view_provider_and_existing_storage_.end())
|
||||
@@ -24,7 +24,7 @@ StorageConverter GpuBufferStorageRegistry::StorageConverterForViewProvider(
|
||||
}
|
||||
|
||||
RegistryToken GpuBufferStorageRegistry::Register(
|
||||
StorageFactory factory, std::vector<TypeRef> provider_hashes) {
|
||||
StorageFactory factory, std::vector<TypeId> provider_hashes) {
|
||||
// TODO: choose between multiple factories for same provider type.
|
||||
for (const auto p : provider_hashes) {
|
||||
factory_for_view_provider_[p] = factory;
|
||||
@@ -33,8 +33,8 @@ RegistryToken GpuBufferStorageRegistry::Register(
|
||||
}
|
||||
|
||||
RegistryToken GpuBufferStorageRegistry::Register(
|
||||
StorageConverter converter, std::vector<TypeRef> provider_hashes,
|
||||
TypeRef source_storage) {
|
||||
StorageConverter converter, std::vector<TypeId> provider_hashes,
|
||||
TypeId source_storage) {
|
||||
// TODO: choose between multiple converters for same provider type.
|
||||
for (const auto p : provider_hashes) {
|
||||
converter_for_view_provider_and_existing_storage_[{p, source_storage}] =
|
||||
|
||||
Reference in New Issue
Block a user