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/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 !command_line.HasSwitch(switches::kDisableGpuRasterization)) { | 420 !command_line.HasSwitch(switches::kDisableGpuRasterization)) { |
421 if (command_line.HasSwitch(switches::kForceGpuRasterization)) { | 421 if (command_line.HasSwitch(switches::kForceGpuRasterization)) { |
422 is_gpu_rasterization_forced_ = true; | 422 is_gpu_rasterization_forced_ = true; |
423 } else if (command_line.HasSwitch(switches::kEnableGpuRasterization) || | 423 } else if (command_line.HasSwitch(switches::kEnableGpuRasterization) || |
424 command_line.HasSwitch( | 424 command_line.HasSwitch( |
425 switches::kEnableBleedingEdgeRenderingFastPaths)) { | 425 switches::kEnableBleedingEdgeRenderingFastPaths)) { |
426 is_gpu_rasterization_enabled_ = true; | 426 is_gpu_rasterization_enabled_ = true; |
427 } | 427 } |
428 } | 428 } |
429 | 429 |
| 430 is_low_res_tiling_enabled_ = !is_gpu_rasterization_enabled_; |
| 431 if (command_line.HasSwitch(switches::kDisableLowResTiling) && |
| 432 !command_line.HasSwitch(switches::kEnableLowResTiling)) { |
| 433 is_low_res_tiling_enabled_ = false; |
| 434 } |
| 435 |
430 // Note that under Linux, the media library will normally already have | 436 // Note that under Linux, the media library will normally already have |
431 // been initialized by the Zygote before this instance became a Renderer. | 437 // been initialized by the Zygote before this instance became a Renderer. |
432 base::FilePath media_path; | 438 base::FilePath media_path; |
433 PathService::Get(DIR_MEDIA_LIBS, &media_path); | 439 PathService::Get(DIR_MEDIA_LIBS, &media_path); |
434 if (!media_path.empty()) | 440 if (!media_path.empty()) |
435 media::InitializeMediaLibrary(media_path); | 441 media::InitializeMediaLibrary(media_path); |
436 | 442 |
437 memory_pressure_listener_.reset(new base::MemoryPressureListener( | 443 memory_pressure_listener_.reset(new base::MemoryPressureListener( |
438 base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this)))); | 444 base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this)))); |
439 | 445 |
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 hidden_widget_count_--; | 1460 hidden_widget_count_--; |
1455 | 1461 |
1456 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1462 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1457 return; | 1463 return; |
1458 } | 1464 } |
1459 | 1465 |
1460 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1466 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1461 } | 1467 } |
1462 | 1468 |
1463 } // namespace content | 1469 } // namespace content |
OLD | NEW |