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

Side by Side Diff: cc/managed_memory_policy.h

Issue 11637022: Send memory management policies to the tile manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate discussions Created 7 years, 12 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 #ifndef CC_MANAGED_MEMORY_POLICY_H_ 5 #ifndef CC_MANAGED_MEMORY_POLICY_H_
6 #define CC_MANAGED_MEMORY_POLICY_H_ 6 #define CC_MANAGED_MEMORY_POLICY_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "cc/cc_export.h" 9 #include "cc/cc_export.h"
10 #include "cc/tile_priority.h"
10 11
11 namespace cc { 12 namespace cc {
12 13
13 struct CC_EXPORT ManagedMemoryPolicy { 14 struct CC_EXPORT ManagedMemoryPolicy {
15 enum PriorityCutoff {
16 CUTOFF_ALLOW_NOTHING,
17 CUTOFF_ALLOW_REQUIRED_ONLY,
18 CUTOFF_ALLOW_NICE_TO_HAVE,
19 CUTOFF_ALLOW_EVERYTHING,
20 };
21
14 ManagedMemoryPolicy(size_t bytesLimitWhenVisible); 22 ManagedMemoryPolicy(size_t bytesLimitWhenVisible);
15 ManagedMemoryPolicy(size_t bytesLimitWhenVisible, 23 ManagedMemoryPolicy(size_t bytesLimitWhenVisible,
16 int priorityCutoffWhenVisible, 24 PriorityCutoff priorityCutoffWhenVisible,
17 size_t bytesLimitWhenNotVisible, 25 size_t bytesLimitWhenNotVisible,
18 int priorityCutoffWhenNotVisible); 26 PriorityCutoff priorityCutoffWhenNotVisible);
19 bool operator==(const ManagedMemoryPolicy&) const; 27 bool operator==(const ManagedMemoryPolicy&) const;
20 bool operator!=(const ManagedMemoryPolicy&) const; 28 bool operator!=(const ManagedMemoryPolicy&) const;
21 29
22 size_t bytesLimitWhenVisible; 30 size_t bytesLimitWhenVisible;
23 int priorityCutoffWhenVisible; 31 PriorityCutoff priorityCutoffWhenVisible;
24 size_t bytesLimitWhenNotVisible; 32 size_t bytesLimitWhenNotVisible;
25 int priorityCutoffWhenNotVisible; 33 PriorityCutoff priorityCutoffWhenNotVisible;
34
35 static int priorityCutoffToValue(PriorityCutoff priorityCutoff);
36 static TileMemoryLimitPolicy priorityCutoffToTileMemoryLimitPolicy(PriorityC utoff priorityCutoff);
26 }; 37 };
27 38
28 } // namespace cc 39 } // namespace cc
29 40
30 #endif // CC_MANAGED_MEMORY_POLICY_H_ 41 #endif // CC_MANAGED_MEMORY_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698