Flutter Impeller
shader_key.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
6 
7 #include <atomic>
8 #include <cstdint>
9 
10 #include "third_party/abseil-cpp/absl/strings/str_cat.h"
11 
12 namespace impeller {
13 
15  static std::atomic<uint64_t> counter{0};
16  return absl::StrCat("auto:", counter.fetch_add(1, std::memory_order_relaxed));
17 }
18 
19 std::string ShaderKey::MakeUserScopedName(std::string_view scope,
20  std::string_view library_id,
21  std::string_view entrypoint) {
22  return absl::StrCat(scope, ":", library_id, ":", entrypoint);
23 }
24 
25 } // namespace impeller
static std::string MakeUserScopedName(std::string_view scope, std::string_view library_id, std::string_view entrypoint)
Definition: shader_key.cc:19
static std::string MakeFallbackLibraryId()
Definition: shader_key.cc:14