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

Side by Side Diff: cc/tile_priority.h

Issue 11369130: [cc] Tiles and tile manager for impl side painting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixen Created 8 years, 1 month 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/tile_manager.cc ('k') | no next file » | 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 2012 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_TILE_PRIORTY_H_
6 #define CC_TILE_PRIORTY_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "cc/picture_pile.h"
10 #include "cc/tile_priority.h"
11 #include "ui/gfx/rect.h"
12 #include "ui/gfx/size.h"
13
14 namespace cc {
15
16 struct TilePriority {
17 // A given layer may have multiple tilings, of differing quality.
18 // would_be_drawn is set for the tiles that are visible that would be
19 // drawn if they were chosen.
20 bool would_be_drawn;
21
22 // Set to true for tiles that should be favored during, for example,
23 // scrolls.
24 bool on_primary_tree;
25
26 // Used to prefer tiles near to the viewport.
27 float distance_to_viewport;
28
29 // TODO(enne): some metric that penalizes blurriness.
30 };
31
32 class TilePriorityComparator {
33 public:
34 TilePriorityComparator(bool currently_scrolling)
35 : currently_scrolling_(currently_scrolling) {}
36
37 int compare(const TilePriority& a, const TilePriority& b) {
38 // TODO(nduca,enne): Implement a comparator using the attributes here.
39 return 0;
40 }
41
42 private:
43 bool currently_scrolling_;
44 };
45
46 } // namespace cc
47 #endif
OLDNEW
« no previous file with comments | « cc/tile_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698