Depend on stored sync session GUID for Android.
[chromium-blink-merge.git] / cc / priority_calculator.h
blobab7e8567f161f2cf666a693d7f8c2335a2cad8c1
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.
5 #ifndef CC_PRIORITY_CALCULATOR_H_
6 #define CC_PRIORITY_CALCULATOR_H_
8 #include "cc/cc_export.h"
10 namespace gfx {
11 class Rect;
14 namespace cc {
16 class CC_EXPORT PriorityCalculator {
17 public:
18 static int uiPriority(bool drawsToRootSurface);
19 static int visiblePriority(bool drawsToRootSurface);
20 static int renderSurfacePriority();
21 static int lingeringPriority(int previousPriority);
22 static int priorityFromDistance(const gfx::Rect& visibleRect, const gfx::Rect& textureRect, bool drawsToRootSurface);
23 static int smallAnimatedLayerMinPriority();
25 static int highestPriority();
26 static int lowestPriority();
27 static inline bool priorityIsLower(int a, int b) { return a > b; }
28 static inline bool priorityIsHigher(int a, int b) { return a < b; }
29 static inline int maxPriority(int a, int b) { return priorityIsHigher(a, b) ? a : b; }
31 static int allowNothingCutoff();
32 static int allowVisibleOnlyCutoff();
33 static int allowVisibleAndNearbyCutoff();
34 static int allowEverythingCutoff();
39 #endif // CC_PRIORITY_CALCULATOR_H_