diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-18 05:55:37 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-18 05:55:37 +0000 |
commit | 0ad1eb652713969c80c31eec00e509eb8b3b66aa (patch) | |
tree | 3deb45c868b3b6bde042bb6f03ad12b2f9ca8780 /cc/priority_calculator.h | |
parent | d5a315a1dc65d69bf78d79e68648ba0065d64685 (diff) | |
download | chromium_src-0ad1eb652713969c80c31eec00e509eb8b3b66aa.zip chromium_src-0ad1eb652713969c80c31eec00e509eb8b3b66aa.tar.gz chromium_src-0ad1eb652713969c80c31eec00e509eb8b3b66aa.tar.bz2 |
cc: Chromify PriorityCalculator
R=danakj@chromium.org
BUG=none
Review URL: https://chromiumcodereview.appspot.com/12873004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188678 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/priority_calculator.h')
-rw-r--r-- | cc/priority_calculator.h | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/cc/priority_calculator.h b/cc/priority_calculator.h index ab7e856..8e5d671 100644 --- a/cc/priority_calculator.h +++ b/cc/priority_calculator.h @@ -7,31 +7,33 @@ #include "cc/cc_export.h" -namespace gfx { -class Rect; -} +namespace gfx { class Rect; } namespace cc { class CC_EXPORT PriorityCalculator { -public: - static int uiPriority(bool drawsToRootSurface); - static int visiblePriority(bool drawsToRootSurface); - static int renderSurfacePriority(); - static int lingeringPriority(int previousPriority); - static int priorityFromDistance(const gfx::Rect& visibleRect, const gfx::Rect& textureRect, bool drawsToRootSurface); - static int smallAnimatedLayerMinPriority(); - - static int highestPriority(); - static int lowestPriority(); - static inline bool priorityIsLower(int a, int b) { return a > b; } - static inline bool priorityIsHigher(int a, int b) { return a < b; } - static inline int maxPriority(int a, int b) { return priorityIsHigher(a, b) ? a : b; } - - static int allowNothingCutoff(); - static int allowVisibleOnlyCutoff(); - static int allowVisibleAndNearbyCutoff(); - static int allowEverythingCutoff(); + public: + static int UIPriority(bool draws_to_root_surface); + static int VisiblePriority(bool draws_to_root_surface); + static int RenderSurfacePriority(); + static int LingeringPriority(int previous_priority); + static int PriorityFromDistance(gfx::Rect visible_rect, + gfx::Rect texture_rect, + bool draws_to_root_surface); + static int SmallAnimatedLayerMinPriority(); + + static int HighestPriority(); + static int LowestPriority(); + static inline bool priority_is_lower(int a, int b) { return a > b; } + static inline bool priority_is_higher(int a, int b) { return a < b; } + static inline int max_priority(int a, int b) { + return priority_is_higher(a, b) ? a : b; + } + + static int AllowNothingCutoff(); + static int AllowVisibleOnlyCutoff(); + static int AllowVisibleAndNearbyCutoff(); + static int AllowEverythingCutoff(); }; } |