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

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

Issue 547073002: content: Make sure GpuProcessHost replies to all outstanding CreateGpuMemoryBuffer requests when GP… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | 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 "base/base64.h" 7 #include "base/base64.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 channel_requests_.pop(); 921 channel_requests_.pop();
922 callback.Run(IPC::ChannelHandle(), gpu::GPUInfo()); 922 callback.Run(IPC::ChannelHandle(), gpu::GPUInfo());
923 } 923 }
924 924
925 while (!create_command_buffer_requests_.empty()) { 925 while (!create_command_buffer_requests_.empty()) {
926 CreateCommandBufferCallback callback = 926 CreateCommandBufferCallback callback =
927 create_command_buffer_requests_.front(); 927 create_command_buffer_requests_.front();
928 create_command_buffer_requests_.pop(); 928 create_command_buffer_requests_.pop();
929 callback.Run(CREATE_COMMAND_BUFFER_FAILED_AND_CHANNEL_LOST); 929 callback.Run(CREATE_COMMAND_BUFFER_FAILED_AND_CHANNEL_LOST);
930 } 930 }
931
932 while (!create_gpu_memory_buffer_requests_.empty()) {
933 CreateGpuMemoryBufferCallback callback =
934 create_gpu_memory_buffer_requests_.front();
935 create_gpu_memory_buffer_requests_.pop();
936 callback.Run(gfx::GpuMemoryBufferHandle());
937 }
931 } 938 }
932 939
933 void GpuProcessHost::BlockLiveOffscreenContexts() { 940 void GpuProcessHost::BlockLiveOffscreenContexts() {
934 for (std::multiset<GURL>::iterator iter = 941 for (std::multiset<GURL>::iterator iter =
935 urls_with_live_offscreen_contexts_.begin(); 942 urls_with_live_offscreen_contexts_.begin();
936 iter != urls_with_live_offscreen_contexts_.end(); ++iter) { 943 iter != urls_with_live_offscreen_contexts_.end(); ++iter) {
937 GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs( 944 GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs(
938 *iter, GpuDataManagerImpl::DOMAIN_GUILT_UNKNOWN); 945 *iter, GpuDataManagerImpl::DOMAIN_GUILT_UNKNOWN);
939 } 946 }
940 } 947 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1057 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1051 ClientIdToShaderCacheMap::iterator iter = 1058 ClientIdToShaderCacheMap::iterator iter =
1052 client_id_to_shader_cache_.find(client_id); 1059 client_id_to_shader_cache_.find(client_id);
1053 // If the cache doesn't exist then this is an off the record profile. 1060 // If the cache doesn't exist then this is an off the record profile.
1054 if (iter == client_id_to_shader_cache_.end()) 1061 if (iter == client_id_to_shader_cache_.end())
1055 return; 1062 return;
1056 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1063 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1057 } 1064 }
1058 1065
1059 } // namespace content 1066 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698