Chromium Code Reviews| 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 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 897 // Limit use of the scaled image cache to when deferred image decoding is | 897 // Limit use of the scaled image cache to when deferred image decoding is |
| 898 // enabled. | 898 // enabled. |
| 899 if (!command_line.HasSwitch(switches::kEnableDeferredImageDecoding) && | 899 if (!command_line.HasSwitch(switches::kEnableDeferredImageDecoding) && |
| 900 !is_impl_side_painting_enabled_) | 900 !is_impl_side_painting_enabled_) |
| 901 SkGraphics::SetImageCacheByteLimit(0u); | 901 SkGraphics::SetImageCacheByteLimit(0u); |
| 902 | 902 |
| 903 if (command_line.HasSwitch(switches::kMemoryMetrics)) { | 903 if (command_line.HasSwitch(switches::kMemoryMetrics)) { |
| 904 memory_observer_.reset(new MemoryObserver()); | 904 memory_observer_.reset(new MemoryObserver()); |
| 905 message_loop()->AddTaskObserver(memory_observer_.get()); | 905 message_loop()->AddTaskObserver(memory_observer_.get()); |
| 906 } | 906 } |
| 907 SkGraphics::SetImageCacheSingleAllocationByteLimit(64 * 1024 * 1024); | |
|
reveman
2014/07/17 15:33:21
Can you move "64 * 1024 * 1024" to a constant defi
reveman
2014/07/17 15:36:06
nit: move this call up next to the other SkGraphic
hal.canary
2014/07/17 16:55:06
Done.
hal.canary
2014/07/17 16:55:07
Done.
| |
| 907 } | 908 } |
| 908 | 909 |
| 909 void RenderThreadImpl::RegisterSchemes() { | 910 void RenderThreadImpl::RegisterSchemes() { |
| 910 // swappedout: pages should not be accessible, and should also | 911 // swappedout: pages should not be accessible, and should also |
| 911 // be treated as empty documents that can commit synchronously. | 912 // be treated as empty documents that can commit synchronously. |
| 912 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); | 913 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); |
| 913 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); | 914 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); |
| 914 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); | 915 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); |
| 915 } | 916 } |
| 916 | 917 |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1608 hidden_widget_count_--; | 1609 hidden_widget_count_--; |
| 1609 | 1610 |
| 1610 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1611 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1611 return; | 1612 return; |
| 1612 } | 1613 } |
| 1613 | 1614 |
| 1614 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1615 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1615 } | 1616 } |
| 1616 | 1617 |
| 1617 } // namespace content | 1618 } // namespace content |
| OLD | NEW |