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

Unified Diff: cc/managed_memory_policy.cc

Issue 12471007: Part 8 of cc/ directory shuffles: resources (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/managed_memory_policy.h ('k') | cc/managed_tile_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/managed_memory_policy.cc
diff --git a/cc/managed_memory_policy.cc b/cc/managed_memory_policy.cc
deleted file mode 100644
index 05f49494be2732f194f69c9f78ae1b1317577df6..0000000000000000000000000000000000000000
--- a/cc/managed_memory_policy.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "managed_memory_policy.h"
-
-#include "base/logging.h"
-#include "priority_calculator.h"
-
-namespace cc {
-
-ManagedMemoryPolicy::ManagedMemoryPolicy(size_t bytesLimitWhenVisible)
- : bytesLimitWhenVisible(bytesLimitWhenVisible)
- , priorityCutoffWhenVisible(CUTOFF_ALLOW_EVERYTHING)
- , bytesLimitWhenNotVisible(0)
- , priorityCutoffWhenNotVisible(CUTOFF_ALLOW_NOTHING)
-{
-}
-
-ManagedMemoryPolicy::ManagedMemoryPolicy(size_t bytesLimitWhenVisible,
- PriorityCutoff priorityCutoffWhenVisible,
- size_t bytesLimitWhenNotVisible,
- PriorityCutoff priorityCutoffWhenNotVisible)
- : bytesLimitWhenVisible(bytesLimitWhenVisible)
- , priorityCutoffWhenVisible(priorityCutoffWhenVisible)
- , bytesLimitWhenNotVisible(bytesLimitWhenNotVisible)
- , priorityCutoffWhenNotVisible(priorityCutoffWhenNotVisible)
-{
-}
-
-bool ManagedMemoryPolicy::operator==(const ManagedMemoryPolicy& other) const
-{
- return bytesLimitWhenVisible == other.bytesLimitWhenVisible &&
- priorityCutoffWhenVisible == other.priorityCutoffWhenVisible &&
- bytesLimitWhenNotVisible == other.bytesLimitWhenNotVisible &&
- priorityCutoffWhenNotVisible == other.priorityCutoffWhenNotVisible;
-}
-
-bool ManagedMemoryPolicy::operator!=(const ManagedMemoryPolicy& other) const
-{
- return !(*this == other);
-}
-
-// static
-int ManagedMemoryPolicy::priorityCutoffToValue(PriorityCutoff priorityCutoff)
-{
- switch (priorityCutoff) {
- case CUTOFF_ALLOW_NOTHING:
- return PriorityCalculator::AllowNothingCutoff();
- case CUTOFF_ALLOW_REQUIRED_ONLY:
- return PriorityCalculator::AllowVisibleOnlyCutoff();
- case CUTOFF_ALLOW_NICE_TO_HAVE:
- return PriorityCalculator::AllowVisibleAndNearbyCutoff();
- case CUTOFF_ALLOW_EVERYTHING:
- return PriorityCalculator::AllowEverythingCutoff();
- }
- NOTREACHED();
- return PriorityCalculator::AllowNothingCutoff();
-}
-
-// static
-TileMemoryLimitPolicy ManagedMemoryPolicy::priorityCutoffToTileMemoryLimitPolicy(PriorityCutoff priorityCutoff)
-{
- switch (priorityCutoff) {
- case CUTOFF_ALLOW_NOTHING:
- return ALLOW_NOTHING;
- case CUTOFF_ALLOW_REQUIRED_ONLY:
- return ALLOW_ABSOLUTE_MINIMUM;
- case CUTOFF_ALLOW_NICE_TO_HAVE:
- return ALLOW_PREPAINT_ONLY;
- case CUTOFF_ALLOW_EVERYTHING:
- return ALLOW_ANYTHING;
- }
- NOTREACHED();
- return ALLOW_NOTHING;
-}
-
-} // namespace cc
« no previous file with comments | « cc/managed_memory_policy.h ('k') | cc/managed_tile_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698