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

Side by Side Diff: cc/resources/priority_calculator.h

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « cc/resources/prioritized_resource_unittest.cc ('k') | cc/resources/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_RESOURCES_PRIORITY_CALCULATOR_H_
6 #define CC_RESOURCES_PRIORITY_CALCULATOR_H_
7
8 #include "base/basictypes.h"
9 #include "cc/base/cc_export.h"
10
11 namespace gfx { class Rect; }
12
13 namespace cc {
14
15 class CC_EXPORT PriorityCalculator {
16 public:
17 PriorityCalculator() {}
18
19 static int UIPriority(bool draws_to_root_surface);
20 static int VisiblePriority(bool draws_to_root_surface);
21 static int RenderSurfacePriority();
22 static int LingeringPriority(int previous_priority);
23 static int PriorityFromDistance(const gfx::Rect& visible_rect,
24 const gfx::Rect& texture_rect,
25 bool draws_to_root_surface);
26 static int SmallAnimatedLayerMinPriority();
27
28 static int HighestPriority();
29 static int LowestPriority();
30 static inline bool priority_is_lower(int a, int b) { return a > b; }
31 static inline bool priority_is_higher(int a, int b) { return a < b; }
32 static inline int max_priority(int a, int b) {
33 return priority_is_higher(a, b) ? a : b;
34 }
35
36 static int AllowNothingCutoff();
37 static int AllowVisibleOnlyCutoff();
38 static int AllowVisibleAndNearbyCutoff();
39 static int AllowEverythingCutoff();
40
41 private:
42 DISALLOW_COPY_AND_ASSIGN(PriorityCalculator);
43 };
44
45 } // namespace cc
46
47 #endif // CC_RESOURCES_PRIORITY_CALCULATOR_H_
OLDNEW
« no previous file with comments | « cc/resources/prioritized_resource_unittest.cc ('k') | cc/resources/priority_calculator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698