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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 2753293003: gpu: Replace GpuMsg_CollectGraphicsInfo with mojom API. (Closed)
Patch Set: tot merge Created 3 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 1234
1235 void GpuProcessHost::LoadedShader(const std::string& key, 1235 void GpuProcessHost::LoadedShader(const std::string& key,
1236 const std::string& data) { 1236 const std::string& data) {
1237 std::string prefix = GetShaderPrefixKey(data); 1237 std::string prefix = GetShaderPrefixKey(data);
1238 bool prefix_ok = !key.compare(0, prefix.length(), prefix); 1238 bool prefix_ok = !key.compare(0, prefix.length(), prefix);
1239 UMA_HISTOGRAM_BOOLEAN("GPU.ShaderLoadPrefixOK", prefix_ok); 1239 UMA_HISTOGRAM_BOOLEAN("GPU.ShaderLoadPrefixOK", prefix_ok);
1240 if (prefix_ok) 1240 if (prefix_ok)
1241 gpu_service_ptr_->LoadedShader(data); 1241 gpu_service_ptr_->LoadedShader(data);
1242 } 1242 }
1243 1243
1244 ui::mojom::GpuService* GpuProcessHost::gpu_service() {
1245 DCHECK(gpu_service_ptr_.is_bound());
1246 return gpu_service_ptr_.get();
1247 }
1248
1244 void GpuProcessHost::CreateChannelCache(int32_t client_id) { 1249 void GpuProcessHost::CreateChannelCache(int32_t client_id) {
1245 TRACE_EVENT0("gpu", "GpuProcessHost::CreateChannelCache"); 1250 TRACE_EVENT0("gpu", "GpuProcessHost::CreateChannelCache");
1246 1251
1247 scoped_refptr<gpu::ShaderDiskCache> cache = 1252 scoped_refptr<gpu::ShaderDiskCache> cache =
1248 GetShaderCacheFactorySingleton()->Get(client_id); 1253 GetShaderCacheFactorySingleton()->Get(client_id);
1249 if (!cache.get()) 1254 if (!cache.get())
1250 return; 1255 return;
1251 1256
1252 cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_)); 1257 cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_));
1253 1258
1254 client_id_to_shader_cache_[client_id] = cache; 1259 client_id_to_shader_cache_[client_id] = cache;
1255 } 1260 }
1256 1261
1257 } // namespace content 1262 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698