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

Side by Side Diff: cc/resources/prioritized_resource_manager.cc

Issue 13206004: cc: Fix build issues for adding ‘chromium_code’: 1 to cc.gyp and cc_tests.gyp (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/resources/prioritized_resource_manager.h" 5 #include "cc/resources/prioritized_resource_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "cc/resources/prioritized_resource.h" 11 #include "cc/resources/prioritized_resource.h"
12 #include "cc/resources/priority_calculator.h" 12 #include "cc/resources/priority_calculator.h"
13 #include "cc/trees/proxy.h" 13 #include "cc/trees/proxy.h"
14 14
15 namespace cc { 15 namespace cc {
16 16
17 PrioritizedResourceManager::PrioritizedResourceManager(const Proxy* proxy) 17 PrioritizedResourceManager::PrioritizedResourceManager(const Proxy* proxy)
18 : proxy_(proxy), 18 : max_memory_limit_bytes_(DefaultMemoryAllocationLimit()),
19 max_memory_limit_bytes_(DefaultMemoryAllocationLimit()),
20 external_priority_cutoff_(PriorityCalculator::AllowEverythingCutoff()), 19 external_priority_cutoff_(PriorityCalculator::AllowEverythingCutoff()),
21 memory_use_bytes_(0), 20 memory_use_bytes_(0),
22 memory_above_cutoff_bytes_(0), 21 memory_above_cutoff_bytes_(0),
23 memory_available_bytes_(0), 22 memory_available_bytes_(0),
23 proxy_(proxy),
24 backings_tail_not_sorted_(false), 24 backings_tail_not_sorted_(false),
25 memory_visible_bytes_(0), 25 memory_visible_bytes_(0),
26 memory_visible_and_nearby_bytes_(0), 26 memory_visible_and_nearby_bytes_(0),
27 memory_visible_last_pushed_bytes_(0), 27 memory_visible_last_pushed_bytes_(0),
28 memory_visible_and_nearby_last_pushed_bytes_(0) {} 28 memory_visible_and_nearby_last_pushed_bytes_(0) {}
29 29
30 PrioritizedResourceManager::~PrioritizedResourceManager() { 30 PrioritizedResourceManager::~PrioritizedResourceManager() {
31 while (textures_.size() > 0) 31 while (textures_.size() > 0)
32 UnregisterTexture(*textures_.begin()); 32 UnregisterTexture(*textures_.begin());
33 33
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 previous_backing = backing; 533 previous_backing = backing;
534 } 534 }
535 #endif 535 #endif
536 } 536 }
537 537
538 const Proxy* PrioritizedResourceManager::ProxyForDebug() const { 538 const Proxy* PrioritizedResourceManager::ProxyForDebug() const {
539 return proxy_; 539 return proxy_;
540 } 540 }
541 541
542 } // namespace cc 542 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698