| 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 command_line.HasSwitch(switches::kForceGpuRasterization); | 507 command_line.HasSwitch(switches::kForceGpuRasterization); |
| 508 | 508 |
| 509 if (command_line.HasSwitch(switches::kDisableDistanceFieldText)) { | 509 if (command_line.HasSwitch(switches::kDisableDistanceFieldText)) { |
| 510 is_distance_field_text_enabled_ = false; | 510 is_distance_field_text_enabled_ = false; |
| 511 } else if (command_line.HasSwitch(switches::kEnableDistanceFieldText)) { | 511 } else if (command_line.HasSwitch(switches::kEnableDistanceFieldText)) { |
| 512 is_distance_field_text_enabled_ = true; | 512 is_distance_field_text_enabled_ = true; |
| 513 } else { | 513 } else { |
| 514 is_distance_field_text_enabled_ = false; | 514 is_distance_field_text_enabled_ = false; |
| 515 } | 515 } |
| 516 | 516 |
| 517 is_low_res_tiling_enabled_ = true; | |
| 518 if (command_line.HasSwitch(switches::kDisableLowResTiling) && | |
| 519 !command_line.HasSwitch(switches::kEnableLowResTiling)) { | |
| 520 is_low_res_tiling_enabled_ = false; | |
| 521 } | |
| 522 | |
| 523 // Note that under Linux, the media library will normally already have | 517 // Note that under Linux, the media library will normally already have |
| 524 // been initialized by the Zygote before this instance became a Renderer. | 518 // been initialized by the Zygote before this instance became a Renderer. |
| 525 base::FilePath media_path; | 519 base::FilePath media_path; |
| 526 PathService::Get(DIR_MEDIA_LIBS, &media_path); | 520 PathService::Get(DIR_MEDIA_LIBS, &media_path); |
| 527 if (!media_path.empty()) | 521 if (!media_path.empty()) |
| 528 media::InitializeMediaLibrary(media_path); | 522 media::InitializeMediaLibrary(media_path); |
| 529 | 523 |
| 530 memory_pressure_listener_.reset(new base::MemoryPressureListener( | 524 memory_pressure_listener_.reset(new base::MemoryPressureListener( |
| 531 base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this)))); | 525 base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this)))); |
| 532 | 526 |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1653 hidden_widget_count_--; | 1647 hidden_widget_count_--; |
| 1654 | 1648 |
| 1655 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1649 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1656 return; | 1650 return; |
| 1657 } | 1651 } |
| 1658 | 1652 |
| 1659 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1653 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1660 } | 1654 } |
| 1661 | 1655 |
| 1662 } // namespace content | 1656 } // namespace content |
| OLD | NEW |