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

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

Issue 2127693002: Use ChannelMojo for GpuChannels. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-channel-gpu
Patch Set: rebase Created 4 years, 5 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
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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 RouteOnUIThread(GpuHostMsg_OnLogMessage( 815 RouteOnUIThread(GpuHostMsg_OnLogMessage(
816 logging::LOG_WARNING, "WARNING", 816 logging::LOG_WARNING, "WARNING",
817 "Received a ChannelEstablished message but no requests in queue.")); 817 "Received a ChannelEstablished message but no requests in queue."));
818 return; 818 return;
819 } 819 }
820 EstablishChannelRequest request = channel_requests_.front(); 820 EstablishChannelRequest request = channel_requests_.front();
821 channel_requests_.pop(); 821 channel_requests_.pop();
822 822
823 // Currently if any of the GPU features are blacklisted, we don't establish a 823 // Currently if any of the GPU features are blacklisted, we don't establish a
824 // GPU channel. 824 // GPU channel.
825 if (!channel_handle.name.empty() && 825 if (channel_handle.mojo_handle.is_valid() &&
826 !GpuDataManagerImpl::GetInstance()->GpuAccessAllowed(NULL)) { 826 !GpuDataManagerImpl::GetInstance()->GpuAccessAllowed(NULL)) {
827 Send(new GpuMsg_CloseChannel(request.client_id)); 827 Send(new GpuMsg_CloseChannel(request.client_id));
828 request.callback.Run(IPC::ChannelHandle(), gpu::GPUInfo()); 828 request.callback.Run(IPC::ChannelHandle(), gpu::GPUInfo());
829 RouteOnUIThread( 829 RouteOnUIThread(
830 GpuHostMsg_OnLogMessage(logging::LOG_WARNING, "WARNING", 830 GpuHostMsg_OnLogMessage(logging::LOG_WARNING, "WARNING",
831 "Hardware acceleration is unavailable.")); 831 "Hardware acceleration is unavailable."));
832 return; 832 return;
833 } 833 }
834 834
835 request.callback.Run(channel_handle, gpu_info_); 835 request.callback.Run(channel_handle, gpu_info_);
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1188 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1189 ClientIdToShaderCacheMap::iterator iter = 1189 ClientIdToShaderCacheMap::iterator iter =
1190 client_id_to_shader_cache_.find(client_id); 1190 client_id_to_shader_cache_.find(client_id);
1191 // If the cache doesn't exist then this is an off the record profile. 1191 // If the cache doesn't exist then this is an off the record profile.
1192 if (iter == client_id_to_shader_cache_.end()) 1192 if (iter == client_id_to_shader_cache_.end())
1193 return; 1193 return;
1194 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1194 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1195 } 1195 }
1196 1196
1197 } // namespace content 1197 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_channel_host_factory.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698