| 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 !command_line.HasSwitch(switches::kDisableGpuRasterization)) { | 429 !command_line.HasSwitch(switches::kDisableGpuRasterization)) { |
| 430 if (command_line.HasSwitch(switches::kForceGpuRasterization)) { | 430 if (command_line.HasSwitch(switches::kForceGpuRasterization)) { |
| 431 is_gpu_rasterization_forced_ = true; | 431 is_gpu_rasterization_forced_ = true; |
| 432 } else if (command_line.HasSwitch(switches::kEnableGpuRasterization) || | 432 } else if (command_line.HasSwitch(switches::kEnableGpuRasterization) || |
| 433 command_line.HasSwitch( | 433 command_line.HasSwitch( |
| 434 switches::kEnableBleedingEdgeRenderingFastPaths)) { | 434 switches::kEnableBleedingEdgeRenderingFastPaths)) { |
| 435 is_gpu_rasterization_enabled_ = true; | 435 is_gpu_rasterization_enabled_ = true; |
| 436 } | 436 } |
| 437 } | 437 } |
| 438 | 438 |
| 439 is_low_res_tiling_enabled_ = !is_gpu_rasterization_enabled_; |
| 440 if (command_line.HasSwitch(switches::kDisableLowResTiling) && |
| 441 !command_line.HasSwitch(switches::kEnableLowResTiling)) { |
| 442 is_low_res_tiling_enabled_ = false; |
| 443 } |
| 444 |
| 439 // Note that under Linux, the media library will normally already have | 445 // Note that under Linux, the media library will normally already have |
| 440 // been initialized by the Zygote before this instance became a Renderer. | 446 // been initialized by the Zygote before this instance became a Renderer. |
| 441 base::FilePath media_path; | 447 base::FilePath media_path; |
| 442 PathService::Get(DIR_MEDIA_LIBS, &media_path); | 448 PathService::Get(DIR_MEDIA_LIBS, &media_path); |
| 443 if (!media_path.empty()) | 449 if (!media_path.empty()) |
| 444 media::InitializeMediaLibrary(media_path); | 450 media::InitializeMediaLibrary(media_path); |
| 445 | 451 |
| 446 memory_pressure_listener_.reset(new base::MemoryPressureListener( | 452 memory_pressure_listener_.reset(new base::MemoryPressureListener( |
| 447 base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this)))); | 453 base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this)))); |
| 448 | 454 |
| (...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1489 hidden_widget_count_--; | 1495 hidden_widget_count_--; |
| 1490 | 1496 |
| 1491 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1497 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1492 return; | 1498 return; |
| 1493 } | 1499 } |
| 1494 | 1500 |
| 1495 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1501 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1496 } | 1502 } |
| 1497 | 1503 |
| 1498 } // namespace content | 1504 } // namespace content |
| OLD | NEW |