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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/tile_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_priority.h
diff --git a/cc/tile_priority.h b/cc/tile_priority.h
new file mode 100644
index 0000000000000000000000000000000000000000..357fb9ed111709979c3821ca8e953065b9710acd
--- /dev/null
+++ b/cc/tile_priority.h
@@ -0,0 +1,47 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_TILE_PRIORTY_H_
+#define CC_TILE_PRIORTY_H_
+
+#include "base/memory/ref_counted.h"
+#include "cc/picture_pile.h"
+#include "cc/tile_priority.h"
+#include "ui/gfx/rect.h"
+#include "ui/gfx/size.h"
+
+namespace cc {
+
+struct TilePriority {
+ // A given layer may have multiple tilings, of differing quality.
+ // would_be_drawn is set for the tiles that are visible that would be
+ // drawn if they were chosen.
+ bool would_be_drawn;
+
+ // Set to true for tiles that should be favored during, for example,
+ // scrolls.
+ bool on_primary_tree;
+
+ // Used to prefer tiles near to the viewport.
+ float distance_to_viewport;
+
+ // TODO(enne): some metric that penalizes blurriness.
+};
+
+class TilePriorityComparator {
+ public:
+ TilePriorityComparator(bool currently_scrolling)
+ : currently_scrolling_(currently_scrolling) {}
+
+ int compare(const TilePriority& a, const TilePriority& b) {
+ // TODO(nduca,enne): Implement a comparator using the attributes here.
+ return 0;
+ }
+
+ private:
+ bool currently_scrolling_;
+};
+
+} // namespace cc
+#endif
« 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