| OLD | NEW |
| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessExitCode", | 486 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessExitCode", |
| 487 exit_code, | 487 exit_code, |
| 488 RESULT_CODE_LAST_CODE); | 488 RESULT_CODE_LAST_CODE); |
| 489 } | 489 } |
| 490 | 490 |
| 491 switch (status) { | 491 switch (status) { |
| 492 case base::TERMINATION_STATUS_NORMAL_TERMINATION: | 492 case base::TERMINATION_STATUS_NORMAL_TERMINATION: |
| 493 // Don't block offscreen contexts (and force page reload for webgl) | 493 // Don't block offscreen contexts (and force page reload for webgl) |
| 494 // if this was an intentional shutdown or the OOM killer on Android | 494 // if this was an intentional shutdown or the OOM killer on Android |
| 495 // killed us while Chrome was in the background. | 495 // killed us while Chrome was in the background. |
| 496 // Restrict this to Android for now, since other platforms might fall through |
| 497 // here for the 'exit_on_context_lost' workaround. |
| 498 #if defined(OS_ANDROID) |
| 496 block_offscreen_contexts = false; | 499 block_offscreen_contexts = false; |
| 500 #endif |
| 497 message = "The GPU process exited normally. Everything is okay."; | 501 message = "The GPU process exited normally. Everything is okay."; |
| 498 break; | 502 break; |
| 499 case base::TERMINATION_STATUS_ABNORMAL_TERMINATION: | 503 case base::TERMINATION_STATUS_ABNORMAL_TERMINATION: |
| 500 message = base::StringPrintf( | 504 message = base::StringPrintf( |
| 501 "The GPU process exited with code %d.", | 505 "The GPU process exited with code %d.", |
| 502 exit_code); | 506 exit_code); |
| 503 break; | 507 break; |
| 504 case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: | 508 case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: |
| 505 message = "You killed the GPU process! Why?"; | 509 message = "You killed the GPU process! Why?"; |
| 506 break; | 510 break; |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1167 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
| 1164 ClientIdToShaderCacheMap::iterator iter = | 1168 ClientIdToShaderCacheMap::iterator iter = |
| 1165 client_id_to_shader_cache_.find(client_id); | 1169 client_id_to_shader_cache_.find(client_id); |
| 1166 // If the cache doesn't exist then this is an off the record profile. | 1170 // If the cache doesn't exist then this is an off the record profile. |
| 1167 if (iter == client_id_to_shader_cache_.end()) | 1171 if (iter == client_id_to_shader_cache_.end()) |
| 1168 return; | 1172 return; |
| 1169 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1173 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
| 1170 } | 1174 } |
| 1171 | 1175 |
| 1172 } // namespace content | 1176 } // namespace content |
| OLD | NEW |