Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 397193002: Set ImageCacheSingleAllocationByteLimit to 64MB (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698