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

Side by Side Diff: cc/priority_calculator.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/prioritized_resource_unittest.cc ('k') | cc/priority_calculator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_PRIORITY_CALCULATOR_H_
6 #define CC_PRIORITY_CALCULATOR_H_
7
8 #include "cc/base/cc_export.h"
9
10 namespace gfx { class Rect; }
11
12 namespace cc {
13
14 class CC_EXPORT PriorityCalculator {
15 public:
16 static int UIPriority(bool draws_to_root_surface);
17 static int VisiblePriority(bool draws_to_root_surface);
18 static int RenderSurfacePriority();
19 static int LingeringPriority(int previous_priority);
20 static int PriorityFromDistance(gfx::Rect visible_rect,
21 gfx::Rect texture_rect,
22 bool draws_to_root_surface);
23 static int SmallAnimatedLayerMinPriority();
24
25 static int HighestPriority();
26 static int LowestPriority();
27 static inline bool priority_is_lower(int a, int b) { return a > b; }
28 static inline bool priority_is_higher(int a, int b) { return a < b; }
29 static inline int max_priority(int a, int b) {
30 return priority_is_higher(a, b) ? a : b;
31 }
32
33 static int AllowNothingCutoff();
34 static int AllowVisibleOnlyCutoff();
35 static int AllowVisibleAndNearbyCutoff();
36 static int AllowEverythingCutoff();
37 };
38
39 }
40
41 #endif // CC_PRIORITY_CALCULATOR_H_
OLDNEW
« no previous file with comments | « cc/prioritized_resource_unittest.cc ('k') | cc/priority_calculator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698