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

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

Issue 23604040: Merge 220427 "Android: Disable virtual contexts for NV and QC on..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1599/src/
Patch Set: Created 7 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 | Annotate | Revision Log
« 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) 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 24 matching lines...) Expand all
35 #include "ui/gl/gpu_switching_manager.h" 35 #include "ui/gl/gpu_switching_manager.h"
36 #include "webkit/common/webpreferences.h" 36 #include "webkit/common/webpreferences.h"
37 37
38 #if defined(OS_MACOSX) 38 #if defined(OS_MACOSX)
39 #include <ApplicationServices/ApplicationServices.h> 39 #include <ApplicationServices/ApplicationServices.h>
40 #endif // OS_MACOSX 40 #endif // OS_MACOSX
41 #if defined(OS_WIN) 41 #if defined(OS_WIN)
42 #include "base/win/windows_version.h" 42 #include "base/win/windows_version.h"
43 #endif // OS_WIN 43 #endif // OS_WIN
44 #if defined(OS_ANDROID) 44 #if defined(OS_ANDROID)
45 #include "base/android/build_info.h"
45 #include "ui/gfx/android/device_display_info.h" 46 #include "ui/gfx/android/device_display_info.h"
46 #endif // OS_ANDROID 47 #endif // OS_ANDROID
47 48
48 namespace content { 49 namespace content {
49 50
50 namespace { 51 namespace {
51 52
52 enum GpuFeatureStatus { 53 enum GpuFeatureStatus {
53 kGpuFeatureEnabled = 0, 54 kGpuFeatureEnabled = 0,
54 kGpuFeatureBlacklisted = 1, 55 kGpuFeatureBlacklisted = 1,
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 272
272 bool is_vivante = 273 bool is_vivante =
273 gpu_info.gl_extensions.find("GL_VIV_shader_binary") != 274 gpu_info.gl_extensions.find("GL_VIV_shader_binary") !=
274 std::string::npos; 275 std::string::npos;
275 276
276 bool is_nexus7 = 277 bool is_nexus7 =
277 gpu_info.machine_model.find("Nexus 7") != std::string::npos; 278 gpu_info.machine_model.find("Nexus 7") != std::string::npos;
278 bool is_nexus10 = 279 bool is_nexus10 =
279 gpu_info.machine_model.find("Nexus 10") != std::string::npos; 280 gpu_info.machine_model.find("Nexus 10") != std::string::npos;
280 281
282 int sdk_int = base::android::BuildInfo::GetInstance()->sdk_int();
283
281 // IMG: avoid context switching perf problems, crashes with share groups 284 // IMG: avoid context switching perf problems, crashes with share groups
282 // Mali-T604: http://crbug.com/154715 285 // Mali-T604: http://crbug.com/154715
283 // QualComm, NVIDIA: Crashes with share groups 286 // QualComm, NVIDIA: Crashes with share groups
284 if (is_vivante || is_img || is_mali_t604 || is_nvidia || is_qualcomm || 287 if (is_vivante || is_img || is_mali_t604 ||
285 is_broadcom) 288 ((is_nvidia || is_qualcomm) && sdk_int < 18) || is_broadcom) {
286 command_line->AppendSwitch(switches::kEnableVirtualGLContexts); 289 command_line->AppendSwitch(switches::kEnableVirtualGLContexts);
290 }
287 291
288 gfx::DeviceDisplayInfo info; 292 gfx::DeviceDisplayInfo info;
289 int default_tile_size = 256; 293 int default_tile_size = 256;
290 294
291 // For very high resolution displays (eg. Nexus 10), set the default 295 // For very high resolution displays (eg. Nexus 10), set the default
292 // 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
293 // hueristic that works across all platforms and devices, once that 297 // hueristic that works across all platforms and devices, once that
294 // exists: http://crbug.com/159524. This switches to 512 for screens 298 // exists: http://crbug.com/159524. This switches to 512 for screens
295 // containing 40 or more 256x256 tiles, such that 1080p devices do 299 // containing 40 or more 256x256 tiles, such that 1080p devices do
296 // not use 512x512 tiles (eg. 1920x1280 requires 37.5 tiles) 300 // not use 512x512 tiles (eg. 1920x1280 requires 37.5 tiles)
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { 1244 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() {
1241 gpu_process_accessible_ = false; 1245 gpu_process_accessible_ = false;
1242 gpu_info_.finalized = true; 1246 gpu_info_.finalized = true;
1243 complete_gpu_info_already_requested_ = true; 1247 complete_gpu_info_already_requested_ = true;
1244 // Some observers might be waiting. 1248 // Some observers might be waiting.
1245 NotifyGpuInfoUpdate(); 1249 NotifyGpuInfoUpdate();
1246 } 1250 }
1247 1251
1248 } // namespace content 1252 } // namespace content
1249 1253
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