| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/client/feature/compositor/blimp_layer_tree_settings.h" | 5 #include "blimp/client/feature/compositor/blimp_layer_tree_settings.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 settings->scrollbar_fade_resize_delay_ms = 500; | 95 settings->scrollbar_fade_resize_delay_ms = 500; |
| 96 settings->scrollbar_fade_duration_ms = 300; | 96 settings->scrollbar_fade_duration_ms = 300; |
| 97 | 97 |
| 98 // When pinching in, only show the pinch-viewport overlay scrollbars if the | 98 // When pinching in, only show the pinch-viewport overlay scrollbars if the |
| 99 // page scale is at least some threshold away from the minimum. i.e. don't | 99 // page scale is at least some threshold away from the minimum. i.e. don't |
| 100 // show the pinch scrollbars when at minimum scale. | 100 // show the pinch scrollbars when at minimum scale. |
| 101 // TODO(dtrainor): Update this since https://crrev.com/1267603004 landed. | 101 // TODO(dtrainor): Update this since https://crrev.com/1267603004 landed. |
| 102 // settings->scrollbar_show_scale_threshold = 1.05f; | 102 // settings->scrollbar_show_scale_threshold = 1.05f; |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 // Blimp always uses new cc::AnimationHost system. | |
| 106 settings->use_compositor_animation_timelines = true; | |
| 107 | |
| 108 // Set the GpuMemoryPolicy. | 105 // Set the GpuMemoryPolicy. |
| 109 cc::ManagedMemoryPolicy memory_policy = settings->memory_policy_; | 106 cc::ManagedMemoryPolicy memory_policy = settings->memory_policy_; |
| 110 memory_policy.bytes_limit_when_visible = 0; | 107 memory_policy.bytes_limit_when_visible = 0; |
| 111 | 108 |
| 112 #if defined(OS_ANDROID) | 109 #if defined(OS_ANDROID) |
| 113 // We can't query available GPU memory from the system on Android. | 110 // We can't query available GPU memory from the system on Android. |
| 114 // Physical memory is also mis-reported sometimes (eg. Nexus 10 reports | 111 // Physical memory is also mis-reported sometimes (eg. Nexus 10 reports |
| 115 // 1262MB when it actually has 2GB, while Razr M has 1GB but only reports | 112 // 1262MB when it actually has 2GB, while Razr M has 1GB but only reports |
| 116 // 128MB java heap size). First we estimate physical memory using both. | 113 // 128MB java heap size). First we estimate physical memory using both. |
| 117 size_t dalvik_mb = base::SysInfo::DalvikHeapSizeMB(); | 114 size_t dalvik_mb = base::SysInfo::DalvikHeapSizeMB(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // Ignore what the system said and give all clients the same maximum | 167 // Ignore what the system said and give all clients the same maximum |
| 171 // allocation on desktop platforms. | 168 // allocation on desktop platforms. |
| 172 memory_policy.bytes_limit_when_visible = 512 * 1024 * 1024; | 169 memory_policy.bytes_limit_when_visible = 512 * 1024 * 1024; |
| 173 memory_policy.priority_cutoff_when_visible = | 170 memory_policy.priority_cutoff_when_visible = |
| 174 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; | 171 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; |
| 175 #endif | 172 #endif |
| 176 } | 173 } |
| 177 | 174 |
| 178 } // namespace client | 175 } // namespace client |
| 179 } // namespace blimp | 176 } // namespace blimp |
| OLD | NEW |