Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: content/browser/gpu/shader_disk_cache.h

Issue 2465153002: gpu: Remove some GpuProcessHost dependency from shader cache. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/gpu/shader_disk_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/shader_disk_cache.h
diff --git a/content/browser/gpu/shader_disk_cache.h b/content/browser/gpu/shader_disk_cache.h
index e86b4e6df6917e4375928c559cf85ab1e4bc3a38..740a14124b81b011bb0b58b5fb8dd8dbcb7e14bb 100644
--- a/content/browser/gpu/shader_disk_cache.h
+++ b/content/browser/gpu/shader_disk_cache.h
@@ -34,9 +34,13 @@ class CONTENT_EXPORT ShaderDiskCache
: public base::RefCounted<ShaderDiskCache>,
public base::SupportsWeakPtr<ShaderDiskCache> {
public:
+ using ShaderLoadedCallback =
+ base::Callback<void(const std::string&, const std::string&)>;
void Init();
- void set_host_id(int host_id) { host_id_ = host_id; }
+ void set_shader_loaded_callback(const ShaderLoadedCallback& callback) {
+ shader_loaded_callback_ = callback;
+ }
// Store the |shader| into the cache under |key|.
void Cache(const std::string& key, const std::string& shader);
@@ -84,11 +88,11 @@ class CONTENT_EXPORT ShaderDiskCache
void ReadComplete();
bool cache_available_;
- int host_id_;
base::FilePath cache_path_;
bool is_initialized_;
net::CompletionCallback available_callback_;
net::CompletionCallback cache_complete_callback_;
+ ShaderLoadedCallback shader_loaded_callback_;
std::unique_ptr<disk_cache::Backend> backend_;
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/gpu/shader_disk_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698