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

Unified Diff: content/browser/gpu/gpu_process_host.cc

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 | « no previous file | content/browser/gpu/shader_disk_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 8329c4ee60fa2dc1b97b2a2c2d55002cdf2e28cb..e03e5a4443a29f7b4f8956b4bba1550140fca345 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -293,6 +293,14 @@ class GpuSandboxedProcessLauncherDelegate
#endif // OS_WIN
};
+void HostLoadedShader(int host_id,
+ const std::string& key,
+ const std::string& data) {
+ GpuProcessHost* host = GpuProcessHost::FromID(host_id);
+ if (host)
+ host->LoadedShader(key, data);
+}
+
} // anonymous namespace
class GpuProcessHost::ConnectionFilterImpl : public ConnectionFilter {
@@ -1150,7 +1158,7 @@ void GpuProcessHost::CreateChannelCache(int32_t client_id) {
if (!cache.get())
return;
- cache->set_host_id(host_id_);
+ cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_));
client_id_to_shader_cache_[client_id] = cache;
}
« no previous file with comments | « no previous file | content/browser/gpu/shader_disk_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698