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

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

Issue 22144008: cc: Make 1/4th default low res scale. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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) 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 gpu_info.gl_vendor.find("Broadcom") != std::string::npos; 262 gpu_info.gl_vendor.find("Broadcom") != std::string::npos;
263 bool is_mali_t604 = is_arm && 263 bool is_mali_t604 = is_arm &&
264 gpu_info.gl_renderer.find("Mali-T604") != std::string::npos; 264 gpu_info.gl_renderer.find("Mali-T604") != std::string::npos;
265 bool is_nvidia = 265 bool is_nvidia =
266 gpu_info.gl_vendor.find("NVIDIA") != std::string::npos; 266 gpu_info.gl_vendor.find("NVIDIA") != std::string::npos;
267 267
268 bool is_vivante = 268 bool is_vivante =
269 gpu_info.gl_extensions.find("GL_VIV_shader_binary") != 269 gpu_info.gl_extensions.find("GL_VIV_shader_binary") !=
270 std::string::npos; 270 std::string::npos;
271 271
272 bool is_nexus7 =
273 gpu_info.machine_model.find("Nexus 7") != std::string::npos;
274 bool is_nexus10 =
275 gpu_info.machine_model.find("Nexus 10") != std::string::npos;
276
277 // IMG: avoid context switching perf problems, crashes with share groups 272 // IMG: avoid context switching perf problems, crashes with share groups
278 // Mali-T604: http://crbug.com/154715 273 // Mali-T604: http://crbug.com/154715
279 // QualComm, NVIDIA: Crashes with share groups 274 // QualComm, NVIDIA: Crashes with share groups
280 if (is_vivante || is_img || is_mali_t604 || is_nvidia || is_qualcomm || 275 if (is_vivante || is_img || is_mali_t604 || is_nvidia || is_qualcomm ||
281 is_broadcom) 276 is_broadcom)
282 command_line->AppendSwitch(switches::kEnableVirtualGLContexts); 277 command_line->AppendSwitch(switches::kEnableVirtualGLContexts);
283 278
284 gfx::DeviceDisplayInfo info; 279 gfx::DeviceDisplayInfo info;
285 int default_tile_size = 256; 280 int default_tile_size = 256;
286 281
(...skipping 24 matching lines...) Expand all
311 if (default_tile_size != 256 && 306 if (default_tile_size != 256 &&
312 !command_line->HasSwitch(switches::kDefaultTileWidth) && 307 !command_line->HasSwitch(switches::kDefaultTileWidth) &&
313 !command_line->HasSwitch(switches::kDefaultTileHeight)) { 308 !command_line->HasSwitch(switches::kDefaultTileHeight)) {
314 std::stringstream size; 309 std::stringstream size;
315 size << default_tile_size; 310 size << default_tile_size;
316 command_line->AppendSwitchASCII( 311 command_line->AppendSwitchASCII(
317 switches::kDefaultTileWidth, size.str()); 312 switches::kDefaultTileWidth, size.str());
318 command_line->AppendSwitchASCII( 313 command_line->AppendSwitchASCII(
319 switches::kDefaultTileHeight, size.str()); 314 switches::kDefaultTileHeight, size.str());
320 } 315 }
321
322 // Increase the resolution of low resolution tiles for Nexus tablets.
323 if ((is_nexus7 || is_nexus10) &&
324 !command_line->HasSwitch(
325 cc::switches::kLowResolutionContentsScaleFactor)) {
326 command_line->AppendSwitchASCII(
327 cc::switches::kLowResolutionContentsScaleFactor, "0.25");
328 }
329 } 316 }
330 #endif // OS_ANDROID 317 #endif // OS_ANDROID
331 318
332 // Block all domains' use of 3D APIs for this many milliseconds if 319 // Block all domains' use of 3D APIs for this many milliseconds if
333 // approaching a threshold where system stability might be compromised. 320 // approaching a threshold where system stability might be compromised.
334 const int64 kBlockAllDomainsMs = 10000; 321 const int64 kBlockAllDomainsMs = 10000;
335 const int kNumResetsWithinDuration = 1; 322 const int kNumResetsWithinDuration = 1;
336 323
337 // Enums for UMA histograms. 324 // Enums for UMA histograms.
338 enum BlockStatusHistogram { 325 enum BlockStatusHistogram {
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { 1221 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() {
1235 gpu_process_accessible_ = false; 1222 gpu_process_accessible_ = false;
1236 gpu_info_.finalized = true; 1223 gpu_info_.finalized = true;
1237 complete_gpu_info_already_requested_ = true; 1224 complete_gpu_info_already_requested_ = true;
1238 // Some observers might be waiting. 1225 // Some observers might be waiting.
1239 NotifyGpuInfoUpdate(); 1226 NotifyGpuInfoUpdate();
1240 } 1227 }
1241 1228
1242 } // namespace content 1229 } // namespace content
1243 1230
OLDNEW
« cc/trees/layer_tree_settings.cc ('K') | « cc/trees/layer_tree_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698