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

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

Issue 1747283003: Remove redundant codepath for webgl api blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 <utility> 9 #include <utility>
10 10
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessExitCode", 487 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessExitCode",
488 exit_code, 488 exit_code,
489 RESULT_CODE_LAST_CODE); 489 RESULT_CODE_LAST_CODE);
490 } 490 }
491 491
492 switch (status) { 492 switch (status) {
493 case base::TERMINATION_STATUS_NORMAL_TERMINATION: 493 case base::TERMINATION_STATUS_NORMAL_TERMINATION:
494 // Don't block offscreen contexts (and force page reload for webgl) 494 // Don't block offscreen contexts (and force page reload for webgl)
495 // if this was an intentional shutdown or the OOM killer on Android 495 // if this was an intentional shutdown or the OOM killer on Android
496 // killed us while Chrome was in the background. 496 // killed us while Chrome was in the background.
497 // TODO(crbug.com/598400): Restrict this to Android for now, since other
498 // platforms might fall through here for the 'exit_on_context_lost' workaround.
499 #if defined(OS_ANDROID)
497 block_offscreen_contexts = false; 500 block_offscreen_contexts = false;
501 #endif
498 message = "The GPU process exited normally. Everything is okay."; 502 message = "The GPU process exited normally. Everything is okay.";
499 break; 503 break;
500 case base::TERMINATION_STATUS_ABNORMAL_TERMINATION: 504 case base::TERMINATION_STATUS_ABNORMAL_TERMINATION:
501 message = base::StringPrintf( 505 message = base::StringPrintf(
502 "The GPU process exited with code %d.", 506 "The GPU process exited with code %d.",
503 exit_code); 507 exit_code);
504 break; 508 break;
505 case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: 509 case base::TERMINATION_STATUS_PROCESS_WAS_KILLED:
506 message = "You killed the GPU process! Why?"; 510 message = "You killed the GPU process! Why?";
507 break; 511 break;
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1168 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1165 ClientIdToShaderCacheMap::iterator iter = 1169 ClientIdToShaderCacheMap::iterator iter =
1166 client_id_to_shader_cache_.find(client_id); 1170 client_id_to_shader_cache_.find(client_id);
1167 // If the cache doesn't exist then this is an off the record profile. 1171 // If the cache doesn't exist then this is an off the record profile.
1168 if (iter == client_id_to_shader_cache_.end()) 1172 if (iter == client_id_to_shader_cache_.end())
1169 return; 1173 return;
1170 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1174 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1171 } 1175 }
1172 1176
1173 } // namespace content 1177 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_message_filter.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698