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

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

Issue 135113003: Revert 244229 "base: Fix registering of memory pressure listener..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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 | « trunk/src/base/memory/discardable_memory_win.cc ('k') | 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 supported_types.end(), 423 supported_types.end(),
424 requested_type) != supported_types.end()) { 424 requested_type) != supported_types.end()) {
425 type = requested_type; 425 type = requested_type;
426 } else { 426 } else {
427 LOG(ERROR) << "Requested discardable memory type is not supported."; 427 LOG(ERROR) << "Requested discardable memory type is not supported.";
428 } 428 }
429 } 429 }
430 430
431 base::DiscardableMemory::SetPreferredType(type); 431 base::DiscardableMemory::SetPreferredType(type);
432 432
433 // Allow discardable memory implementations to register memory pressure
434 // listeners.
435 base::DiscardableMemory::RegisterMemoryPressureListeners();
436
437 // AllocateGpuMemoryBuffer must be used exclusively on one thread but 433 // AllocateGpuMemoryBuffer must be used exclusively on one thread but
438 // it doesn't have to be the same thread RenderThreadImpl is created on. 434 // it doesn't have to be the same thread RenderThreadImpl is created on.
439 allocate_gpu_memory_buffer_thread_checker_.DetachFromThread(); 435 allocate_gpu_memory_buffer_thread_checker_.DetachFromThread();
440 436
441 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); 437 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, "");
442 } 438 }
443 439
444 RenderThreadImpl::~RenderThreadImpl() { 440 RenderThreadImpl::~RenderThreadImpl() {
445 } 441 }
446 442
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 hidden_widget_count_--; 1402 hidden_widget_count_--;
1407 1403
1408 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1404 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1409 return; 1405 return;
1410 } 1406 }
1411 1407
1412 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1408 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1413 } 1409 }
1414 1410
1415 } // namespace content 1411 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/base/memory/discardable_memory_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698