| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_data_manager_impl_private.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 bool is_nexus7 = | 277 bool is_nexus7 = |
| 278 gpu_info.machine_model.find("Nexus 7") != std::string::npos; | 278 gpu_info.machine_model.find("Nexus 7") != std::string::npos; |
| 279 bool is_nexus10 = | 279 bool is_nexus10 = |
| 280 gpu_info.machine_model.find("Nexus 10") != std::string::npos; | 280 gpu_info.machine_model.find("Nexus 10") != std::string::npos; |
| 281 | 281 |
| 282 int sdk_int = base::android::BuildInfo::GetInstance()->sdk_int(); | 282 int sdk_int = base::android::BuildInfo::GetInstance()->sdk_int(); |
| 283 | 283 |
| 284 // IMG: avoid context switching perf problems, crashes with share groups | 284 // IMG: avoid context switching perf problems, crashes with share groups |
| 285 // Mali-T604: http://crbug.com/154715 | 285 // Mali-T604: http://crbug.com/154715 |
| 286 // QualComm, NVIDIA: Crashes with share groups | 286 // QualComm, NVIDIA: Crashes with share groups |
| 287 if (is_vivante || is_img || is_mali_t604 || | 287 if (is_vivante || is_img || is_mali_t604 || (is_nvidia && (sdk_int < 18)) || |
| 288 ((is_nvidia || is_qualcomm) && sdk_int < 18) || is_broadcom) { | 288 is_qualcomm || is_broadcom) { |
| 289 command_line->AppendSwitch(switches::kEnableVirtualGLContexts); | 289 command_line->AppendSwitch(switches::kEnableVirtualGLContexts); |
| 290 } | 290 } |
| 291 | 291 |
| 292 gfx::DeviceDisplayInfo info; | 292 gfx::DeviceDisplayInfo info; |
| 293 int default_tile_size = 256; | 293 int default_tile_size = 256; |
| 294 | 294 |
| 295 // For very high resolution displays (eg. Nexus 10), set the default | 295 // For very high resolution displays (eg. Nexus 10), set the default |
| 296 // tile size to be 512. This should be removed in favour of a generic | 296 // tile size to be 512. This should be removed in favour of a generic |
| 297 // hueristic that works across all platforms and devices, once that | 297 // hueristic that works across all platforms and devices, once that |
| 298 // exists: http://crbug.com/159524. This switches to 512 for screens | 298 // exists: http://crbug.com/159524. This switches to 512 for screens |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { | 1244 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { |
| 1245 gpu_process_accessible_ = false; | 1245 gpu_process_accessible_ = false; |
| 1246 gpu_info_.finalized = true; | 1246 gpu_info_.finalized = true; |
| 1247 complete_gpu_info_already_requested_ = true; | 1247 complete_gpu_info_already_requested_ = true; |
| 1248 // Some observers might be waiting. | 1248 // Some observers might be waiting. |
| 1249 NotifyGpuInfoUpdate(); | 1249 NotifyGpuInfoUpdate(); |
| 1250 } | 1250 } |
| 1251 | 1251 |
| 1252 } // namespace content | 1252 } // namespace content |
| 1253 | 1253 |
| OLD | NEW |